planting seeds

dev
mwinter 7 months ago
parent eadd9c092f
commit 5c15cc4a03

File diff suppressed because one or more lines are too long

@ -14,7 +14,8 @@ SynthDef(\string_model, {arg freq, gate = 1, del, sustain, amp, dur, attack, rel
(
var primes, hsArrayToFreq, hsArrayDimDiff, file, seq, phraseLengths, musicData, patterns;
thisThread.randSeed = 83924874938;
//thisThread.randSeed = 1954111620240509; //everything in between
thisThread.randSeed = 20240509; //rise yitgadal
primes = [2, 3, 5, 7, 11];
@ -30,7 +31,8 @@ hsArrayDimDiff = {
if(fArray.sum == 0, {1}, {(primes[fArray.abs.indexOf(1) + 1] * fArray.sum)})
};
file = File("/home/mwinter/Sketches/compact_sets/seq_bak.txt".standardizePath,"r");
//file = File("/home/mwinter/Sketches/compact_sets/everything_in_between.txt".standardizePath,"r");
file = File("/home/mwinter/Sketches/compact_sets/rise_yitgadal.txt".standardizePath,"r");
seq = file.readAllString.interpret;
//seq = seq.collect({arg item; item.sort});
@ -137,9 +139,10 @@ musicData = musicData.collect({arg voice, v;
(
// breysheet
var primes, hsArrayToFreq, hsArrayDimDiff, file, seq, durs, chords, phraseLengths, musicData, patterns;
thisThread.randSeed = 83924874938;
thisThread.randSeed = 20240509;
primes = [2, 3, 5, 7, 11, 13];
@ -155,7 +158,7 @@ hsArrayDimDiff = {
if(fArray.sum == 0, {1}, {(primes[fArray.abs.indexOf(1) + 1] * fArray.sum)})
};
file = File("/home/mwinter/Sketches/compact_sets/seq.txt".standardizePath,"r");
file = File("/home/mwinter/Sketches/compact_sets/breysheet.txt".standardizePath,"r");
seq = file.readAllString.interpret;
//seq = seq.collect({arg item; item.sort});
@ -191,7 +194,7 @@ chords.postln;
musicData = chords.flop.collect({arg voice, v;
var phrases, freqs, vDurs, delays, attacks, rels, sustains, amps, refs;
phrases = voice.postln.separate({arg a, b; a != b});
freqs = phrases.postln.collect({arg phrase; if(phrase[0] != ["Rest"], {60.midicps * pow(2, ([1, 1, 1][v]).clip(0, 2)) * hsArrayToFreq.value(phrase[0])}, {Rest(0)})});
freqs = phrases.postln.collect({arg phrase; if(phrase[0] != ["Rest"], {55.midicps * pow(2, ([0, 1, 1][v]).clip(0, 2)) * hsArrayToFreq.value(phrase[0])}, {Rest(0)})});
vDurs = durs.clumps(phrases.collect({arg phrase; phrase.size})).collect({arg c; c.sum});
amps = freqs.collect({rrand(0.6, 0.7) / [2, 2, 3, 2][v]});
[freqs, vDurs, amps].flop;

Loading…
Cancel
Save