|
|
@ -98,7 +98,8 @@ SynthDef(\accompBass ++ ~hash, {arg freq1 = 100, freq2 = 100, gate = 1, amp = 0.
|
|
|
|
//this is not releasing properly
|
|
|
|
//this is not releasing properly
|
|
|
|
SynthDef(\accompTreble ++ ~hash, {arg freq, gate = 1, sustain, amp, bus;
|
|
|
|
SynthDef(\accompTreble ++ ~hash, {arg freq, gate = 1, sustain, amp, bus;
|
|
|
|
var treble;
|
|
|
|
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)
|
|
|
|
Out.ar(bus, treble)
|
|
|
|
}).add;
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +172,7 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
|
|
|
|
sectionLimits.collect({arg timePair, secIndex;
|
|
|
|
sectionLimits.collect({arg timePair, secIndex;
|
|
|
|
var startTime, endTime, beatLength, beatSeq, measureSeq,
|
|
|
|
var startTime, endTime, beatLength, beatSeq, measureSeq,
|
|
|
|
guitarSecSeq, accompLowSecSeq, accompHighSecSeq,
|
|
|
|
guitarSecSeq, accompLowSecSeq, accompHighSecSeq,
|
|
|
|
stringSeq, fretSeq, durSeq, susSeq, trigSeq, openStrings, pattern;
|
|
|
|
stringSeq, fretSeq, harmLimit, freqSeq, durSeq, susSeq, trigSeq, openStrings, pattern;
|
|
|
|
|
|
|
|
|
|
|
|
startTime = timePair[0];
|
|
|
|
startTime = timePair[0];
|
|
|
|
endTime = timePair[1];
|
|
|
|
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]]});
|
|
|
|
if(accompHighSecSeq == [], {accompHighSecSeq = [[Rest(-1), 1, 0], [Rest(-1), 1, 0]]});
|
|
|
|
|
|
|
|
|
|
|
|
openStrings = [1/1, 3/2, 2/1, 5/2, 35/12, 7/2];
|
|
|
|
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);
|
|
|
|
stringSeq = guitarSecSeq.slice(nil, 0);
|
|
|
|
fretSeq = guitarSecSeq.slice(nil, 1);
|
|
|
|
fretSeq = guitarSecSeq.slice(nil, 1);
|
|
|
|
durSeq = guitarSecSeq.slice(nil, 2);
|
|
|
|
durSeq = guitarSecSeq.slice(nil, 2);
|
|
|
|
susSeq = calcSustains.value(stringSeq, durSeq);
|
|
|
|
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 = EventPatternProxy.new;
|
|
|
|
pattern.source = Ppar([
|
|
|
|
pattern.source = Ppar([
|
|
|
@ -206,9 +214,7 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
|
|
|
|
\amp, 0.3,
|
|
|
|
\amp, 0.3,
|
|
|
|
\dur, Pseq(durSeq * beatFrac),
|
|
|
|
\dur, Pseq(durSeq * beatFrac),
|
|
|
|
\sustain, Pseq(susSeq * beatFrac),
|
|
|
|
\sustain, Pseq(susSeq * beatFrac),
|
|
|
|
\freq, Pseq(stringSeq.collect({arg string, index;
|
|
|
|
\freq, Pseq(freqSeq),
|
|
|
|
if(string.isRest, {Rest()}, {
|
|
|
|
|
|
|
|
((62.midicps * openStrings[string]).cpsmidi + fretSeq[index]).midicps})})),
|
|
|
|
|
|
|
|
\bus, ~guitarBus.index),
|
|
|
|
\bus, ~guitarBus.index),
|
|
|
|
if(accompLowSecSeq.size > 1, {
|
|
|
|
if(accompLowSecSeq.size > 1, {
|
|
|
|
Pmono(
|
|
|
|
Pmono(
|
|
|
@ -231,7 +237,8 @@ SynthDef(\interludeTremelo ++ ~hash, { arg gate = 0, amp = 1;
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
Pbind(
|
|
|
|
Pbind(
|
|
|
|
\instrument, \accompTreble ++ ~hash,
|
|
|
|
\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),
|
|
|
|
\dur, Pseq(accompHighSecSeq.slice(nil, 1) * beatFrac),
|
|
|
|
\sustain, Pseq(accompHighSecSeq.slice(nil, 2) * beatFrac),
|
|
|
|
\sustain, Pseq(accompHighSecSeq.slice(nil, 2) * beatFrac),
|
|
|
|
\amp, 0.5,
|
|
|
|
\amp, 0.5,
|
|
|
|