major cleanup / redo of the beginning

dev
mwinter 7 months ago
parent 159e769bc3
commit eadd9c092f

File diff suppressed because one or more lines are too long

@ -30,7 +30,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/seq_bak.txt".standardizePath,"r");
seq = file.readAllString.interpret;
//seq = seq.collect({arg item; item.sort});
@ -191,9 +191,9 @@ 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"], {45.midicps * pow(2, ([0, 1, 1][v]).clip(0, 2)) * hsArrayToFreq.value(phrase[0])}, {Rest(0)})});
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)})});
vDurs = durs.clumps(phrases.collect({arg phrase; phrase.size})).collect({arg c; c.sum});
amps = freqs.collect({rrand(0.6, 0.7) / [1, 2, 2, 2][v]});
amps = freqs.collect({rrand(0.6, 0.7) / [2, 2, 3, 2][v]});
[freqs, vDurs, amps].flop;
});
@ -204,10 +204,10 @@ musicData = chords.flop.collect({arg voice, v;
var freqs, durs, attacks, delays, sustains, rels, amps;
# freqs, durs, amps = voice.flop;
//# durs, attacks, delays, sustains, rels = [durs, attacks, delays, sustains, rels].collect({arg data; data / 16});
durs = durs * 16;
durs = durs;
durs.postln;
rels = (durs / 2).clip(0, 3);
attacks = (durs / 2).clip(0, 3);
rels = (durs / 2).clip(0, 0.01);
attacks = (durs / 2).clip(0, 0.05);
sustains = durs - rels;
Pbind(
\instrument, \string_model,

Loading…
Cancel
Save