diff --git a/lilypond/seed_19800725/tkam_score.ly b/lilypond/seed_19800725/tkam_score.ly index ca66906..1ec9031 100644 --- a/lilypond/seed_19800725/tkam_score.ly +++ b/lilypond/seed_19800725/tkam_score.ly @@ -1,4 +1,4 @@ -\version "2.19.83" +\version "2.22.0" #(define (override-color-for-all-grobs color) (lambda (context) @@ -75,7 +75,7 @@ (stretchability . 0)) %systems-per-page = 3 - first-page-number = 1 + first-page-number = 4 print-first-page-number = ##t print-page-number = ##t @@ -137,7 +137,7 @@ (minimum-distance . 20 ) (padding . 0 ) (stretchability . 0)) - \override TextScript.staff-padding = #2 + \override TextScript.staff-padding = #1 \override TextScript.self-alignment-X = #0 } \context { diff --git a/lilypond/seed_19800725/tkam_score.pdf b/lilypond/seed_19800725/tkam_score.pdf index 31fdae0..dab36c5 100644 Binary files a/lilypond/seed_19800725/tkam_score.pdf and b/lilypond/seed_19800725/tkam_score.pdf differ diff --git a/supercollider/tkam_gui.scd b/supercollider/tkam_gui.scd index d55780f..cc665c2 100644 --- a/supercollider/tkam_gui.scd +++ b/supercollider/tkam_gui.scd @@ -243,8 +243,8 @@ masterView = {arg win, preampBusses, accompBusses, postampBusses; faderView = {arg win; var view, masterIndicators, trackIndicators, master, tracks, openButton, basePath, saveButton; - var partAbbr = ["*", "III", "II", "I", "accomp_I", "accomp_II", "click"]; - var trackNames = ["*", "III", "II", "I", "accomp_I", "accomp_II", "click"]; + var partAbbr = ["*", "III", "II", "I", "accomp_II", "accomp_I", "click"]; + var trackNames = ["*", "III", "II", "I", "accomp_II", "accomp_I", "click"]; var partVols, partMutes, partPans; var masterMute, masterVol; diff --git a/supercollider/tkam_musical_data_generator.scd b/supercollider/tkam_musical_data_generator.scd index 0e23276..dca116b 100644 --- a/supercollider/tkam_musical_data_generator.scd +++ b/supercollider/tkam_musical_data_generator.scd @@ -38,7 +38,7 @@ frNearestInList = {arg frComp, frDict; frDict.reject({arg item; (item[\root][0] == frComp[1]) || (item[\fr] == frComp[1]) - }).keys.asList.sort({arg a, b; a.asString < b.asString}).do({arg fr; + }).keys.asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)}).do({arg fr; var diff = abs(frToFloat.value(fr) - frToFloat.value(frComp[0])); if(diff < diffNearest, {diffNearest = diff; frNearest = fr}); }); @@ -82,10 +82,13 @@ hdChoose = {arg mode, exp = 1, weights = [1, 1, 1, 1, 1, 1, 1]; mode.wchoose(probs.normalizeSum) }; -//faster sorting algorithm? -wchooseDict = {arg dict, exp = 1, limit = 0; +wchooseDict = {arg dict, exp = 1, limit = 0, isFR = true; var keyList, probs; - keyList = dict.keys.asList.sort({arg a, b; a.asString < b.asString}); + keyList = if(isFR, { + dict.keys.asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)}); + }, { + dict.keys.asList.sort({arg a, b; a.convertDigits(2) < b.convertDigits(2)}); + }); probs = keyList.collect({arg key; var count = dict[key][\count]; if(count < limit, {0}, {count}) @@ -95,7 +98,7 @@ wchooseDict = {arg dict, exp = 1, limit = 0; }; collectRoots = {arg dict; dict.keys.collect({arg fr; - dict[fr][\root][0]}).asList.sort({arg a, b; a.asString < b.asString}) + dict[fr][\root][0]}).asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)}); }; @@ -192,7 +195,7 @@ genTemporalData = {arg lastTupleState, modeState, cadenceOverride, noParts = 4; cadence = if(collectRoots.value(modeState).size == 1, {cadenceOverride.not}, {false}); curTupleState = lastTupleState.deepCopy; timeToNextEvent = (64 + 50.rand + if(cadence, {50}, {0})).round(16); - tuple = wchooseDict.value(curTupleState); + tuple = wchooseDict.value(curTupleState, isFR: false); if(cadence, {tuple = [1, 1, 1]}); curTupleState = curTupleState.keysValuesDo({arg key, val; curTupleState[key][\count] = val[\count] + 1}); diff --git a/supercollider/tkam_transcriber.scd b/supercollider/tkam_transcriber.scd index 7b01fda..bf3b48e 100644 --- a/supercollider/tkam_transcriber.scd +++ b/supercollider/tkam_transcriber.scd @@ -56,7 +56,7 @@ lyStaffDef = {arg name, nameShort, nameMidi; "\\new Staff = \"" ++ name ++ "\" \\with { \n" ++ "instrumentName = \"" ++ name ++ "\" \n" ++ "shortInstrumentName = \"" ++ nameShort ++ "\" \n" ++ - "midiInstrument = #\"" ++ nameMidi ++ "\"\n" ++ + "midiInstrument = #\"" ++ nameMidi ++ "\" \n" ++ "\n}\n" };