From the original SynthMaker forum (2004–2014), with its members’ names and dates.
tormodulator ·
I'm trying to write code. I get how I can take an incoming audio stream and output an altered version of the audio.
What I'm trying to do now is to make the code run when it receives input from a control, but I can't seem to get my head around it.
So how do I trigger the code to run if I don't stick audio in it? I'm thinking of using a drop down list or a selector of some sort, and the code generates a complex output based on the values on a bunch of input nodes when it's triggered by change in any of the data or a trigger of some sort.
Am I not supposed to think like this? 🙂
edit: additional or supplemental questions:
-Can someone please explain how to make a conditional? I only know Delphi, and I'm used to IF and CASE and stuff. The mask is confusing me.
-no variables in loops?
autodafe ·
there's a nice tutorial/reference about code module in the Wiki (I'm still studying it 😊), in case you haven't seen it...
tormodulator ·
Yeah, well, I'm sorry - I don't find it that simple to follow...
Can I make code run by using some sort of trigger?
rl ·
it depends:
- for simplicity let's assume your code uses only streamin's and streamout's.
- if your streamout is connected to an analyzer you can specify for how many samples your code module will run. The analyzer's trigger starts the processing.
- if your streamout is within a processing stream midi2poly -> ... -> your code -> ... -> poly2mono (white (~) connector) for every new note-on a new sound process is created and assigned to the next free "sound processing slot". 4 slots fit into a single SSE channel.
- if there is no poly stuff and you have mono connectors (the blue (*) ones) connected to DSout or ASIOout the code runs always till the end of time() or the end of your studio session (whichever comes first)
BTW using analyzer streams and poly/mono streams intermixed is a definite way to watch your system creating a crash report.
NothanUmber ·
Here a short example how to react on changing green input data (Shif gave a more detailed example at another thread, didn't find it on first sight though). The biggest disadvantage of the code module for such applications is that one needs an audio in/out somewhere in the schematic, otherwise it won't work. So if you plan to build e.g. midi-only effects that route is not optimal.
Wrote something here? To have a post removed or your name hidden, write to [email protected].