From beb38c5e34a9d6ee9e583ed0b1ff3f6cb5d085b7 Mon Sep 17 00:00:00 2001 From: mwinter Date: Fri, 20 Oct 2023 20:16:14 +0200 Subject: [PATCH] fixing jaendel and transposing jaendel and ammann for live utilities for kali --- live_utilities/supercollider/live_utilities.scd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/live_utilities/supercollider/live_utilities.scd b/live_utilities/supercollider/live_utilities.scd index 1e483b7..282ec6f 100644 --- a/live_utilities/supercollider/live_utilities.scd +++ b/live_utilities/supercollider/live_utilities.scd @@ -94,12 +94,12 @@ s.waitForBoot({ //sine tones for sonification jaendelCreateSynthsForLive = { - SynthDef(\jaendel, {arg freq, col, attack, sustain, decay, del = 5, gate = 1, pan = 0, pIndex = 0; + SynthDef(\jaendel, {arg freq, col, attack, sustain, decay, del = 5, gate = 1, pan = 0, pIndex = 0, out1 = 0, out2 = 1; var env; env = EnvGen.kr(Env.new([0, 1, 1, 0], [attack, sustain, decay], \sin), 1, 1, 0, 1, doneAction: 2); //color is mapped to panning similar to the score which maps to different ways of playing the same note - Out.ar(pIndex * 2, SinOsc.ar(freq, 0, (((col >= 1) * (col <= 1)) + (col >= 3)).lag(0.3) * env * 0.05)); - Out.ar(pIndex * 2 + 1, SinOsc.ar(freq, 0, (col >= 2).lag(0.3) * env * 0.05)); + Out.ar(out1, SinOsc.ar(freq, 0, (((col >= 1) * (col <= 1)) + (col >= 3)).lag(0.3) * env * 0.05)); + Out.ar(out2, SinOsc.ar(freq, 0, (col >= 2).lag(0.3) * env * 0.05)); }).add; }; @@ -194,7 +194,7 @@ s.waitForBoot({ \out, hdpBusArray[i], //\freq, Pseq((55 * r.slice(nil, 2).flatten).cpsmidi.round(0.5).midicps), //\freq, Pseq((55 * r.slice(nil, 2).flatten)) / 8 * pow(2, i), - \freq, Pseq(r.slice(nil, 2).flatten.collect({arg harm; (55 * harm) / 4 * pow(2, i) * pow(2, if(harm < 8, {0}, {0}))})), + \freq, Pseq(r.slice(nil, 2).flatten.collect({arg harm; (55 * (32/27) * harm) / 4 * pow(2, i) * pow(2, if(harm < 8, {0}, {0}))})), \dur, Pseq(r.slice(nil, 0).flat), //this is a bit tricky it makes it so that each note goes to the next @@ -256,11 +256,13 @@ s.waitForBoot({ \group, group, \pIndex, pIndex, \dur, Pseq([Rest(del * durUnit), Pseq([durUnit], inf)]), - \freq, fund * harms[r % if(version == 0, {16}, {8})], + \freq, fund * (32/27) * harms[r % if(version == 0, {16}, {8})], \col, Pseq([0, Pseq(row[start..stop])]), \attack, fade * durUnit, \sustain, (eDur - (fade * 2)) * durUnit, \decay, fade * durUnit, + \out1, hdpBusArray[pIndex * 2], + \out2, hdpBusArray[pIndex * 2 + 1], ) }); };