«Swarm of sound files» by Bjørn Houdorf
on 21 Dec'12 16:56 inPut your sound files in the sound file folder. The code plays random sound files panned out in the stereo field. A swarm of sound files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
b = SoundFile.collectIntoBuffers("yourSoundFileFolder/*"); // By Bjørn Houdorf, December 21, 2012 ( { var number = b.numChannels, randomNumber, trigger, delayed, panned, sound, mixedSound, rotatedSound; trigger = Dust.kr(Array.fill(number,1), 1, -0.5); // Generates random impulses from -0.5 to 0.5. as a excitation function randomNumber = TRand.kr(1, number, trigger); sound = PlayBuf.ar(Array.fill(number,1) ,randomNumber,1,trigger,0,0); // play sound files delayed = DelayL.ar(sound, trigger, trigger); // delaying the sound files panned = Pan2.ar(delayed, Array.fill(number,{1.0.rand2})); // pan them out in the stereo field mixedSound = 0.05*Mix.new(panned);// and mix them to one stereo signal rotatedSound = Rotate2.ar(mixedSound[0], mixedSound[1], LFSaw.kr(0.05)); // rotate stereo signal }.play; // play it all )
descendants
full graph
«Re: Swarm of sound files» by foxparse (private)
reception
comments