add beatsPerBar
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Sun, 14 Jan 2024 10:57:06 +0000 (11:57 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Sun, 14 Jan 2024 10:57:06 +0000 (11:57 +0100)
library/template.scd

index ac666d8..00b2ebe 100644 (file)
@@ -76,9 +76,12 @@ SynthDef(\fagi, { arg
 }).add;
 )
 
-// tempo
+// tempo and meter
 
+(
 TempoClock.tempo = 1.5;
+TempoClock.schedAbs(TempoClock.nextBar, { TempoClock.beatsPerBar_(4) });
+)
 
 // pdefs
 
@@ -87,7 +90,7 @@ TempoClock.tempo = 1.5;
 "~walomaju = %\n".postf(~walomaju);
 )
 
-Pdefn(\fagiDur, Pseq(~walomaju, inf)).quant_(4);
+Pdefn(\fagiDur, Pseq(~walomaju, inf)).quant_(TempoClock.beatsPerBar);
 
 (
 Pdef(\fagi, Pbind(*[
@@ -104,7 +107,7 @@ Pdef(\fagi, Pbind(*[
   note: 0,
   freqStart: Pkey(\freq) / 1,
   freqEnd: Pkey(\freq) / 1,
-])).quant_(4);
+])).quant_(TempoClock.beatsPerBar);
 )
 
 Pdef(\fagi).play;