beau wrote:Is there any instrument repository, for things like violin, cello, saxophone etc...? Ideally some what realistic sc versions on these instruments that could be controlled via midiI managed to make a half-decent organ sound by filtering pink noise through a bandpass filter and then adding different harmonics. The code I wrote is pasted below (though could do with some more work).It's more of a synthdef generator than a simple synthdef - the harmonic parameters can only be altered during the creation of the synthdef at the moment, not live.
harmMult, harmOffset and harmDecayPower could be made modulatable, if needed - just declare them as arguments. Only numHarm is fixed. You could split the synthdef into single overtones, and then use multichannel expansion on events to even make numHarm variable, but this changes the usage a little.
( // additive filtered noise synth generator. var numHarm = 10, harmMult = 2, harmOffset = 1, harmDecayPower=2;SynthDef.new("miditest", { arg freq = 440, amp = 0.4, out = 0, fwidth = 0.0005, attackTime = 0.01, decayTime= 0.2, sustainLevel= 0.7, releaseTime= 1, peakLevel= 1, curve= 'sine', gate = 1 ;Out.ar(out, Pan2.ar( Mix.fill(numHarm,{ arg index; index.postln; EnvGen.kr(Env.adsr( attackTime, decayTime, sustainLevel, releaseTime, peakLevel, curve), gate, doneAction:2 ) * BBandPass.ar(PinkNoise.ar(amp), freq*(index*harmMult+harmOffset),fwidth,1/(fwidth*((index*harmMult+harmOffset)**harmDecayPower) )) } ), 0.5 ) ); } ).store; ) _______________________________________________ sc-users mailing listinfo (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtmlarchive: 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/