Put all of the timing stuff in main

pull/8/head
bombinans 2023-10-07 07:58:14 +11:00
parent bc282aa727
commit fc1b68da06
3 changed files with 12 additions and 5 deletions

View File

@ -27,10 +27,8 @@ OSCdef.freeAll;
~quantharmonics = {
arg f, quantise=0;
quantise.postln;
if(quantise != 0, {
var fraction = f.asFraction(7, false);
[f, fraction].postln;
fraction[0] / fraction[1];
},
{ f }

View File

@ -15,8 +15,16 @@ Routine.run({
~usbinput1 = 2;
~usbinput2 = 3;
~buflen = 4.0;
~bpm = 55;
~bps = ~bpm / 60;
~beatsperbar = 4;
~buflen = ~beatsperbar / ~bps;
[ "bpm", ~bpm ].postln;
[ "buffer length", ~buflen ].postln;
~tc = TempoClock.new(~bps);
~touchosc_ip = "192.168.0.209";
@ -36,3 +44,4 @@ Routine.run({
)

View File

@ -1,8 +1,6 @@
(
~bps = ~beatsperbar / ~buflen;
~tc = TempoClock.new(~bps);
SynthDef(\metronome, {
arg out=0, amp=1, pan=0, filter=1000, atk=0.01, rel=0.1;
@ -32,3 +30,5 @@ SynthDef(\metronome, {
)