refactor: scenes and morceaux use setTempo
This commit is contained in:
@@ -34,7 +34,7 @@ SynthDef(\cc_acid_kick, { |out=0, amp=0.6|
|
||||
ctx[\cut] = (1 - (hf[\ry] ? 1)).clip(0, 1).linexp(0, 1, 200, 4000);
|
||||
ctx[\res] = (hf[\ropen] ? 0.3).clip(0, 1);
|
||||
ctx[\oct] = ((hf[\ly] ? 0.5) < 0.4).if({ 1 }, { 0 }); // octave up
|
||||
~concert[\clock] !? { |c| c.tempo = speed.linlin(0, 0.6, 124, 140).clip(124, 140) / 60 };
|
||||
~setTempo.(speed.linlin(0, 0.6, 124, 140).clip(124, 140));
|
||||
},
|
||||
tick: { |ctx, pose, beat|
|
||||
var sixteenth = (0.25 / ~ccCtlDur).round.max(1);
|
||||
@@ -52,7 +52,7 @@ SynthDef(\cc_acid_kick, { |out=0, amp=0.6|
|
||||
};
|
||||
};
|
||||
},
|
||||
stop: { |ctx| ~concert[\clock] !? { |c| c.tempo = 126/60 } },
|
||||
stop: { |ctx| ~setTempo.(126) },
|
||||
));
|
||||
"[morceau] Acid Line loaded".postln;
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ SynthDef(\cc_trance_pad, { |out=0, freq1=110, freq2=138, freq3=165, cutoff=1200,
|
||||
ctx[\dens] = 2;
|
||||
ctx[\pad] = Synth(\cc_trance_pad, [\freq1, f1, \freq2, f2, \freq3, f3,
|
||||
\cutoff, 1200, \amp, 0.28]);
|
||||
~concert[\clock] !? { |c| c.tempo = 138 / 60 };
|
||||
~setTempo.(138);
|
||||
},
|
||||
update: { |ctx, pose|
|
||||
var hf = pose[\hands];
|
||||
@@ -92,7 +92,7 @@ SynthDef(\cc_trance_pad, { |out=0, freq1=110, freq2=138, freq3=165, cutoff=1200,
|
||||
},
|
||||
stop: { |ctx|
|
||||
ctx[\pad] !? { |s| s.set(\gate, 0) };
|
||||
~concert[\clock] !? { |c| c.tempo = 126 / 60 };
|
||||
~setTempo.(126);
|
||||
},
|
||||
));
|
||||
"[morceau] Trance loaded".postln;
|
||||
|
||||
@@ -46,7 +46,7 @@ SynthDef(\cc_psy_zap, { |out=0, freq=440, amp=0.18, pan=0|
|
||||
ctx[\cut] = 800.0;
|
||||
ctx[\res] = 0.25;
|
||||
ctx[\zapRate] = 16;
|
||||
~concert[\clock] !? { |c| c.tempo = 145 / 60 };
|
||||
~setTempo.(145);
|
||||
},
|
||||
update: { |ctx, pose|
|
||||
var hf = pose[\hands];
|
||||
@@ -84,7 +84,7 @@ SynthDef(\cc_psy_zap, { |out=0, freq=440, amp=0.18, pan=0|
|
||||
};
|
||||
},
|
||||
stop: { |ctx|
|
||||
~concert[\clock] !? { |c| c.tempo = 126 / 60 };
|
||||
~setTempo.(126);
|
||||
},
|
||||
));
|
||||
"[morceau] Psytrance loaded".postln;
|
||||
|
||||
@@ -54,7 +54,7 @@ SynthDef(\cc_punk_lead, { |out=0, freq=440, amp=0.22, pan=0|
|
||||
ctx[\drv] = 2.0;
|
||||
ctx[\cut] = 2500.0;
|
||||
ctx[\dens] = 2;
|
||||
~concert[\clock] !? { |c| c.tempo = 156 / 60 };
|
||||
~setTempo.(156);
|
||||
},
|
||||
update: { |ctx, pose|
|
||||
var hf = pose[\hands];
|
||||
@@ -95,7 +95,7 @@ SynthDef(\cc_punk_lead, { |out=0, freq=440, amp=0.22, pan=0|
|
||||
};
|
||||
},
|
||||
stop: { |ctx|
|
||||
~concert[\clock] !? { |c| c.tempo = 126 / 60 };
|
||||
~setTempo.(126);
|
||||
},
|
||||
));
|
||||
"[morceau] Punkcore loaded".postln;
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
~concert[\idx] = 0;
|
||||
~ccGState = IdentityDictionary.new;
|
||||
~concert[\clock] = TempoClock.default; // horloge unique (Lot C)
|
||||
~setTempo.(126); // tempo de base concert
|
||||
~concert[\startMorceau].(0);
|
||||
~concert[\routine] = Routine({
|
||||
var beat = 0;
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
if(~bpEngine[\running]) { "[bp] deja en cours".postln } {
|
||||
~bpEngine[\running] = true;
|
||||
~bpEngine[\clock] = TempoClock.default; // horloge unique (Lot C)
|
||||
~setTempo.(100); // tempo de base body-play
|
||||
~bpEngine[\pad] = Synth(\bp_pad, [\freq, ~bpModes[\pulse][\root].midicps, \amp, 0.0]);
|
||||
~bpEngine[\routine] = Routine({
|
||||
var beatCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user