ArrayArrayArray BrainModular BrainModular Users Forum 2021-10-12T09:09:04+02:00 https://brainmodular.com/forums/app.php/feed/topic/6907 2021-10-12T09:09:04+02:00 2021-10-12T09:09:04+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43692#p43692 <![CDATA[Re: Processing efficiency of SDK User Modules]]> Interesting questions.
I'm correcting a point, all modules in usine are not made with the SDK. The list of user modules made with the SDK is in the SDK package itself.
The performances, between SDK and built-in modules, should be almost the same, especially if you use Event processing functions of the SDK which are written in Assembler and are very optimized, ie sdkAddEvt, sdkSubEvt, etc.

But of course, it depends on the processing itself. The midi processing is generally not very consuming because the midi rate is, most of time, very low compared to the audio at 96kHz. So you shouldn't care about optimization in your midi transformers modules.

It's generally impossible to combine several Math modules into a single instruction. Usine is not aware of the sequence of modules, it just compile the patch into a set of "pseudo" code and make the calculation according the graph of the patch. In fact exactly like any computer or interpreter.
if you write

CODE:

...x = x + 4;x = x + 2;x = x + 1;x = x - 6;...
the calculation will be executed in the order and no compiler (that I know) will transform this into

CODE:

...x = x +1;...
senso

Statistics: Posted by senso — 12 Oct 2021, 09:09


]]>
2021-10-11T12:12:39+02:00 2021-10-11T12:12:39+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43690#p43690 <![CDATA[Re: Processing efficiency of SDK User Modules]]> when running several SDK modules, in patch for every module onprocess function is called, so in theory building your own module, which combines, functionality of two patched modules should be more effective as only one onprocess function is caalled, but i don't think that that the improvement would be noticable, but definitly it would add to "readibility" of the patch (but that can be achieved by subpatches as well)

Statistics: Posted by drakh — 11 Oct 2021, 12:12


]]>
2021-10-09T12:55:25+02:00 2021-10-09T12:55:25+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43688#p43688 <![CDATA[Processing efficiency of SDK User Modules]]>
For simple processing modules e.g. add, subtract, are the functions combined in some way internally
when Usine computes the patch ?
e.g. a chain of maths modules could be collapsed into a simple equation for increased efficiency instead
of running through the functions one at a time.

If simple SDK modules were produced for the same functions, presumably this could not happen,
since each has to run through the C++ functions that Usine does not know about.

My question is really about the midi filter and midi transformer modules.
If I write an SDK module to combine the functions and do some extra stuff I require,
will it be less efficient in processing terms than combining Usine modules in a patch ?

Simon.

Statistics: Posted by sm_jamieson — 09 Oct 2021, 12:55


]]>
BrainModular BrainModular Users Forum 2021-10-12T09:09:04+02:00 https://brainmodular.com/forums/app.php/feed/topic/6907 2021-10-12T09:09:04+02:00 2021-10-12T09:09:04+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43692#p43692 <![CDATA[Re: Processing efficiency of SDK User Modules]]> Interesting questions.
I'm correcting a point, all modules in usine are not made with the SDK. The list of user modules made with the SDK is in the SDK package itself.
The performances, between SDK and built-in modules, should be almost the same, especially if you use Event processing functions of the SDK which are written in Assembler and are very optimized, ie sdkAddEvt, sdkSubEvt, etc.

But of course, it depends on the processing itself. The midi processing is generally not very consuming because the midi rate is, most of time, very low compared to the audio at 96kHz. So you shouldn't care about optimization in your midi transformers modules.

It's generally impossible to combine several Math modules into a single instruction. Usine is not aware of the sequence of modules, it just compile the patch into a set of "pseudo" code and make the calculation according the graph of the patch. In fact exactly like any computer or interpreter.
if you write

CODE:

...x = x + 4;x = x + 2;x = x + 1;x = x - 6;...
the calculation will be executed in the order and no compiler (that I know) will transform this into

CODE:

...x = x +1;...
senso

Statistics: Posted by senso — 12 Oct 2021, 09:09


]]>
2021-10-11T12:12:39+02:00 2021-10-11T12:12:39+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43690#p43690 <![CDATA[Re: Processing efficiency of SDK User Modules]]> when running several SDK modules, in patch for every module onprocess function is called, so in theory building your own module, which combines, functionality of two patched modules should be more effective as only one onprocess function is caalled, but i don't think that that the improvement would be noticable, but definitly it would add to "readibility" of the patch (but that can be achieved by subpatches as well)

Statistics: Posted by drakh — 11 Oct 2021, 12:12


]]>
2021-10-09T12:55:25+02:00 2021-10-09T12:55:25+02:00 https://brainmodular.com/forums/viewtopic.php?t=6907&p=43688#p43688 <![CDATA[Processing efficiency of SDK User Modules]]>
For simple processing modules e.g. add, subtract, are the functions combined in some way internally
when Usine computes the patch ?
e.g. a chain of maths modules could be collapsed into a simple equation for increased efficiency instead
of running through the functions one at a time.

If simple SDK modules were produced for the same functions, presumably this could not happen,
since each has to run through the C++ functions that Usine does not know about.

My question is really about the midi filter and midi transformer modules.
If I write an SDK module to combine the functions and do some extra stuff I require,
will it be less efficient in processing terms than combining Usine modules in a patch ?

Simon.

Statistics: Posted by sm_jamieson — 09 Oct 2021, 12:55


]]>