diff --git a/lilypond/cicc_score.ly b/lilypond/cicc_score.ly index da84494..a842f4a 100644 --- a/lilypond/cicc_score.ly +++ b/lilypond/cicc_score.ly @@ -161,8 +161,8 @@ \new SemiStaffGroup { << \new Staff \with { - instrumentName = "oversound" - shortInstrumentName = "oversound" + instrumentName = "high" + shortInstrumentName = "high" midiInstrument = #"clarinet" } << @@ -180,8 +180,8 @@ >> \new Staff \with { - instrumentName = "undersound" - shortInstrumentName = "undersound" + instrumentName = "low" + shortInstrumentName = "low" midiInstrument = #"contrabass" } << diff --git a/supercollider/cicc_gui.scd b/supercollider/cicc_gui.scd index 87c7f28..ec7c6af 100644 --- a/supercollider/cicc_gui.scd +++ b/supercollider/cicc_gui.scd @@ -100,8 +100,8 @@ beat = msg[4]; ~updateTransport.value(measure, beat) }.defer; - },'/measureClock', s.addr); - OSCFunc({ arg msg, time; {metronome.string = ""}.defer},'/measureClockReset', s.addr); + },'/measureClock' ++ ~hash, s.addr); + //OSCFunc({ arg msg, time; {metronome.string = ""}.defer},'/measureClockReset', s.addr); view = View(win); generator = HLayout( @@ -194,10 +194,10 @@ OSCFunc.new({arg msg; { {arg i; masterIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 2}.defer}, - '/masterLevels', s.addr); + '/masterLevels' ++ ~hash, s.addr); OSCFunc.new({arg msg; { {arg i; trackIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 5}.defer}, - '/trackLevels', s.addr); + '/trackLevels' ++ ~hash, s.addr); master = HLayout( VLayout( diff --git a/supercollider/cicc_main.scd b/supercollider/cicc_main.scd index 684ee9e..ff0ede5 100644 --- a/supercollider/cicc_main.scd +++ b/supercollider/cicc_main.scd @@ -9,6 +9,8 @@ appEnvironment.push; s.waitForBoot({ + ~hash = Date.getDate.hash.asString; + // load all files "cicc_musical_data_generator.scd".loadRelative; "cicc_sonifier.scd".loadRelative; diff --git a/supercollider/cicc_musical_data_generator.scd b/supercollider/cicc_musical_data_generator.scd index 5ffba50..f0de671 100644 --- a/supercollider/cicc_musical_data_generator.scd +++ b/supercollider/cicc_musical_data_generator.scd @@ -255,13 +255,12 @@ finalizeAccompHigh = {arg sectionSeq; sectionSeq.do({arg secData, secIndex; var secEnd, freq, noRestCount, shortCount; - secEnd = secData.postln[0]; + secEnd = secData[0]; //freq = if(secType == 0, {62.midicps * 8}, {62.midicps * 8 * 6/5}); freq = if(secIndex.even, {62.midicps * 8}, {62.midicps * 8 * 6/5}); if(secData.last, {secType = ((secType + 1) % 2)}); noRestCount = 0; shortCount = 0; - secIndex.postln; while({timeStamp < secEnd}, { var dur, sus, isShort, insertRest; @@ -356,8 +355,8 @@ finalizeAccompLow = {arg guitarSeq, sectionSeq; initSeq = genInitSeq.value; finalSeqs = finalizeSeqs.value(initSeq); - guitarSeq = finalSeqs[0].postln; - accompHighSeq = finalizeAccompHigh.value(finalSeqs[1].postln.add([finalSeqs[0].slice(nil, 2).sum, -1, false])); + guitarSeq = finalSeqs[0]; + accompHighSeq = finalizeAccompHigh.value(finalSeqs[1].add([finalSeqs[0].slice(nil, 2).sum, -1, false])); accompLowSeq = finalizeAccompLow.value(finalSeqs[0], finalSeqs[1]); sectionSeq = finalSeqs[1]; timeSigSeq = finalSeqs[2]; diff --git a/supercollider/cicc_sonifier.scd b/supercollider/cicc_sonifier.scd index 0c3026d..0f3dd7b 100644 --- a/supercollider/cicc_sonifier.scd +++ b/supercollider/cicc_sonifier.scd @@ -55,10 +55,10 @@ SynthDef(\masterPlayerControl, { imp = Impulse.kr(10); SendReply.kr(imp, - '/masterLevels', + '/masterLevels' ++ ~hash, values: [Amplitude.kr(masterSig)]); SendReply.kr(imp, - '/trackLevels', + '/trackLevels' ++ ~hash, values: [ Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig), @@ -70,8 +70,8 @@ SynthDef(\masterPlayerControl, { SynthDef(\transport, {arg measure = 0, beat = 0, gate = 1, dur = 1; - SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock', values: [measure, beat]); - SendReply.kr(Impulse.kr(0) * (measure < 1) * (beat < 1),'/playNextSubsection'); + SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock' ++ ~hash, values: [measure, beat]); + SendReply.kr(Impulse.kr(0) * (measure < 1) * (beat < 1),'/playNextSubsection' ++ ~hash); EnvGen.kr(Env.sine(dur), gate, doneAction: 2); }).add; @@ -118,7 +118,7 @@ SynthDef(\interludeTremelo, { arg gate = 0, amp = 1; Out.ar(~interludeTremoloBus, fade); }).add; -OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNextSubsection', s.addr); +OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNextSubsection' ++ ~hash, s.addr); //~~~~gen music ~genPatterns = {arg guitarSeqIn, accompLowSeqIn, accompHighSeqIn, sectionSeqIn, beatFrac = 1/8;