Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- // Server.local.options.device = "MOTU Traveler";
- Server.local.options.memSize * 128;
- s.boot;
- p=ProxySpace.push(s);
- p.makeTempoClock;
- p.clock.tempo = 2;
- b = Buffer.alloc(s, 44100 * 4.0, 1);
- c = Buffer.alloc(s, 44100 * 4.0, 1);
- e = Buffer.alloc(s, 44100 * 4.0, 1);
- f = Buffer.alloc(s, 44100 * 4.0, 1);
- );
- //voice synthdefs
- (
- SynthDef(\vplay,
- {arg out = 0, buf = 0, rate = 1, amp = 0.5, pan = 0, atk=0.01, rel=1;
- var sig, env;
- sig = Pan2.ar(PlayBuf.ar(1,buf,rate,doneAction:2),pan);
- env = EnvGen.ar(Env.perc(atk,rel));
- sig = sig * env;
- sig = sig * amp;
- Out.ar(out,sig);
- }).add;
- (
- SynthDef(\warp,
- { arg bufnum=0,scroll=0.05,pitch=1,size=0.5, amp = 0.5, gate = 1, pan = 0.02;
- var outArray;
- outArray = Pan2.ar(Warp1.ar(1,bufnum,SinOsc.kr(scroll),pitch,size,interp:2),SinOsc.kr(pan),1);
- Out.ar(0,Linen.kr(gate, 0.01, 0.6, 1.0, doneAction: 2) * outArray * amp);
- }).add;
- );
- //repetition synthdefs
- SynthDef(\bplay,
- {arg out = 0, buf = 0, rate = 1, amp = 0.5, pan = 0;
- var sig;
- sig = Pan2.ar(PlayBuf.ar(1,buf,BufRateScale.ir(buf) * rate,doneAction:2),pan);
- sig = sig * amp;
- Out.ar(out,sig);
- }).add;
- (
- SynthDef(\pmosc,
- {arg freq = 440, freq2 = 440, amp = 0.2, atk = 0.01, rel = 0.3, pmind = 0, out = 0;
- Out.ar(out,PMOsc.ar(freq,freq2,pmind,0,amp) * EnvGen.ar(Env.perc(atk,rel,1),doneAction:2)!2)
- }).add;
- );
- (
- SynthDef(\sinewave,
- {arg freq = 440, freqmod = 1, amp = 0.8, phase = 0, out = 0, atk = 0.01, rel = 0.1;
- Out.ar(out,(SinOsc.ar([freq,freq*freqmod],phase,amp) * EnvGen.ar(Env.perc(atk,rel),doneAction:2)))})
- .add;
- );
- (
- SynthDef(\bufrec, { arg out = 0, bufnum = 0;
- RecordBuf.ar(SoundIn.ar(0), bufnum, doneAction: 2, loop: 0);
- }).add;
- );
- (
- SynthDef(\buflayer, { arg out=0, bufnum=0, rec = 1, pre = 1;
- RecordBuf.ar(SoundIn.ar(0), bufnum, 0, rec, pre, doneAction: 2, loop: 0);
- }).add;
- );
- /////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////
- //The other way is this, adding entire directories of sound to one dictionary key to be polled with an array. This is really simple and I don't know why i didn't know about it before.
- /////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////
- d = Dictionary.new;
- d.add(\k ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/WAVEFORM RECORDINGS_ANALOG KICKS/KICK HITS/SHARP KICK HITS").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- d.add(\h ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/WAVEFORM RECORDINGS - DARK TECHNO/HITS/HATS").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- d.add(\c ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/WAVEFORM RECORDINGS - DARK TECHNO/HITS/CLAPS_SNARES").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- d.add(\p ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/SM White Label - Percussive Techno - Wav/drum hits/perc/").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- d.add(\t ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/SM White Label - Percussive Techno - Wav/drum hits/toms/").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- d.add(\s ->
- PathName("/Users/theseanco/Documents/Sample Library/11 - 'Readymades'/Sample Packs/SM White Label - Percussive Techno - Wav/drum hits/snares/").entries.collect({
- arg sf;
- Buffer.read(s,sf.fullPath);
- });
- );
- );
Add Comment
Please, Sign In to add comment