Page 1 of 1

Function-component creation from C code

Posted: Wed Aug 28, 2013 12:18 pm
by Mantas
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? :roll:

Cheers,
Mantas

Re: Function-component creation from C code

Posted: Wed Aug 28, 2013 12:23 pm
by Benj
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.

Re: Function-component creation from C code

Posted: Wed Aug 28, 2013 1:24 pm
by Mantas
Hi Benj,

Sorry for the stupid question, but where do I find this Interface manager? :oops:

Cheers,
Mantas

Re: Function-component creation from C code

Posted: Wed Aug 28, 2013 2:35 pm
by Benj
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.

Re: Function-component creation from C code

Posted: Wed Aug 28, 2013 5:11 pm
by JonnyW
Hi. Dave has produced a video on the interface manager here:

[/youtube]

Jonny

Re: Function-component creation from C code

Posted: Sat Aug 31, 2013 7:28 am
by Mantas
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

Re: Function-component creation from C code

Posted: Mon Sep 02, 2013 8:46 am
by JonnyW
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

Re: Function-component creation from C code

Posted: Mon Sep 02, 2013 12:58 pm
by Mantas
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

Re: Function-component creation from C code

Posted: Mon Sep 02, 2013 1:32 pm
by JonnyW
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