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

Re: [sc-users] sending synth parameters with patterns



So apparently trying to use something like the following instead of variants can't work on the server...

		if ( preset == \oboe ,
			{ vcaA = 0.05 ; vcaR = 0.05; vcfOffset = 3; }
		);
		if ( preset == \reverse ,
			{ vcaA = 3 ; vcaR = 0.01; }
		);

So it looks like without variants where I have what I think of as "multiple presets for the same patch" each has to have its own SynthDef.

Is that correct?

thanks,

Phil

On Dec 29, 2013, at 7:15 PM, Philip Galanter <list@xxxxxxxxxxxxxxxxxx> wrote:

> Well here is a vote for fixing it...
> 
> I'm using Supercollider on a Beagleboard as a way to have a low cost synthesis engine. It will be driven by messages sent from another processor, in this case an Arduino Mega.
> 
> I'm not sure why SynthDef variants isn't an obvious and frequently used feature.  It's something I was rather counting on. Below is a (i would assume) simple subtractive synth. My plan was to be able to choose a synth and a preset. Perhaps I'm not thinking about things the "Supercollider way" but it seems like the most natural thing in the synth-world to want to do...synths with presets.
> 
> Meanwhile...is there no workaround to force Pbind to select the appropriate variant?
> 
> ( I need to deal with this in the next week. Right now it looks like I will have to break my variants up into individual SynthDef's or turn my variants into rather unsightly case statements.)
> 
> thanks,
> 
> Phil
> 
> p.s. gratuitous example of variants use:
> 
> (SynthDef("basicsub",
> 	{
> 		arg freq = 440, gateTime = 0.25, outVol = 0.5, outbus = 0, keyVel = 1,
> 		vcaA = 1,  vcaD = 1, vcaS = 0.5, vcaR = 1,
> 		vcfA = 1,  vcfD = 1, vcfS = 0.5, vcfR = 1,
> 		vcfTrack = 1, vcfOffset = 2, vcfEnvAmt = 1, vcfQ = 0;
> 
> 		var gate, osc1, vcfEnv, vcfCV, vcaEnv, inst;
> 
> 		gate = EnvGen.kr(Env.linen( 0.001, gateTime, 0.001 ));
> 		osc1 = Saw.ar( freq );
> 		vcfEnv = EnvGen.kr( Env.adsr(vcfA, vcfD, vcfS, vcfR, 1, -4), gate );
> 		vcfCV = (freq * vcfOffset * vcfTrack) + (vcfEnv * freq * vcfEnvAmt);
> 		vcaEnv = EnvGen.kr( Env.adsr(vcaA, vcaD, vcaS, vcaR, 1, -4), gate, doneAction: 2);
> 		inst = MoogFF.ar( osc1, freq: vcfCV, gain: vcfQ ) * vcaEnv * keyVel * outVol;
> 
> 		Out.ar(outbus, [inst, inst])
> 	},
> 
> 	variants: (
> 		oboe: [vcaA: 0.05,	vcaR: 0.05,   vcfOffset: 3],
> 		reverse:  [vcaA: 3,		vcaR: 0.01],
> 		epiano: [vcaA: 0.01,	vcaD: 3, vcaS: 0, vcaR: 3, vcfQ: 0.5, outVol: 0.9],
> 		qwaah: [vcaA: 0.01,	vcaR: 4, vcfQ: 3.7],
> 		sweep: [vcaA: 0.01,	vcaR: 4,
> 			vcfOffset: 2, vcfQ: 3.7, vcfEnvAmt: 10,
> 			vcfA: 0, vcfS: 0, vcfR: 4, vcfD: 4  ],
> 		thwap: [vcaA: 0.01,	vcaD: 1, vcaS: 0, vcaR: 0.25,  outVol: 0.9,
> 			vcfA: 0, vcfD: 0.025, vcfS: 0, vcfR: 0.025,
> 			vcfOffset: 0, vcfQ: 3.7, vcfEnvAmt: 10  ]
> 	)
> ).send(s);)
> 
> 
> On Nov 17, 2013, at 6:49 PM, James Harkins <jamshark70@xxxxxxxxx> wrote:
> 
>> On Sunday, November 17, 2013 3:45:38 PM HKT, adam4 wrote:
>>> or make a "variant" in the synthdef, like a preset
>>> 
>>> officially you're supposed to be able to do:
>>> Pbind(\instrument,\zither,\variant,\zitherofdoom,\cutoff, 440, 
>> \modulation,
>>> 0.3,\note, 1)
>> 
>> Personally, I've never found any serious use for variants. I'd file this in the category of features that new users could safely ignore.
>> 
>> Still, about the \variant problem -- I attempted to address this a couple of months ago:
>> 
>> http://thread.gmane.org/gmane.comp.audio.supercollider.devel/59999
>> 
>> .. but other developers were more interested in talking about github and *not even one other person* had a single word to say about the actual subject of the thread. :-|
>> 
>> So, patches for this issue are out there. I had asked for advice on which approach would be better, and... the proverbial resounding thud. So it's still broken.
>> 
>> hjh
>> 
>> _______________________________________________
>> sc-users mailing list
>> 
>> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
> 
> 
> _______________________________________________
> sc-users mailing list
> 
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/