From 0284a4177cea0f2dfb88fce11f7b5a51bc6c53a7 Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Sun, 14 Jan 2024 11:57:06 +0100 Subject: [PATCH] add beatsPerBar --- library/template.scd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/template.scd b/library/template.scd index ac666d8..00b2ebe 100644 --- a/library/template.scd +++ b/library/template.scd @@ -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; -- 2.17.1