[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Re: Routing bug?



Paul Jones wrote
> I'm in the process ( have been for some time, but it took a back burner
> for 3 years and i'm remembering why) of making a polyphonic 8 operator fm
> synth. It mostly works but there is one thing I really cant fix.
> When chords are played or sequential notes, 90% of the time there isn't a
> problem. But sometimes the new note uses the same busses as already active
> synths and thus the timbre gets glitchy. Which is sort of nice but I want
> to give away something that works.

Are you releasing a note's buses at the moment when the user requests the
note release, or at the moment when the envelopes are all finished and the
synths have ended?

Oh wait... now I see that you have "reltime.wait" in the release code. Does
"reltime" really match the release times of all the synths?

ddwVoicer needs to handle a related problem: not about buses, but it has to
know which slots are active, which are free, and which ones can be stolen if
needed. I considered a release-time parameter for the user to set, but
decided that it would be too easy for the voicer's "release time that I
think is happening in the server" to disagree with the release time in the
synth. So I ended up using NodeWatcher to track, and I don't mark a resource
as free until the synth is really gone.

Style notes:


> What I have done in the code is put the note number in the first available
> slot in an array, 
> 
> while({synTestArray[synTest]>0},{synTest=synTest+1});
> 			synTestArray.put(synTest,num);

synTest = synTestArray.detectIndex { |item| item == 0 };
if(synTest.notNil) { synTestArray.put(synTest,num) } { /* else fail, maybe
throw an error? */ };


> When the synth is released by using the MIDI number I clear that spot in
> the array. 
> 
> Routine({1.do{ reltime.wait;
> 				noSynths = noSynths - 1;
> 				synTestArray.do{|i,o| case{i==num}{synTestArray.put(o,0)}};
> 				synTestArray.postln;
> 			}}).play;

"1.do {  }" is redundant.

If you have only one case, there's no benefit over "if" (but there's no
penalty for using "case"  either).

hjh



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Routing-bug-tp7629814p7629816.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/