diff --git a/lilypond/pseudoindent.ly b/lilypond/cicc_pseudoindents_def.ly similarity index 100% rename from lilypond/pseudoindent.ly rename to lilypond/cicc_pseudoindents_def.ly diff --git a/lilypond/counterfeit_in_colonial_connecticut_score.ly b/lilypond/cicc_score.ly similarity index 99% rename from lilypond/counterfeit_in_colonial_connecticut_score.ly rename to lilypond/cicc_score.ly index a968005..da84494 100644 --- a/lilypond/counterfeit_in_colonial_connecticut_score.ly +++ b/lilypond/cicc_score.ly @@ -1,6 +1,6 @@ \version "2.19.81" -\include "pseudoindent.ly" +\include "cicc_pseudoindents_def.ly" #(define factor 2) diff --git a/lilypond/counterfeit_in_colonial_connecticut_score.midi b/lilypond/cicc_score.midi similarity index 100% rename from lilypond/counterfeit_in_colonial_connecticut_score.midi rename to lilypond/cicc_score.midi diff --git a/lilypond/counterfeit_in_colonial_connecticut_score.pdf b/lilypond/cicc_score.pdf similarity index 81% rename from lilypond/counterfeit_in_colonial_connecticut_score.pdf rename to lilypond/cicc_score.pdf index ce5d531..43900c4 100644 Binary files a/lilypond/counterfeit_in_colonial_connecticut_score.pdf and b/lilypond/cicc_score.pdf differ diff --git a/lilypond/includes/cicc_high.ly b/lilypond/includes/cicc_high.ly index 593f54e..fbff20a 100644 --- a/lilypond/includes/cicc_high.ly +++ b/lilypond/includes/cicc_high.ly @@ -111,7 +111,7 @@ { \set Score.markFormatter = #format-mark-box-numbers \tempo 2 = 90 \numericTimeSignature \time 2/2 - \clef "treble^8" + \clef "treble^(8)" \bar "||" \mark \markup { \bold \box 1.1 } \time 2/2 f''''1 ~ | f''''1 | r8 [ f''''8 ] ~ f''''2. ~ | f''''1 ~ | f''''1 ~ | f''''1 ~ | f''''1 ~ | f''''1 ~ | f''''4 ~ f''''8 [ r8 ] r2 | r2. r8 [ f''''8 ] ~ | f''''1 ~ | f''''1 | R1 | r2. f''''4 ~ | f''''1 ~ | f''''1 ~ | f''''8 [ r8 ] f''''2. ~ | f''''1 ~ | f''''4 r2. | R1 | diff --git a/lilypond/includes/cicc_low.ly b/lilypond/includes/cicc_low.ly index 76c1a82..5f39622 100644 --- a/lilypond/includes/cicc_low.ly +++ b/lilypond/includes/cicc_low.ly @@ -111,7 +111,7 @@ { \set Score.markFormatter = #format-mark-box-numbers \tempo 2 = 90 \override Staff.TimeSignature #'stencil = ##f \numericTimeSignature \time 2/2 - \clef bass + \clef "bass_(8)" \bar "||" \mark \markup { \bold \box 1.1 } \time 2/2 <<{ d,4 \laissezVibrer ^ \markup{ 0.0 } }\\ {\new Voice { \voiceTwo d,4 \laissezVibrer }}>> \oneVoice r2. | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | R1 | diff --git a/supercollider/cicc_gui.scd b/supercollider/cicc_gui.scd index a65e49b..87c7f28 100644 --- a/supercollider/cicc_gui.scd +++ b/supercollider/cicc_gui.scd @@ -30,13 +30,14 @@ win = Window("Counterfeiting in Colonial Connecticut", Rect(500, 500, 1100, 500), false).front; masterView = { - var view, generator, transport, ranSeed, order, sectionDisplay, clock, metronome; + var view, generator, transport, ranSeed, order, tempo, sectionDisplay, clock, metronome; // this func updates the whole transport panel ~updateTransport = {arg measure, beat; clock.string = clockStringFunc.value(measure, beat); metronome.stringColor = metronomeColorFunc.value(beat); metronome.string = metronomeStringFunc.value(beat); + fork {0.75.wait; {metronome.string = ""}.defer}; }; // this func handles the movement between sections @@ -72,15 +73,15 @@ ~play.set(\sel, ~currentSection % 2); ~patterns[~sectionOrder[~currentSection]].play(quant: 0); if(~interludes && ((~currentSection % 4) == 3) && (~currentSection != (~sectionOrder.size - 1)), { - ~droneFade.set(\gate, 1); - ~dronePattern.play(quant: 0) + ~interludeTremelo.set(\gate, 1); + ~interludeTremelo.set(\amp, 1); }); if((~currentSection % 4) == 0, { - ~droneFade.set(\gate, 0); + ~interludeTremelo.set(\gate, 0); }); if(((~currentSection % 4)) != 0 && ((~currentSection % 4) != 3), { - ~droneFade.set(\gate, 0); - ~dronePattern.stop + ~interludeTremelo.set(\gate, 0); + ~interludeTremelo.set(\amp, 0); }); }, { var measure, beat; @@ -119,20 +120,31 @@ var measure, beat; ~isPlaying = false; ~patterns[~sectionOrder[~currentSection]].stop; - ~droneFade.set(\gate, 0); + ~interludeTremelo.set(\gate, 0); measure = ~sectionStartMeasure[~currentSection]; beat = 1; ~updateTransport.value(measure, beat); - ~droneFade.set(\gate, 0); - ~dronePattern.stop + ~interludeTremelo.set(\gate, 0); + ~interludeTremelo.set(\amp, 0); },{ - ~isPlaying = true; - ~play.set(\sel, ~currentSection % 2); - ~patterns[~sectionOrder[~currentSection]].play(quant: 0); - if(~interludes && ((~currentSection % 4) == 3) && (~currentSection != (~sectionOrder.size - 1)), { - ~droneFade.set(\gate, 1); - ~dronePattern.play(quant: 0) - }); + fork { + [1, 2, 1, 2].do({arg beat; + { + metronome.stringColor = metronomeColorFunc.value(beat); + metronome.string = metronomeStringFunc.value(beat); + }.defer; + 0.75.wait; + {metronome.string = ""}.defer; + 0.25.wait; + }); + ~isPlaying = true; + ~play.set(\sel, ~currentSection % 2); + ~patterns[~sectionOrder[~currentSection]].play(quant: 0); + if(~interludes && ((~currentSection % 4) == 3) && (~currentSection != (~sectionOrder.size - 1)), { + ~interludeTremelo.set(\gate, 1); + ~interludeTremelo.set(\amp, 1); + }); + } }) } ), @@ -145,13 +157,17 @@ StaticText(win).string_("|").font_(Font("Monaco", 200)), metronome = StaticText(win).string_([-30, -105, -104].asAscii).font_(Font("Monaco", 300)).stringColor_(Color.red)), nil, transport, nil, - HLayout(Button(view).states_([["auto advance", Color.black], ["auto advance", Color.black, Color.grey]]).action_({ - arg v; ~autoAdvance = if(v.value == 0, {false}, {true});~autoAdvance; - }).value_(1), - Button(view).states_([["interludes", Color.black], ["interludes", Color.black, Color.grey]]).action_({ - arg v; ~interludes = if(v.value == 0, {false}, {true}) - }), - [StaticText(view).string_(" "), stretch: 1]), + HLayout( + tempo = TextField(view).string_("90"), + Button(view).states_([["set tempo"]]).action_({TempoClock.tempo = tempo.string.asInteger / 60}), + StaticText(view).string_(" | "), + Button(view).states_([["auto advance", Color.black], ["auto advance", Color.black, Color.grey]]).action_({ + arg v; ~autoAdvance = if(v.value == 0, {false}, {true});~autoAdvance; + }).value_(1), + Button(view).states_([["interludes", Color.black], ["interludes", Color.black, Color.grey]]).action_({ + arg v; ~interludes = if(v.value == 0, {false}, {true}) + }), + [StaticText(view).string_(" "), stretch: 1]), [StaticText(view).string_(" "), stretch: 1], HLayout( order = TextField(view).string_("1-4"), diff --git a/supercollider/cicc_main.scd b/supercollider/cicc_main.scd index b9d910d..684ee9e 100644 --- a/supercollider/cicc_main.scd +++ b/supercollider/cicc_main.scd @@ -27,10 +27,11 @@ s.waitForBoot({ }; // set the global variables + TempoClock.tempo = 90 / 60; ~dir = thisProcess.nowExecutingPath.dirname; ~genAll.value(20200525); ~play = Synth.new(\masterPlayerControl); - ~droneFade = Synth.new(\droneFade); + ~interludeTremelo = Synth.new(\interludeTremelo); ~autoAdvance = true; ~interludes = false; ~sectionOrder = ~patterns.size.collect({arg sec; sec}); diff --git a/supercollider/cicc_musical_data_generator.scd b/supercollider/cicc_musical_data_generator.scd index bf76c6d..5ebe1cc 100644 --- a/supercollider/cicc_musical_data_generator.scd +++ b/supercollider/cicc_musical_data_generator.scd @@ -371,183 +371,4 @@ finalizeAccompLow = {arg guitarSeq, sectionSeq; [patterns, scoreData, sectionOffsets] }; -) - - -/* -~player[0].play; - -( -~player = EventPatternProxy.new; -~faderPattern = Pmono( - \crossFade, - \sel, Pseq([0, 1], ~sectionOffsets / 2), - \dur, Pseq(~sectionOffsets.differentiate.drop(1) * 0.08), - \busA, ~busA.index, - \busB, ~busB.index - ); -~fader = Synth(\crossFade, [\sel, 0, \busA, ~busA.index, \busB, ~busB.index]); -~player.source = Ptpar( - ([~sectionOffsets.postln * 0.08, ~patterns].flop.flat ++ [0, ~faderPattern]).postln -); -) -~fader.play -~player.play -( -~fader.set(\sel, 1); -~patterns[3].play -) - -~fader = Synth(\crossFade, [\sel, 1, \busA, ~busA.index, \busB, ~busB.index]); -( -~patterns[3].play; -~testDrone = Synth.new(\droneOut, [\gate, 1, \bus, ~droneBus.index]); -//~testDrone.set(\gate, 0); -~dronePattern.play -) - - -( -~player.source = Ptpar([~sectionOffsets.postln * 0.08, - ~patterns.collect({arg pt, i; - if(i < (~patterns.size - 1), { - PfadeOut(pt, 0.1, (~sectionOffsets.differentiate.drop(1)[i] * 0.08) - 0.1) - }, { - pt - }) -})].flop.flat.postln); -) -~sectionOffsets.differentiate.postln; -~player.play -PfadeOut(~patterns[2], 0.1, (~sectionOffsets.differentiate.drop(1)[2] * 0.08) - 0.1).play -PfadeOut(~player[0]).play; -Pdef(\play, ~player[0]).play; -Pdef(\play, ~player[1]) -~player[2].play; -~player.pause; - - -( -var durUnit = 0.15; - -SynthDef(\machine, {arg freq, gate = 1, sustain, amp; - var sound; - sound = TWChoose.ar(Impulse.kr(0), [ - PinkNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 10), gate, doneAction: 2)), - BrownNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 2), gate, doneAction: 2)) - ], [0, 20], 1); - Out.ar([0, 1], sound) -}).add; - -~machine1 = Pbind( - \instrument, \machine, - \amp, Pseq(300.collect({var rand = [0.03, 0].choose; (20.rand + 10).rand.collect({rand})}).flat), - \dur, Pseq(1000.collect({[durUnit, durUnit + (durUnit / 100).rand2].wchoose([10, 1].normalizeSum)}).flat), - \sustain, Pseq(1000.collect({durUnit * (1.75 + 0.5.rand)})),//2.25].wchoose([1, 20].normalizeSum)})), - \freq, Pseq(1000.collect({[[300, 250], [300, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2) -).play; -) - -~machine1.play; -~machine1.stop; - - -( -var durUnit = 0.02; -b = Bus.audio(s, 1); - -SynthDef(\test, { arg out=0, freq=440, amp=0.1, pan=0, gate=1; - var z; - z = LPF.ar( - Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3, 0.3)), - XLine.kr(Rand(4000,5000), Rand(2500,3200), 1) - ) * Linen.kr(gate, 0.01, 0.7, 0.3, 2); - Out.ar(b, Pan2.ar(z, pan, amp)); -}, [\ir]).add; - -SynthDef(\defaultBus, {arg gate; - Out.ar([0, 1], Clip.ar(In.ar(b, 1), -1, 1) * 0.25 * EnvGen.ar(Env.asr(20, 1, 20), gate)) -} -).add; - -Pbind( - \instrument, \test, - \amp, 0.5, - \dur, durUnit, - \sustain, 0.05, - \freq, Pseq(3000.collect({[[62.midicps, 250], [62.midicps, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2) -).play; - -~testDrone = Synth.new(\defaultBus, [\gate, 1]); -) - -~testDrone.set(\gate, 0); - - -( -var durUnit = 0.02; -b = Bus.audio(s, 1); - -SynthDef(\test, { arg out=0, freq=440, amp=0.1, pan=0, gate=1; - var z; - z = LPF.ar( - Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3, 0.3)), - XLine.kr(Rand(4000,5000), Rand(2500,3200), 1) - ) * Linen.kr(gate, 0.01, 0.7, 0.3, 2); - Out.ar(b, Pan2.ar(z, pan, amp)); -}, [\ir]).add; - -SynthDef(\defaultBus, { - Out.ar([0, 1], Clip.ar(In.ar(b, 1), -1, 1) * 0.25) -} -).add; - -Pbind( - \instrument, \test, - \amp, Pseq(3000.collect({arg i; (i / 3000).clip(0, 1) * 0.5})), - \dur, durUnit, - \sustain, 0.05, - \freq, Pseq(3000.collect({[[62.midicps, 250], [62.midicps, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2) -).play; - -Synth.new(\defaultBus) -) - - -( -var durUnit = 0.15; - -SynthDef(\machine, {arg freq, gate = 1, sustain, amp; - var sound; - sound = TWChoose.ar(Impulse.kr(0), [ - PinkNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 10), gate, doneAction: 2)), - BrownNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 2), gate, doneAction: 2)) - ], [0, 20], 1); - Out.ar([0, 1], sound) -}).add; - -~machine1 = Pseq( - 10.collect({ - var randL, randLArray, amp, durUnitSMult, durUnitSMultLimit, hitsToClip; - randL = 30.rand + 30; - randLArray = (0..randL) ++ (0..(randL-1)).reverse; - amp = [0.1, 0].wchoose([2, 1].normalizeSum); - durUnitSMult = 2 + 1.0.rand; - durUnitSMultLimit = (durUnitSMult - 1) + 0.5.rand; - hitsToClip = 3 + 3.rand; - - Pseq([Pbind( - \instrument, \machine, - \amp, 0.1, - \dur, Pseq(randLArray.collect({arg i; durUnit * (durUnitSMult - ((i / hitsToClip).clip(0, durUnitSMultLimit)))})), - \sustain, Pseq(randLArray.size.collect({durUnit * (1.75 + 0.5.rand)})),//2.25].wchoose([1, 20].normalizeSum)})), - \freq, Pseq(randLArray.size.collect({[[300, 250], [300, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2) - ),Rest(3.rand + 5) - ]) - }), inf -).play; -) - -62.midicps - -*/ \ No newline at end of file +) \ No newline at end of file diff --git a/supercollider/cicc_sonifier.scd b/supercollider/cicc_sonifier.scd index efd9899..0c3026d 100644 --- a/supercollider/cicc_sonifier.scd +++ b/supercollider/cicc_sonifier.scd @@ -7,8 +7,7 @@ ~accompLowUpperBusA = Bus.audio(s, 1); ~accompLowLowerBusB = Bus.audio(s, 1); ~accompLowUpperBusB = Bus.audio(s, 1); -~interludeBus = Bus.audio(s, 1); -~droneBus = Bus.audio(s, 1); +~interludeTremoloBus = Bus.audio(s, 1); SynthDef(\masterPlayerControl, { arg sel = 0, @@ -16,9 +15,10 @@ SynthDef(\masterPlayerControl, { guitarVol = 1, guitarPan = 0, guitarMute = 1, accompHighVol = 1, accompHighPan = 0, accompHighMute = 1, accompLowLowerVol = 1, accompLowLowerPan = 0, accompLowLowerMute = 1, - accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1; - var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig, - guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned, + accompLowUpperVol = 1, accompLowUpperPan = 0, accompLowUpperMute = 1, + interludeVol = 1, interludePan = 0, interludeMute = 1; + var guitarSig, accompHighSig, accompLowLowerSig, accompLowUpperSig, interludeSig, + guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned, interludeSigPanned, masterSig, imp; guitarSig = In.ar(~guitarBus) * guitarVol; @@ -35,12 +35,21 @@ SynthDef(\masterPlayerControl, { In.ar(~accompLowUpperBusB) * EnvGen.kr(Env.asr(0.001, 1, 0.1), sel) ] ) * accompLowUpperVol; + interludeSig = In.ar(~interludeTremoloBus) * interludeVol; guitarSigPanned = Pan2.ar(guitarSig * guitarMute, guitarPan); accompHighSigPanned = Pan2.ar(accompHighSig * accompHighMute, accompHighPan); accompLowLowerSigPanned = Pan2.ar(accompLowLowerSig * accompLowLowerMute, accompLowLowerPan); accompLowUpperSigPanned = Pan2.ar(accompLowUpperSig * accompLowUpperMute, accompLowUpperPan); - masterSig = Mix.ar([guitarSigPanned, accompHighSigPanned, accompLowLowerSigPanned, accompLowUpperSigPanned]) * masterVol * masterMute; + interludeSigPanned = Pan2.ar(interludeSig * interludeMute, interludePan); + masterSig = Mix.ar( + [ + guitarSigPanned, + accompHighSigPanned, + accompLowLowerSigPanned, + accompLowUpperSigPanned, + interludeSigPanned + ]) * masterVol * masterMute; Out.ar(0, masterSig); @@ -54,7 +63,7 @@ SynthDef(\masterPlayerControl, { [ Amplitude.kr(guitarSig), Amplitude.kr(accompHighSig), Amplitude.kr(accompLowLowerSig), Amplitude.kr(accompLowUpperSig), - DC.ar(0) + Amplitude.kr(interludeSig) ] ); }).add; @@ -62,7 +71,6 @@ SynthDef(\masterPlayerControl, { SynthDef(\transport, {arg measure = 0, beat = 0, gate = 1, dur = 1; SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock', values: [measure, beat]); - SendReply.kr(TDelay.kr(Impulse.kr(0) * (measure > 0) * (beat > 0), 0.25),'/measureClockReset'); SendReply.kr(Impulse.kr(0) * (measure < 1) * (beat < 1),'/playNextSubsection'); EnvGen.kr(Env.sine(dur), gate, doneAction: 2); }).add; @@ -94,38 +102,26 @@ SynthDef(\accompTreble, {arg freq, gate = 1, sustain, amp, bus; Out.ar(bus, treble) }).add; - -SynthDef(\drone, { arg out=0, freq=440, amp=0.1, pan=0, gate=1, bus; - var z; - z = LPF.ar( - Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3, 0.3)), - XLine.kr(Rand(4000,5000), Rand(2500,3200), 1) - ) * Linen.kr(gate, 0.01, 0.7, 0.3, 2); - Out.ar(bus, Pan2.ar(z, pan, amp)); -}, [\ir]).add; - - -SynthDef(\droneFade, {arg gate = 0; - Out.ar([0, 1], Clip.ar(In.ar(~droneBus, 1), -1, 1) * 0.1 * EnvGen.ar(Env.asr(20, 1, 20), gate)) +SynthDef(\interludeTremelo, { arg gate = 0, amp = 1; + var tremeloTrig, freq, sig, feedback, fade; + //fast tremelo - note that this can be slower so long as the delaytime of the feedback remains short + tremeloTrig = Impulse.kr(50); + //tremelo between two notes + freq = Select.kr(Stepper.kr(tremeloTrig, 0, 0, 1), [62.midicps, 62.midicps * 5/6]); + //occasionally tremelo on same note + freq = Select.kr(TWChoose.kr(Dust.kr(10), [0, 1, 2], [5, 1, 1], 1), [freq, 62.midicps, 62.midicps * 5/6]) / 2; + //generate signal + sig = VarSaw.ar(freq, 0, 0.3, 0.1) * EnvGen.kr(Env.perc(0.01, 0.1), tremeloTrig); + //feedback + feedback = CombC.ar(sig, 0.2, 50.reciprocal, 5); + fade = feedback * EnvGen.ar(Env.asr(20, 1, 20), gate) * amp; + Out.ar(~interludeTremoloBus, fade); }).add; - -~dronePattern = EventPatternProxy.new; -~dronePattern.source = Pbind( - \instrument, \drone, - \amp, 0.5, - \dur, 0.02, - \sustain, 0.05, - //\freq, Pseq(3000.collect({[[62.midicps, 250], [62.midicps, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2), - \freq, Pwrand([[62.midicps, 250], Prand([62.midicps, 250], inf)], [10, 1].normalizeSum, inf) / 2, - \bus, ~droneBus.index -); - - OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNextSubsection', s.addr); //~~~~gen music -~genPatterns = {arg guitarSeqIn, accompLowSeqIn, accompHighSeqIn, sectionSeqIn, tempo = 0.08; +~genPatterns = {arg guitarSeqIn, accompLowSeqIn, accompHighSeqIn, sectionSeqIn, beatFrac = 1/8; var calcSustains, genSectionSec, sectionLimits, measureCount; //~~~~helper sus function @@ -210,12 +206,11 @@ OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNe Pbind( \instrument, \karplus, \amp, 0.3, - \dur, Pseq(durSeq * tempo), - \sustain, Pseq(susSeq * tempo), + \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})})), - //\bus, if(secIndex % 2 == 0, {~guitarBusA.index}, {~guitarBusB.index})), \bus, ~guitarBus.index), if(accompLowSecSeq.size > 1, { Pmono( @@ -223,40 +218,66 @@ OSCFunc({ arg msg, time; {~updateSection.value(1, false, false)}.defer},'/playNe \amp, 0.5, \freq1, Pseq(accompLowSecSeq.slice(nil, 0)), \freq2, Pseq(accompLowSecSeq.slice(nil, 1)), - \dur, Pseq(accompLowSecSeq.slice(nil, 2)) * tempo, - //\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)), + \dur, Pseq(accompLowSecSeq.slice(nil, 2)) * beatFrac, \busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}), \busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index})) - //\bus, ~accompLowBus) }, { Pmono( \accompBass, \amp, 0.5, \freq1, Pseq([accompLowSecSeq[0][0]]), \freq2, Pseq([accompLowSecSeq[0][1]]), - \dur, Pseq([accompLowSecSeq[0][2]]) * tempo, - //\cutoff, Pseq(accompLowSecSeq.drop(-1).size.collect({0}).add(1)), + \dur, Pseq([accompLowSecSeq[0][2]]) * beatFrac, \busLower, if(secIndex % 2 == 0, {~accompLowLowerBusA.index}, {~accompLowLowerBusB.index}), \busUpper, if(secIndex % 2 == 0, {~accompLowUpperBusA.index}, {~accompLowUpperBusB.index})) - //\bus, ~accompLowBus) }), Pbind( \instrument, \accompTreble, \freq, Pseq(accompHighSecSeq.slice(nil, 0)), - \dur, Pseq(accompHighSecSeq.slice(nil, 1) * tempo), - \sustain, Pseq(accompHighSecSeq.slice(nil, 2) * tempo), + \dur, Pseq(accompHighSecSeq.slice(nil, 1) * beatFrac), + \sustain, Pseq(accompHighSecSeq.slice(nil, 2) * beatFrac), \amp, 0.5, - //\bus, if(secIndex % 2 == 0, {~accompHighBusA.index}, {~accompHighBusB.index})), \bus, ~accompHighBus.index), Pbind( \instrument, \transport, \measure, Pseq(measureSeq), \beat, Pseq(beatSeq), - \dur, tempo * 8 + \dur, beatFrac * 8 ) ]); pattern }); }; -) \ No newline at end of file +) + +/* +//machine options +( +var durUnit = 0.15; + +SynthDef(\machine, {arg freq, gate = 1, sustain, amp; + var sound; + sound = TWChoose.ar(Impulse.kr(0), [ + PinkNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 10), gate, doneAction: 2)), + BrownNoise.ar(EnvGen.kr(Env.perc(0.01, sustain, amp * 2), gate, doneAction: 2)) + ], [0, 20], 1); + Out.ar([0, 1], sound) +}).add; + +~machine1 = Pbind( + \instrument, \machine, + \amp, Pseq(3000.collect({arg i; (i / 2000).clip(0, 0.03)})), + \dur, Pseq(1000.collect({[durUnit, durUnit + (durUnit / 100).rand2].wchoose([10, 1].normalizeSum)}).flat), + \sustain, Pseq(1000.collect({durUnit * (1.75 + 0.5.rand)})),//2.25].wchoose([1, 20].normalizeSum)})), + \freq, Pseq(1000.collect({[[300, 250], [300, 250].choose].wchoose([10, 1].normalizeSum)}).flat / 2) +).play; + +SynthDef(\machine, {arg freq, gate = 1, sustain, amp = 0.03; + var trig, sound; + trig = Impulse.kr(10); + sound = BrownNoise.ar(EnvGen.kr(Env.perc(0.01, 0.3 + TRand.kr(0, 0.1, trig), amp), TDelay.kr(trig, TRand.kr(0, 0.002, Dust.kr(0.75))))); + Out.ar([0, 1], sound) +}).play; +) +*/ \ No newline at end of file diff --git a/supercollider/cicc_transcriber.scd b/supercollider/cicc_transcriber.scd index 8e0afc7..2f1bbd1 100644 --- a/supercollider/cicc_transcriber.scd +++ b/supercollider/cicc_transcriber.scd @@ -23,7 +23,6 @@ sus = item[3]; note = sus.collect({[string, fret, i]}); - //rest = (dur - sus).collect({[-1, -1]}); }, 1, { var freq, dur, sus; @@ -49,7 +48,6 @@ note ++ rest }).flatten; if(res.size > maxSize, {maxSize = res.size}); - //res = res.extend(res.size.trunc(16) + 16, res.last) res }); @@ -135,8 +133,8 @@ lilyString = switch(p, 0, {lilyString + "\\clef treble\n"}, - 1, {lilyString + "\\clef \"treble^8\"\n"}, - 2, {lilyString + "\\clef bass\n"} + 1, {lilyString + "\\clef \"treble^(8)\"\n"}, + 2, {lilyString + "\\clef \"bass_(8)\"\n"} ); lilyNotes = ["c", "cis", "d", "dis","e", "f", "fis", "g", "gis", "a", "ais", "b"]; @@ -159,7 +157,6 @@ lilyString = lilyString ++ if((p != 2) && (group[0] == lastVal) && (group[0][0] != -1), {"~ "}, {""}); //add barcheck count lilyString = lilyString ++ if((curTime % curTimeSig == 0) && (i != 0), {measureCount = measureCount + 1; "| "}, {""}); - //lilyString = lilyString ++ if((curTime % curTimeSig == 0) && ((measureCount % 4) == 0) && (i != 0), {"\n\\break \n"}, {""}); if((i == (sectionData[sectionCount][0] / 4)) && (g == 0),{ var barType, pageBreak;