SynthMaker

stolen voices, stage(0) and reinitializing

Archive · 2009 1 old post

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

MichaelBenjamin ·

so far stage (0) does not get retriggered on stolen voices. this sometimes, or quite often, depending on your liking, results in unwanted behaviour. it also might be considered as a bug since you need to add extra code for every variable to reinitialise just for this special case. additionally, the stage(0) only works for pitch and velocity data from the m2p and for green. for every other stream data stage(0) is not usable.

heres a quick roundup on what to do to initialize other stream data and reinitialize on stolen voices, not too complicated:

first part, initialize stream data: needs a variable, called "once" here, it is zero for the first sample and gets set to 1 at the end of the code to be 1 for every following sample. once is bound to a gate, where you specify what data gets passed on the first sample and on the others.

general example: streamin in; streamout out; float once=0; out=(here the usual code)&(once==1)+(here the initialisation code)&(once==0); once=1;

lowpass example: streamin in; streamout out; float once=0; out=(out*0.99+in*0.01)&(once==1)+in&(once==0); once=1;

here the lowpass starts at the original in value and from then on is filtered, its just like the dezip or the stock portamento. note that i use == despite the comarision is made with a float. i use this for better understanding, and it did not gave me any problems for 0 and 1.

second part, reinitializing on stolen voices: to reinitialize you need the output from the env module, its the only module i know of that resets to 1 on stolen voices and otherwise displays the same or a higher number in progrssing time. there may be other modules that are also suited, but since i got the env module in already, i used it.

same example with the lowpass, with initializing on voice and stolen voice this time: now we need to initialize the once variable manually with roughly the same gate comparision like in the example above based on envstg.

streamin in; streamin envstg;//stage output from env module streamout out; float once=0; float lastenv=0; out=(out*0.99+in*0.01)&(once==1)+in&(once==0); once=1&(lastenv<=envstg); lastenv=envstg; //in the case of a stolen voice lastenv is > envstg so once is 0 again.

for a cpu effective version of all this, you could calculate "once" globally and feed it to each module that needs initialisation. the branch itself however needs to be in every module.

hope this helps solving some of the confusion around retriggering, stage(0) stolen voices and initialisation. but naturally a much more effective way to handle this would be if stage 0 would work always, for all data.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.