This file contains hidden or 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
| postln("stereoize hello"); | |
| s = Server.default; | |
| s.waitForBoot { | |
| r = Routine { | |
| // note that the bands here are not phase-corrected... | |
| SynthDef.new(\splitDelay, { |
This file contains hidden or 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_AmpPollTest : CroneEngine { | |
| var <synth; | |
| *new { arg context, doneCallback; | |
| ^super.new(context, doneCallback); | |
| } | |
| alloc { | |
| synth = SynthDef.new(\amp_poll_test, { | |
| arg out=0, amp=0.125, which = 0; |
This file contains hidden or 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.default; | |
| s.waitForBoot { | |
| r = Routine { | |
| SynthDef.new(\sine_pair_perc, { | |
| var hz = \hz.kr(200); | |
| var beatrate = \beatrate.kr(2); | |
| var beatrate_2 = beatrate/2; | |
| var amp = \amp.kr(-30.dbamp); |
This file contains hidden or 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
| local timber = include("timber/lib/timber_engine") | |
| engine.name = "Timber" | |
| local sample_paths = { | |
| _path.audio .. "/common/808/808-BD.wav", | |
| _path.audio .. "/common/808/808-SD.wav" | |
| } | |
| function init() | |
This file contains hidden or 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
| n = 1000; | |
| m = 20; | |
| d = 0.1; | |
| a = 0.1 / n; | |
| h = Array.newClear(m); | |
| s.waitForBoot { Routine { | |
| i = 0; |
This file contains hidden or 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
| SimpleStereoCapture { | |
| classvar <bufSize; | |
| classvar <synth; | |
| classvar <buf; | |
| classvar <oscFunc; | |
| *initClass { | |
| var s = Server.default; |
This file contains hidden or 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.default; | |
| s.waitForBoot { Routine { | |
| SynthDef.new(\pan_pulse, { | |
| var pos = Line.ar(\pos.kr(0), 0, \dur.kr(5)); | |
| var snd = Pulse.ar(\hz.kr(110)); | |
| snd = Pan2.ar(snd * \amp.kr(0.1), pos); | |
| Out.ar(\out.kr(0), snd); | |
| }).send(s); |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| // generate uniformly distributed random number in [0, 1] | |
| float rand_float() { | |
| return (float)rand() / RAND_MAX; | |
| } | |
| const int NORM_APPROX_STAGES = 12; |
This file contains hidden or 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
| // demo: weighted random sampling from a discrete distribution, with replacement | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| typedef int value_t; // value | |
| typedef double weight_t; // probability weight | |
| struct bin_data { |
This file contains hidden or 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.name = 'PolyPerc' | |
| local sync_first = true | |
| function key(n,z) | |
| if n == 3 and z == 1 and not transport_running then | |
| print("starting link") | |
| clock.link.start() -- start Link clock | |
| elseif n == 3 and z == 1 and transport_running then | |
| print("stopping link") |