This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-- top level sound directory | |
d = (thisProcess.platform.recordingsDir ++ "/ftrack/").standardizePath; | |
//-- dictionary associating subdir names to path arrays | |
p = Dictionary.new; | |
PathName(d).folders.do({ |f| p.add(f.folderName.asSymbol -> f.files); }); | |
//-- runtime state stored in this Event | |
e = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = Server.local; | |
s.waitForBoot { | |
~bufsize = s.sampleRate; | |
~graphsize = ~bufsize / 100; | |
~buf = Buffer.alloc(s, ~bufsize, 1); | |
~in = { RecordBuf.ar(SoundIn.ar(0), ~buf.bufnum); }.play; | |
~delta = 0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// testing audible differences between VOsc.ar and Osc.ar under frequency/phase modulation | |
// press '1' to hear VOsc, '2' to hear Osc | |
// drag mouse on window to change mod hz and depth | |
// VOsc is set to interpolate between identical sine buffers | |
Routine { | |
SynthDef.new(\vosc_test, { | |
arg out=0, buf=0, amp=0.25, hz_car=240, hz_mod=60, mod_idx=1.0, fade=0.0; | |
var mod, car; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routine { | |
/* // continuous white noise | |
~noise = { arg out=1, amp=0.125; Out.ar(out, WhiteNoise.ar * amp) }.play; | |
~noise.free; | |
*/ | |
SynthDef.new(\ping_noise_decay, { | |
arg out=1, amp=0.25, atk=0.0, rel=0.001; | |
Out.ar(out, | |
WhiteNoise.ar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CfGridRaw { | |
var <>p; // serial port | |
var <>q; // rx data queue | |
var <>r; // rx read loop | |
// responder functions | |
var <>keyUp, <>keyDown; | |
*new { arg port_ = '/dev/ttyUSB0', baud_ = 115200; | |
^super.new.init(port_, baud_); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function to make a sine | |
var export_sine = { | |
arg hz, dur, amp = 0.5, sr = 48000; | |
var sf, path; | |
var cycles = dur * hz; | |
var samplesPerCycle = sr / hz; | |
// specify some other array of harmonics here for richer waveforms | |
var signal = Signal.sineFill(samplesPerCycle, [1.0]) * amp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Engine_SimplePassThru : CroneEngine { | |
var amp=0; | |
var <synth; | |
// this is your constructor. the 'context' arg is a CroneAudioContext. | |
// it provides input and output busses and groups. | |
// see its implementation for details. | |
*new { arg context, doneCallback; | |
^super.new(context, doneCallback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routine { | |
s = Server.default; | |
s.waitForBoot; | |
// bark band table. | |
// each entry: [bark number, cutoff, center, bandwidth] | |
~bark = [ | |
[ 1, 60, 100, 80 ], | |
[ 2, 150, 200, 100 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routine { | |
s = Server.default; | |
s.waitForBoot; | |
// max buffer duration | |
~dur = 8.0; | |
// 4-channel buffer: pitch, clar, amp, flatness | |
~buf = Buffer.alloc(s, s.sampleRate * ~dur, 4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// outlets: input index, output index, connection value | |
outlets = 3; | |
sketch.default2d(); | |
// I/O count, should be an argument | |
var num_ins = 4; | |
var num_outs = 4; | |
// mouse state (world coordinates) |
OlderNewer