/* Instrument inspired from Rob Hordijk's Benjolin, it requires sc3-plugins (PulseDPW, SVF and DFM1)
outSignal: 1-triangle osc1, 2-square osc1, 3-triangle osc2, 4-pulse osc2, 5-XOR output, 6-Filter output
| snippet h "header" | |
| /* | |
| `!v expand('%:t')` | |
| `!v strftime("%Y-%m-%d")` | |
| By: `!v g:snips_author`, `!v g:snips_contact` | |
| */ | |
| endsnippet |
| // boot server | |
| s.boot; | |
| // Init particular | |
| p = Particular.new; | |
| // Load a buffer with sound | |
| b = Buffer.read(s, "~/path/to/sound.wav"); | |
| // Number of outputs, this can be fun play with in patterns |
| // Try live coding this, Balint! Change some parameters and then reevalute | |
| ( | |
| Ndef(\balintthedragon, { | |
| arg buffer, // If you don't set the buffer argument, it will automatically take whatever buffer you have loaded in your server | |
| grainsize=0.5, | |
| rate=0.001, | |
| freqScale=0.25, | |
| volume=1, | |
| rand=0.1; |
| ( | |
| // This will automatically create a bus and map it accordingly in the Pbind | |
| // Try changing each node proxy and listen to the pattern change | |
| // You still have to do all operations to the lfo's data inside of the | |
| // nodeproxies | |
| Ndef(\lfo1, {SinOsc.kr(0.1)}); | |
| Ndef(\mousefreq, {MouseX.kr().exprange(20,12000)}); | |
| Pbind( | |
| \amp, Ndef(\lfo), |
/* Instrument inspired from Rob Hordijk's Benjolin, it requires sc3-plugins (PulseDPW, SVF and DFM1)
outSignal: 1-triangle osc1, 2-square osc1, 3-triangle osc2, 4-pulse osc2, 5-XOR output, 6-Filter output
| /* | |
| The default synth def sound in SC can be tiresome. | |
| You can change it simply by making a new SynthDef called \default which will overwrite the other one. | |
| To make this change permanent, add it to your startup file. | |
| */ | |
| // A simple triangle wave synth in stereo with panning and a simple low pass filter | |
| ( |
| /* | |
| Crazy chaotic notes from SuperCollider meetup november 11th 2019 at Notam | |
| waaaa | |
| */ | |
| // Change default synth: https://www.madskjeldgaard.dk/how-to-change-the-default-synth-in-supercollider/ | |
| // Pbindf + Pkey | |
| ( | |
| Pdef(\henrik, |
| /* | |
| Generate SuperCollider file containing simple random pattern | |
| */ | |
| ( | |
| // Time stamp | |
| ~stamp = Date.getDate.stamp; | |
| // This goes in the duration key of the pattern | |
| ~dur = "Pseq(%)".format(Array.rand(10, 0.1,10.0)); |
| /* | |
| Code from the Quarantine Livestream #2 | |
| A small gui program controlling a pattern | |
| */ | |
| ( | |
| var numSliders = 4; | |
| var numButtons = 2; |
| snippet ofclass "Class for open frameworks" | |
| #include "${1:`!p snip.rv = snip.basename`}.h" | |
| $1::$1(){} | |
| void $1::setup(){${2:}} | |
| void $1::update(){${3:}} | |
| void $1::draw(){${4:}} |