2020.06.22.01

main
Michael Winter 4 years ago
parent b349f2b9df
commit 27ca884cf9

@ -98,7 +98,8 @@ SynthDef(\accompBass ++ ~hash, {arg freq1 = 100, freq2 = 100, gate = 1, amp = 0.
//this is not releasing properly
SynthDef(\accompTreble ++ ~hash, {arg freq, gate = 1, sustain, amp, bus;
var treble;
treble = SinOsc.ar(freq, 0, EnvGen.kr(Env.sine(sustain, amp * 0.1), gate, doneAction: 2));
//treble = SinOsc.ar(freq, 0, EnvGen.kr(Env.sine(sustain, amp * 0.1), gate, doneAction: 2));
treble = SinOsc.ar(freq, 0, EnvGen.kr(Env.linen(0.3, 0, 0.7, amp * 0.05, \sine), gate, timeScale: sustain, doneAction: 2));
Out.ar(bus, treble)
}).add;
@ -171,7 +172,7 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
sectionLimits.collect({arg timePair, secIndex;
var startTime, endTime, beatLength, beatSeq, measureSeq,
guitarSecSeq, accompLowSecSeq, accompHighSecSeq,
stringSeq, fretSeq, durSeq, susSeq, trigSeq, openStrings, pattern;
stringSeq, fretSeq, harmLimit, freqSeq, durSeq, susSeq, trigSeq, openStrings, pattern;
startTime = timePair[0];
endTime = timePair[1];
@ -194,10 +195,17 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
if(accompHighSecSeq == [], {accompHighSecSeq = [[Rest(-1), 1, 0], [Rest(-1), 1, 0]]});
openStrings = [1/1, 3/2, 2/1, 5/2, 35/12, 7/2];
harmLimit = [10, 9, 8, 7, 6, 5];
stringSeq = guitarSecSeq.slice(nil, 0);
fretSeq = guitarSecSeq.slice(nil, 1);
durSeq = guitarSecSeq.slice(nil, 2);
susSeq = calcSustains.value(stringSeq, durSeq);
freqSeq = stringSeq.collect({arg string, index;
if(string.isRest, {Rest()}, {
var midi, freq;
midi = (62.midicps * openStrings[string]).cpsmidi + fretSeq[index];
freq = midi.midicps * if((secIndex % 4) != 3, {1}, {[1, harmLimit[string].rand + 1].choose})})
});
pattern = EventPatternProxy.new;
pattern.source = Ppar([
@ -206,9 +214,7 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
\amp, 0.3,
\dur, Pseq(durSeq * beatFrac),
\sustain, Pseq(susSeq * beatFrac),
\freq, Pseq(stringSeq.collect({arg string, index;
if(string.isRest, {Rest()}, {
((62.midicps * openStrings[string]).cpsmidi + fretSeq[index]).midicps})})),
\freq, Pseq(freqSeq),
\bus, ~guitarBus.index),
if(accompLowSecSeq.size > 1, {
Pmono(
@ -231,7 +237,8 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
}),
Pbind(
\instrument, \accompTreble ++ ~hash,
\freq, Pseq(accompHighSecSeq.slice(nil, 0)),
//\freq, Pseq(accompHighSecSeq.slice(nil, 0)),
\freq, Pseq(accompHighSecSeq.slice(nil, 0).curdle(0.3).collect({arg item; item.cpsmidi - 0.16 + 0.32.rand}).midicps.flat),
\dur, Pseq(accompHighSecSeq.slice(nil, 1) * beatFrac),
\sustain, Pseq(accompHighSecSeq.slice(nil, 2) * beatFrac),
\amp, 0.5,

@ -60,7 +60,7 @@
musicData = musicData.collect({arg partData, p;
var lastSectionSize, lastSectionSizeTrunc, finalSectionSize, ext;
partData[(partData.size - 10)..];
//partData[(partData.size - 10)..];
lastSectionSize = (maxSize - sectionData.last[0]);
lastSectionSizeTrunc = lastSectionSize.trunc(16);
finalSectionSize = if(lastSectionSize != lastSectionSizeTrunc, {lastSectionSizeTrunc + 16}, {lastSectionSize});
@ -215,7 +215,7 @@
//duration
lilyDur = switch(noteLength, 1, {"16 "}, 2, {"8 "}, 3, {"8. "}, 4, {"4 "});
//append rest directive
lilyRest = "";
//lilyRest = "";
lilyGString = if(((group[0] != lastVal) && (p == 0)), {
var stringString, fretString;
stringString = ["VI ", "V ", "IV ", "III ", "II ", "I "][group[0][0]];

Loading…
Cancel
Save