From a4575033884309defbd7e68c27531b59fceb4ed6 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Tue, 23 Jun 2020 22:56:41 -0400 Subject: [PATCH] 2020_06_23_01 --- supercollider/cicc_musical_data_generator.scd | 4 ++-- supercollider/cicc_transcriber.scd | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/supercollider/cicc_musical_data_generator.scd b/supercollider/cicc_musical_data_generator.scd index 7cad402..27ae296 100644 --- a/supercollider/cicc_musical_data_generator.scd +++ b/supercollider/cicc_musical_data_generator.scd @@ -362,11 +362,11 @@ finalizeAccompLow = {arg guitarSeq, sectionSeq; accompLowSeq }; -~genMusicData = { +~genMusicData = {arg seed; var initSeq, finalSeqs, guitarSeq, accompHighSeq, accompLowSeq, sectionSeq, timeSigSeq, patterns, scoreData, sectionOffsets; - initSeq = genInitSeq.value; + initSeq = genInitSeq.value(seed); finalSeqs = finalizeSeqs.value(initSeq); guitarSeq = finalSeqs[0]; accompHighSeq = finalizeAccompHigh.value(finalSeqs[1].deepCopy.add([finalSeqs[0].slice(nil, 2).sum, -1, false])); diff --git a/supercollider/cicc_transcriber.scd b/supercollider/cicc_transcriber.scd index f51392b..f1294fc 100644 --- a/supercollider/cicc_transcriber.scd +++ b/supercollider/cicc_transcriber.scd @@ -8,6 +8,7 @@ basePath = ~dir +/+ ".." +/+ "lilypond" +/+ "seed_" ++ seed; basePath.mkdir; + (basePath +/+ "includes").mkdir; scoreFile = File(basePath +/+ "cicc_score.ly".standardizePath,"w"); //File.readAllString(basePath +/+ ".." +/+ "templates" +/+ "cicc_score_template.ly").postln; @@ -39,7 +40,7 @@ dur = item[1]; sus = item[2]; note = sus.collect({[freq, i]}); - if(p < rawMusicData.size, {rest = (dur - sus).collect({[-1, i]})}, {[]}); + rest = if(p < rawMusicData.size, {(dur - sus).collect({[-1, i]})}, {[]}); }, 2, { var freq1, freq2, dur, sus; @@ -48,7 +49,7 @@ dur = item[2]; sus = 4; note = sus.collect({[[freq1, freq2 - freq1], i]}); - if(p < rawMusicData.size, {rest = (dur - sus).collect({[-1, i]})}, {[]}); + rest = if(p < rawMusicData.size, {(dur - sus).collect({[-1, i]})}, {[]}); } ); note ++ rest