Hi,
Would it be possible and how to implement the possibility to create new components, or functions directly from C code, and them have them as standard library, like for the example I did with the inverse sqrt() function? Instead of having them as macros? Or is this just a no brain'er?
Cheers,
Mantas
Function-component creation from C code
Moderator: Benj
Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Only feature requests will be considered here. General questions should not be posted in this forum.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Function-component creation from C code
Hi Mantas,
The Embedded Macro and Hidden Embedded Macro options in the Interface manager are basically for this very purpose and allows us to build components which either call existing C functions without any additional overhead or to call code e.g. to read or write to an array as used in the DSP components.
The Embedded Macro and Hidden Embedded Macro options in the Interface manager are basically for this very purpose and allows us to build components which either call existing C functions without any additional overhead or to call code e.g. to read or write to an array as used in the DSP components.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
- Contact:
Re: Function-component creation from C code
Hi Benj,
Sorry for the stupid question, but where do I find this Interface manager?
Cheers,
Mantas
Sorry for the stupid question, but where do I find this Interface manager?
Cheers,
Mantas
Science is my true religion.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Function-component creation from C code
Hi Mantas,
I talk briefly about the interface manager in this vid.
http://www.matrixmultimedia.com/mmforum ... 58&t=12735
More info can be found in the Wiki but I have some writing on this section still to do so I could try and add to this extra info in later today.
I talk briefly about the interface manager in this vid.
http://www.matrixmultimedia.com/mmforum ... 58&t=12735
More info can be found in the Wiki but I have some writing on this section still to do so I could try and add to this extra info in later today.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Function-component creation from C code
Hi. Dave has produced a video on the interface manager here:
[/youtube]
Jonny
[/youtube]
Jonny
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
- Contact:
Re: Function-component creation from C code
Hi Gents,
Could you create a video of showing how to create a component, or a function specifically from C code? I know there is a supplementary section in the settings manager an others, but this is still mind boggling for me What if a C code function to call has a pointer in the parameter section...you know some more complicated functions implementation done by you in a video would be very interested to see.
Thanks in advance! You are doing an amazing job there!
Best regards,
Mantas
Could you create a video of showing how to create a component, or a function specifically from C code? I know there is a supplementary section in the settings manager an others, but this is still mind boggling for me What if a C code function to call has a pointer in the parameter section...you know some more complicated functions implementation done by you in a video would be very interested to see.
Thanks in advance! You are doing an amazing job there!
Best regards,
Mantas
Science is my true religion.
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Function-component creation from C code
Hi Mantas. Yes, it would certainly be possible to do a video on this.
As far as pointers go, we get around that when using DLLs by using an array of 1 element, but all macros must conform to Flowcodes procedure-call standard, that is that every array is followed by its size, and the return type (if a string) is the final argument. This is easily fixed with a #define though:
#define FlowcodeFunc(arrayptr, arraylen) RealFunc(arrayptr)
I've wanted to do a video on embedded component macros for a bit, so see if there is time today now I know there is demand.
Cheers,
Jonny
As far as pointers go, we get around that when using DLLs by using an array of 1 element, but all macros must conform to Flowcodes procedure-call standard, that is that every array is followed by its size, and the return type (if a string) is the final argument. This is easily fixed with a #define though:
#define FlowcodeFunc(arrayptr, arraylen) RealFunc(arrayptr)
I've wanted to do a video on embedded component macros for a bit, so see if there is time today now I know there is demand.
Cheers,
Jonny
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
- Contact:
Re: Function-component creation from C code
Hi Jonny,
I would really appreciate that! This would simplify a big part of my work were I need to convert C code to flowcode!
Cheers,
Mantas
I would really appreciate that! This would simplify a big part of my work were I need to convert C code to flowcode!
Cheers,
Mantas
Science is my true religion.
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Function-component creation from C code
Because we moved buildings the audio equipment is tucked away somewhere, but I have scripted a video and hopefully can roll that out when the box with the microphone us uncovered.
Jonny
Jonny