( ////////////////////////////////////////////////////////////////////////////////////////// // RAGALIKE // an interactive algorithmic composition by Renick Bell, // very loosely based on classical Indian raga performance conventions. // // You will need Supercollider 3. // This was developed on Linux using the excellent SCVIM. // It was begun from David Cottle's 26.11 Serialism example. // The drum sound is borrowed from Supercollider help. // The GUI requires SwingOSC; remove the "J"s for non-SwingOSC on Mac, I // guess... // // There are 10 sections. Make sure to bring up the tempo and volume on each channel // before beginning playback. The final section has a short fixed length. // It takes about 14 seconds to load this on my Pentium M 1.7. // // contact me with feedback, renick(at)gmail.com ////////////////////////////////////////////////////////////////////////////////////////// // VARIABLE DECLARATION var ragalike_form; var alap_a, alap_b, jor_a, jor_b, nomtom_a, nomtom_b, gat_a, gat_b, jhala, tihai; var tempo_slider, amp_soloist_slider, amp_drone_slider, amp_drum_slider, amp_shadja_slider; var scale_raga; var melody_soloist, octave_soloist, rhythm_soloist; var melody_drone, octave_drone, gliss_drone, rhythm_drone; var drum_rhythm_a, drum_rhythm_b, drum_rhythm_j, drum_rhythm_t, drum_pitch; var channel_soloist, channel_drone, channel_shadja, channel_drum; var melody_timbre_controller, melody_timbre_slider, drone_timbre_controller, drone_timbre_slider; ////////////////////////////////////////////////////////////////////////////////////////// // TEMPO t = TempoClock.default; ////////////////////////////////////////////////////////////////////////////////////////// // SynthDefs ( // mixer SynthDef("mixer", {arg level = 0, input_signal_bus, output_signal_bus; var mixer_in; mixer_in = In.ar(input_signal_bus, 2); Out.ar(output_signal_bus, mixer_in * level) } ).store; ); ( // for controlling a modulator SynthDef("timbre_control", {arg ratio_x = 0.001, ratio_y = 0.001, control_ratio, out_control_bus; control_ratio = ratio_x/ratio_y; Out.kr(out_control_bus, control_ratio) } ).store ); ( SynthDef("ragalike_melody_01", {arg midinote = 60, amp = 0.8, dur = 1, pan = 0, legato = 0.8, melody_01_mix = 0.8; var carrier, index, jitter, modulator, ratio, timbre, timbre_overtone, out_signal; carrier = midinote.midicps; jitter = LFNoise1.kr(1,0.01); ratio = In.kr(20, 1); // (MouseX.kr(0.25, 10))/(MouseY.kr(0.25, 10)); modulator = (carrier * (ratio + jitter)); index = LFNoise1.kr(5,1); timbre = PMOsc.ar(carrier, modulator, index, mul: amp); timbre_overtone = PMOsc.ar(carrier*2, modulator, index, mul: amp); out_signal = (timbre + timbre_overtone); Out.ar(10, Pan2.ar( timbre * melody_01_mix * EnvGen.kr(Env.new([0,amp,amp/2,0],[0.025,dur,dur*2]), doneAction: 2), pan ) ) }).store; ); ( SynthDef("ragalike_drone", {arg midinote = 60, amp = 0.8, dur = 1, pan = 0, legato = 0.8, gliss = 0; var carrier, index, jitter, modulator, ratio, timbre; carrier = EnvGen.kr(Env.new([midinote.midicps, (midinote-gliss).midicps],[dur/3])); jitter = LFNoise1.kr(1.5,0.03); ratio = In.kr(22, 1);// 0.5/1.01 modulator = (carrier * (ratio + jitter)); index = LFNoise1.kr(5,1); timbre = PMOsc.ar(midinote.midicps, modulator, index, mul: amp); Out.ar(12, Pan2.ar( timbre * 0.8 * EnvGen.kr(Env.new([0,amp,amp/2,0],[0.025,dur,dur*2]), doneAction: 2), pan ) ) }).store; ); ( // slight variation of Help-SPE3-Mridangam SynthDef( "drum_001", { arg midinote = 30, t_amp = 0.9; var out; out = Resonz.ar( WhiteNoise.ar(100) * Decay2.kr( t_amp, 0.009, 0.1 ), [midinote.midicps, (midinote + (midinote/100)).midicps], 0.1, 4 ).distort * 0.4; Out.ar(14, out); DetectSilence.ar( out, doneAction: 2 ); }).store ); ////////////////////////////////////////////////////////////////////////////////////////// // CONTROLLING INSTRUMENTS melody_timbre_controller = Synth(\timbre_control, [\out_control_bus, 20]).play; drone_timbre_controller = Synth(\timbre_control, [\out_control_bus, 22]).play; ////////////////////////////////////////////////////////////////////////////////////////// // MIXER CHANNELS channel_soloist = Synth(\mixer, [\input_signal_bus, 10, \output_signal_bus, 0]).play; channel_drone = Synth(\mixer, [\input_signal_bus, 12, \output_signal_bus, 0]).play; channel_drum = Synth(\mixer, [\input_signal_bus, 14, \output_signal_bus, 0]).play; ////////////////////////////////////////////////////////////////////////////////////////// // RHYTHM AND PITCH ARRAYS scale_raga = [0, 2, 3, 5, 7, 9, 10]; melody_soloist = [ [0], [7, 3, 5, 2, 9, 10, 0], [7, 3, 5, 2, 9, 10, 0, 12], [0, 7, 3, 5, 2, 9, 10, 0, 12], [0, 7, 3, 5, 2, 9, 10, 0, 12, 0], [7, 0, 3, 5, 0, 2, 0, 9, 10, 0, 12], [0, 2, 0, 3, 5, 0, 7, 0, 9, 10, 0, 12], [7, 3, 5, 2, 9, 10, 0, 7, 3, 5, 2, 9, 0, 10, 12], [7, 3, 5, 2, 9, 10, 0, 10, 2, 9, 3, 7, 5, 0, 3, 2, 7, 5, 10, 9, 0], [7, 3, 5, 2, 9, 10, 0, 10, 2, 9, 3, 7, 5, 0, 3, 2, 7, 5, 10, 9, 12], ]; rhythm_soloist = [ [0.4, 0.8, 1.2, 1.6], [0.1, 0.1, 0.1, 0.1, 0.3, 0.2, 0.3], [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1], [0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4], [0.1, 0.1, 0.3, 0.1, 0.1, 0.3], [0.2, 0.3, 0.2, 0.4], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1], [0.2, 0.4, 0.6, 0.4, 0.6, 0.8, 0.6, 0.8, 1], [0.3, 0.05, 0.05], [0.1, 0.1, 0.1, 0.1, 0.3, 0.2, 0.3], [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1], [0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4], [0.1, 0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.1, 0.2], [0.1, 0.1, 0.1, 0.1], [0.2, 0.3, 0.2, 0.4], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1], [0.1, 0.05, 0.05, 0.1, 0.05, 0.05, 0.1, 0.05, 0.05, 0.1, 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 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05], [0.2, 0.2, 0.3, 0.3, 0.4, 0.3, 0.1, 0.1, 0.05, 0.05], [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.3, 0.1, 0.1, 0.05, 0.05], [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1], [0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.05, 0.05], [0.05, 0.05, 0.05, 0.15, 0.05, 0.05, 0.05, 0.15, 0.05, 0.05], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.3, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05], [0.2, 0.2, 0.3, 0.3, 0.2, 0.2, 0.2, 0.2, 0.05, 0.05, 0.05, 0.05], [1, 2], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.1], [0.2, 0.4, 0.4, 0.2, 0.4, 0.2, 0.1, 0.1], [0.2, 0.3, 0.2, 0.3], [0.2, 0.4, 0.2, 0.4, 0.2, 0.2, 0.4], [0.1, 0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.1], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.2], [0.1, 0.1, 0.3, 0.1, 0.1, 0.3], [0.1, 0.2, 0.1, 0.2, 0.2, 0.05, 0.05, 0.05, 0.05], [0.8, 0.1, 0.05, 0.05], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.1], [0.2, 0.4, 0.4, 0.2, 0.4, 0.2, 0.1, 0.1], [0.2, 0.3, 0.2, 0.3], [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.1], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.2], [0.2, 0.4, 0.2, 0.4, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1], [0.1, 0.2, 0.1, 0.2, 0.2, 0.05, 0.05, 0.05, 0.05], [0.8, 0.1, 0.05, 0.05], [0.2, 0.1, 0.1, 0.05, 0.05], [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1], [0.05, 0.05, 0.05, 0.15, 0.05, 0.05, 0.05, 0.15, 0.05, 0.05], [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.1, 0.05, 0.05, 0.3, 0.1, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.05, 0.05], [0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.1, 0.05, 0.05], [0.2, 0.4, 0.2, 0.4, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1], [0.1, 0.2, 0.1, 0.2, 0.2, 0.05, 0.05, 0.05, 0.05], [0.8, 0.1, 0.05, 0.05], /*tihai*/ [0.05, 0.05, 0.1, 0.2, 0.1, 0.1, 0.1, 0.2, 0.1], [0.2, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.05, 0.05], [0.1, 0.2, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.05, 0.05, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2], [0.1, 0.1, 0.1, 0.05, 0.05, 0.1, 0.1, 0.1, 0.3] ]; octave_soloist = [ [48, 48, 60], [48, 60], [48, 60, 60, 60, 72], [48, 60, 60, 72], [60, 60, 72], [60, 72, 72], [48, 60, 60, 72, 72], [60, 72], [60, 72] ]; melody_drone = [0]; octave_drone = [36, 48, 60]; gliss_drone = [ [0], [0, 0, 0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 0, 0, 12, -12], [0, 0, 0, 12, -12], [0, 0, 0, 12, -12], [0, 12, -12] ]; rhythm_drone = [ [1.5, 2.6, 4.7, 8.8], [1, 2, 4, 8], [0.5, 1 ,2], [0.4, 0.6, 1], [0.4, 0.6], [0.4, 0.3, 0.3, 0.4, 0.2, 0.2, 0.2], [0.2, 0.2, 0.3, 0.3, 1], [0.2, 0.2, 0.2, 0.2, 0.2], [0.4, 0.3, 0.3], [0.4, 0.2, 0.2, 0.2], [0.2, 0.2, 0.3, 0.3, 0.4, 0.3, 0.1, 0.1, 0.1], [1.5, 2.6, 4.7, 8.8], [0.5, 1 ,2], [0.4, 0.6, 1], [0.4, 0.6], [0.4, 0.3, 0.3, 0.4, 0.2, 0.2, 0.2], [0.2, 0.2, 0.2, 0.2, 0.2], [0.4, 0.3, 0.3], [0.4, 0.2, 0.2, 0.2], [0.5, 1, 2], [0.4, 0.6, 0.4, 0.6], [0.4, 0.6, 1], [0.4, 0.6, 0.4, 0.6], [0.2, 0.2, 0.3, 0.3, 1], [0.2, 0.2, 0.3, 0.3, 0.4, 0.3, 0.1, 0.1, 0.1], [0.2, 0.2, 0.2, 0.2, 0.2], [0.4, 0.3, 0.3], [0.2, 0.2, 0.3, 0.3, 0.2, 0.2, 0.3, 0.1, 0.1, 0.05, 0.05], /*tihai*/ [0.4, 0.2, 0.2, 0.2], [0.2, 0.2, 0.3, 0.3], [0.2, 0.2, 0.3, 0.1, 0.1, 0.1] ]; drum_pitch = [ [30], [30, 32, 40, 30, 32, 40, 34, 30, 41, 40], [30, 30, 40, 33, 30, 40, 30, 30, 40, 31], [30, 41, 30, 40, 30, 31, 40, 42, 30, 30], [30, 33, 30, 35, 30, 30, 40, 41, 40, 40], ]; drum_rhythm_a = [ [1]; [0.4, 0.6,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0.05, 0.05], [0.2, 0.05, 0.05, 0.1, 0.05, 0.05, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.3, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05], [0.2, 0.2, 0.1, 0.2, 0.2, 0.1], [0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.2, 0.1, 0.05, 0.05, 0.2, 0.1, 0.1], [0.5, 0.2, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.1, 0.3, 0.2, 0.1, 0.05, 0.05], [0.1, 0.1, 0.3, 0.1, 0.1, 0.3], [0.5, 0.1, 0.1, 0.1, 0.1, 0.1], ]; drum_rhythm_j = [[1], [0.05, 0.05, 0.05, 0.05, 0.05, 0.25], [0.4, 0.3, 0.3], [0.4, 0.3, 0.1, 0.1, 0.05, 0.05], [0.4, 0.2, 0.2, 0.1, 0.1], [0.2, 0.2, 0.2, 0.2, 0.1, 0.1], [0.4, 0.2, 0.2, 0.2], [0.1, 0.1, 0.1, 0.1, 0.2, 0.2, 0.1, 0.1], [0.4, 0.2, 0.2, 0.2], [0.2, 0.2, 0.2, 0.2, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.1], [0.2, 0.1, 0.1, 0.05, 0.05], [0.1, 0.1, 0.1, 0.1, 0.3, 0.1, 0.1, 0.05, 0.05], [0.4, 0.6, 0.2, 0.2, 0.3, 0.3], [0.2, 0.2, 0.2, 0.2, 0.1, 0.1], [0.4, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.2], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.1], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05], [0.05, 0.05, 0.1, 0.1, 0.1, 0.2, 0.3], [0.2, 0.1, 0.05, 0.05, 0.1, 0.2, 0.3], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.05, 0.05, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.05, 0.05, 0.1, 0.05, 0.05, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.3, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05], [0.2, 0.2, 0.1, 0.2, 0.2, 0.1], [0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.2, 0.1, 0.05, 0.05, 0.2, 0.1, 0.1], [0.1, 0.1, 0.1, 0.3, 0.2, 0.1, 0.05, 0.05], [0.1, 0.1, 0.3, 0.1, 0.1, 0.3], [0.2, 0.3, 0.1, 0.1, 0.1, 0.1, 0.1] ]; drum_rhythm_t = [[1], [0.2, 0.1, 0.05, 0.05, 0.1, 0.2, 0.2, 0.1], [0.2, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.05, 0.05, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.05, 0.05, 0.1, 0.05, 0.05, 0.2, 0.1, 0.05, 0.05, 0.05, 0.05], [0.1, 0.1, 0.2, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05], [0.2, 0.2, 0.1, 0.2, 0.2, 0.1], [0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.05, 0.05], [0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.05, 0.05], ]; ////////////////////////////////////////////////////////////////////////////////////////// // PPARS alap_a = Ppar([ ( // soloist // alap A Pbind( \instrument, "ragalike_melody_01", // \legato, Pseq([ Pseries(0.05, 0.05, 40), Pseries(2.05, -0.05, 40) ], inf), \midinote, Pseq([ Pseq([0, 0, 0]), Pshuf([0, 2,-2]), Prand([0, 3, -3]), Pseq([0, 0, 0]), Prand(scale_raga), Pshuf([0, 2, 3, 5, 7, 9, 10]), Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq((scale_raga).scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,6))), Pseq((melody_soloist@(rrand(1,6))).scramble), Pseq((melody_soloist@(rrand(1,6))).reverse), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf)], inf) + Prand ([ Pseq([(octave_soloist@0).choose], {30.rand}), Pseq([(octave_soloist@0).choose], {30.rand}), Pseq([(octave_soloist@0).choose], {30.rand}), Pseq([(octave_soloist@0).choose], {30.rand}), Pseq([(octave_soloist@0).choose], {30.rand}) ] , inf), \dur, Pseq([ Pseq([Prand([0.9, 1.1, 2.3, 3.4, 4.5]) ],22), Prand( [Pseq(rhythm_soloist@0), Pseq((rhythm_soloist@0).reverse), Pseq((rhythm_soloist@0).scramble), Pseq(rhythm_soloist@1), Pseq((rhythm_soloist@1).reverse), Pseq((rhythm_soloist@1).scramble), Pseq(rhythm_soloist@2), Pseq((rhythm_soloist@2).reverse), Pseq((rhythm_soloist@2).scramble), Pseq(rhythm_soloist@3), Prand(rhythm_soloist@1), Prand(rhythm_soloist@2), Prand(rhythm_soloist@3), Prand([ Pseq(rhythm_soloist@4), Pseq(rhythm_soloist@5), Pseq(rhythm_soloist@6), Pseq(rhythm_soloist@7), Pseq(rhythm_soloist@8), ], 5) ], inf)], inf), \amp, Prand([ Pseries(0.1, 0.05, 5), // cresc Pseries(0.4, -0.05, 5), // decresc Prand([0.2, 0.3, 0.4], 5) ], inf)) ), ( // drone // alap A Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@1, inf), \dur, Prand( [Pseq(rhythm_drone@1), Pseq((rhythm_drone@1).reverse), Pseq((rhythm_drone@1).scramble), Prand(rhythm_drone@1) ], inf), \amp, Prand([ Pseries(0.1, 0.05, 5), // cresc Pseries(0.4, -0.05, 5), // decresc Prand([0.2, 0.3, 0.4], 5) ], inf) ) ) ]); alap_b = Ppar([ ( // soloist // alap_b Pbind( \instrument, "ragalike_melody_01", // \legato, Pseq([ Pseries(0.05, 0.05, 40), Pseries(2.05, -0.05, 40) ], inf), \midinote, Pseq([ Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,6)), {3.rand}), Pseq((melody_soloist@(rrand(1,6))).scramble), Pseq((melody_soloist@(rrand(1,6))).reverse), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf)], inf) + Prand ([ Pseq([(octave_soloist@1).choose], {30.rand}), Pseq([(octave_soloist@1).choose], {30.rand}), Pseq([(octave_soloist@1).choose], {30.rand}), Pseq([(octave_soloist@1).choose], {30.rand}), Pseq([(octave_soloist@1).choose], {30.rand}) ] , inf), \dur, Pseq([ Pseq([Prand([0.9, 1.1, 2.3, 3.4, 4.5]) ],22), Prand( [Pseq(rhythm_soloist@9), Pseq((rhythm_soloist@9).reverse), Pseq((rhythm_soloist@9).scramble), Pseq(rhythm_soloist@10), Pseq((rhythm_soloist@10).reverse), Pseq((rhythm_soloist@10).scramble), Pseq(rhythm_soloist@11), Pseq((rhythm_soloist@11).reverse), Pseq((rhythm_soloist@11).scramble), Pseq(rhythm_soloist@12), Prand(rhythm_soloist@10), Prand(rhythm_soloist@11), Prand(rhythm_soloist@12), Prand([ Pseq(rhythm_soloist@13), Pseq(rhythm_soloist@14), Pseq(rhythm_soloist@15), Pseq(rhythm_soloist@16), Pseq(rhythm_soloist@17), ], {10.rand}) ], inf)], inf), \amp, Prand([ Pseries(0.1, 0.05, 5), // cresc Pseries(0.4, -0.05, 5), // decresc Prand([0.2, 0.3, 0.4, 0.5], 5) ], inf) ) ), ( // drone // alap_b Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse) + melody_drone, Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@2, inf), \dur, Prand( [Pseq(rhythm_drone@1), Pseq((rhythm_drone@1).reverse), Pseq((rhythm_drone@1).scramble), Prand(rhythm_drone@1) ], inf), \amp, Prand([ Pseries(0.1, 0.05, 7), // cresc Pseries(0.4, -0.05, 5), // decresc Prand([0.2, 0.3, 0.4, 0.5], 5) ], inf) ) ) ]); jor_a = Ppar([ ( // soloist // jor A Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(3,7)), {3.rand}), Pseq(melody_soloist@(rrand(3,7)), {5.rand}), Pseq((melody_soloist@(rrand(3,7))).scramble, {3.rand}), Pseq((melody_soloist@(rrand(3,7))).reverse, {3.rand}), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@2).choose], {30.rand}), Pseq([(octave_soloist@2).choose], {30.rand}), Pseq([(octave_soloist@2).choose], {30.rand}), Pseq([(octave_soloist@2).choose], {30.rand}), Pseq([(octave_soloist@2).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@18), Pseq((rhythm_soloist@18).reverse), Pseq((rhythm_soloist@18).scramble), Pseq(rhythm_soloist@19), Pseq((rhythm_soloist@19).reverse), Pseq((rhythm_soloist@19).scramble), Pseq(rhythm_soloist@20, {7.rand}), Pseq((rhythm_soloist@20).reverse), Pseq((rhythm_soloist@20).scramble), Pseq(rhythm_soloist@21), Prand(rhythm_soloist@19), Prand(rhythm_soloist@20), Prand(rhythm_soloist@21), Prand([ Pseq(rhythm_soloist@22), Pseq(rhythm_soloist@23), Pseq(rhythm_soloist@24), Pseq(rhythm_soloist@25), Pseq(rhythm_soloist@26), ], 5) ], inf), \amp, Prand([ Pseries(0.1, 0.05, 7), // cresc Pseries(0.4, -0.05, 5), // decresc Prand([0.3, 0.4 ,0.5], 5) ], inf) ) ), ( // drone // jor A Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse) + melody_drone, Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@1, inf), \dur, Prand( [Pseq(rhythm_drone@2), Pseq((rhythm_drone@2).reverse), Pseq((rhythm_drone@2).scramble), Prand(rhythm_drone@2) ], inf), \amp, Prand([ Pseries(0.1, 0.05, 7), // cresc Pseries(0.5, -0.05, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ) ]); jor_b = Ppar([ ( // soloist // jor B Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(4,9)), {5.rand}), Pseq(melody_soloist@(rrand(4,9)), {5.rand}), Pseq((melody_soloist@(rrand(4,9))).scramble, {5.rand}), Pseq((melody_soloist@(rrand(4,9))).reverse, {5.rand}), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@3).choose], {30.rand}), Pseq([(octave_soloist@3).choose], {30.rand}), Pseq([(octave_soloist@3).choose], {30.rand}), Pseq([(octave_soloist@3).choose], {30.rand}), Pseq([(octave_soloist@3).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@27), Pseq((rhythm_soloist@27).reverse), Pseq((rhythm_soloist@27).scramble), Pseq(rhythm_soloist@28), Pseq((rhythm_soloist@28).reverse), Pseq((rhythm_soloist@28).scramble), Pseq(rhythm_soloist@29, {7.rand}), Pseq((rhythm_soloist@29).reverse), Pseq((rhythm_soloist@29).scramble), Pseq(rhythm_soloist@30, {7.rand}), Pseq(rhythm_soloist@36), Prand(rhythm_soloist@28), Prand(rhythm_soloist@29), Prand(rhythm_soloist@30), Prand([ Pseq(rhythm_soloist@31), Pseq(rhythm_soloist@32), Pseq(rhythm_soloist@33), Pseq(rhythm_soloist@34, {5.rand}), Pseq(rhythm_soloist@35), ], 5) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5, 0.6], 5) ], inf) ) ), ( // drone // jor B Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@2, inf), \dur, Prand( [Pseq(rhythm_drone@3), Pseq((rhythm_drone@3).reverse), Pseq((rhythm_drone@3).scramble), Prand(rhythm_drone@3) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ) ]); nomtom_a = Ppar([ ( // soloist // nom-tom_a Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,4)), {5.rand}), Pseq(melody_soloist@(rrand(1,4)), {5.rand}), Pseq((melody_soloist@(rrand(1,4))).scramble, {5.rand}), Pseq((melody_soloist@(rrand(1,4))).reverse, {5.rand}), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@4).choose], {30.rand}), Pseq([(octave_soloist@4).choose], {30.rand}), Pseq([(octave_soloist@4).choose], {30.rand}), Pseq([(octave_soloist@4).choose], {30.rand}), Pseq([(octave_soloist@4).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@37, {7.rand}), Pseq(rhythm_soloist@38, {7.rand}), Pseq(rhythm_soloist@39, {7.rand}), Pseq(rhythm_soloist@40, {7.rand}), Pseq(rhythm_soloist@46), Prand([ Pseq(rhythm_soloist@41), Pseq(rhythm_soloist@42), Pseq(rhythm_soloist@43), Pseq(rhythm_soloist@44), Pseq(rhythm_soloist@45), ], 5) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5, 0.6], 5) ], inf) ) ), ( // drone // nom-tom_a Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse) + melody_drone, Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@3, inf), \dur, Prand( [Pseq(rhythm_drone@13), Pseq(rhythm_drone@14, {5.rand}), Pseq(rhythm_drone@15, {5.rand}) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ) ]); nomtom_b = Ppar([ ( // soloist // nom-tom_b Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,4)), {7.rand}), Pseq(melody_soloist@(rrand(1,4)), {7.rand}), Pseq((melody_soloist@(rrand(1,4))).scramble, {5.rand}), Pseq((melody_soloist@(rrand(1,4))).reverse, {5.rand}), Prand(scale_raga), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@5).choose], {30.rand}), Pseq([(octave_soloist@5).choose], {30.rand}), Pseq([(octave_soloist@5).choose], {30.rand}), Pseq([(octave_soloist@5).choose], {30.rand}), Pseq([(octave_soloist@5).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@47, {7.rand}), Pseq(rhythm_soloist@48, {7.rand}), Pseq(rhythm_soloist@49, {7.rand}), Pseq(rhythm_soloist@50, {7.rand}), Pseq(rhythm_soloist@56), Prand([ Pseq(rhythm_soloist@51), Pseq(rhythm_soloist@52, {5.rand}), Pseq(rhythm_soloist@53), Pseq(rhythm_soloist@54), Pseq(rhythm_soloist@55), ], {7.rand}) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5, 0.6], 5) ], inf) ) ), ( // drone // nom-tom_b Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@4, inf), \dur, Prand( [Pseq(rhythm_drone@16, {3.rand}), Pseq(rhythm_drone@17, {5.rand}), Pseq(rhythm_drone@18, {5.rand}) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 6), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ) ]); gat_a = Ppar([ ( // soloist // gat_a Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,6)), {5.rand}), Pseq(melody_soloist@(rrand(1,6)), {5.rand}), Pseq((melody_soloist@(rrand(1,6))).scramble, {3.rand}), Pseq((melody_soloist@(rrand(1,6))).reverse, {3.rand}), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@6).choose], {30.rand}), Pseq([(octave_soloist@6).choose], {30.rand}), Pseq([(octave_soloist@6).choose], {30.rand}), Pseq([(octave_soloist@6).choose], {30.rand}), Pseq([(octave_soloist@6).choose], {30.rand}) ] , inf), \dur, Prand( [ Pseq(rhythm_soloist@57, {3.rand}), Pseq((rhythm_soloist@57).reverse, {3.rand}), Pseq((rhythm_soloist@57).scramble, {3.rand}), Pseq(rhythm_soloist@58, {3.rand}), Pseq((rhythm_soloist@58).reverse, {3.rand}), Pseq((rhythm_soloist@58).scramble, {3.rand}), Pseq(rhythm_soloist@59, {7.rand}), Pseq((rhythm_soloist@59).reverse, {3.rand}), Pseq((rhythm_soloist@59).scramble, {3.rand}), Pseq(rhythm_soloist@60, {3.rand}), Pseq(rhythm_soloist@66), Prand([ Pseq(rhythm_soloist@61), Pseq(rhythm_soloist@62), Pseq(rhythm_soloist@63), Pseq(rhythm_soloist@64, {7.rand}), Pseq(rhythm_soloist@65), ], 5) ], inf), \amp, Prand([ Pseries(0.1, 0.075, 5), // cresc Pseries(0.5, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ), ( // drone // gat_a Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@5, inf), \dur, Prand( [ Pseq(rhythm_drone@19), Pseq((rhythm_drone@19).reverse), Pseq((rhythm_drone@19).scramble), Pseq(rhythm_drone@20), Pseq((rhythm_drone@20).reverse), Pseq((rhythm_drone@20).scramble), Pseq(rhythm_drone@21), Pseq((rhythm_drone@21).reverse), Pseq((rhythm_drone@21).scramble), ], inf), \amp, Prand([ Pseries(0.1, 0.075, 5), // cresc Pseries(0.5, -0.075, 4), // decresc Prand([0.2, 0.3, 0.4, 0.5], 5) ], inf) ) ), ( // drum_rhythms // gat_a Pbind( \instrument, "drum_001", \midinote, Prand([ Pseq(drum_pitch@1), Pseq(drum_pitch@2), Pseq(drum_pitch@3), Pseq(drum_pitch@4), ], inf) , \delta, Prand([ Pseq(drum_rhythm_a@1, {5.rand}), Pseq(drum_rhythm_a@2, {5.rand}), Pseq(drum_rhythm_a@3, {5.rand}), Pseq(drum_rhythm_a@4), Pseq(drum_rhythm_a@5), Pseq(drum_rhythm_a@6, {5.rand}), Pseq(drum_rhythm_a@7), Pseq(drum_rhythm_a@8, {5.rand}), Pseq(drum_rhythm_a@9), Pseq(drum_rhythm_a@10), Pseq(drum_rhythm_a@11), Pseq(drum_rhythm_a@12), Pseq(drum_rhythm_a@13), Pseq(drum_rhythm_a@14), Pseq(drum_rhythm_a@15), Pseq(drum_rhythm_a@16), Prand( [ Pseq(drum_rhythm_a@17), Pseq(drum_rhythm_a@18), Pseq(drum_rhythm_a@19), Pseq(drum_rhythm_a@20), Pseq(drum_rhythm_a@21), Pseq(drum_rhythm_a@22), Pseq(drum_rhythm_a@23), Pseq(drum_rhythm_a@24), Pseq(drum_rhythm_a@25), Pseq(drum_rhythm_a@26), Pseq(drum_rhythm_a@27), Pseq(drum_rhythm_a@28), Pseq(drum_rhythm_a@29), Pseq(drum_rhythm_a@30), Pseq(drum_rhythm_a@31), Pseq(drum_rhythm_a@31), ], {4.rand} ) ], inf), \amp, Prand([0.2, 0.3, 0.5, 0.7, 0.8],inf) ) ) ]); gat_b = Ppar([ ( // soloist // gat_b Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(4,9)), {5.rand}), Pseq(melody_soloist@(rrand(4,9)), {5.rand}), Pseq((melody_soloist@(rrand(4,9))).scramble, {5.rand}), Pseq((melody_soloist@(rrand(4,9))).reverse, {5.rand}), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@7).choose], {30.rand}), Pseq([(octave_soloist@7).choose], {30.rand}), Pseq([(octave_soloist@7).choose], {30.rand}), Pseq([(octave_soloist@7).choose], {30.rand}), Pseq([(octave_soloist@7).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@67, {3.rand}), Pseq((rhythm_soloist@67).reverse, {3.rand}), Pseq((rhythm_soloist@67).scramble, {3.rand}), Pseq(rhythm_soloist@68, {3.rand}), Pseq((rhythm_soloist@68).reverse, {3.rand}), Pseq((rhythm_soloist@68).scramble, {3.rand}), Pseq(rhythm_soloist@69, {3.rand}), Pseq((rhythm_soloist@69).reverse, {3.rand}), Pseq((rhythm_soloist@69).scramble, {3.rand}), Pseq(rhythm_soloist@70), Pseq(rhythm_soloist@76, {3.rand}), Prand([ Pseq(rhythm_soloist@71, {3.rand}), Pseq(rhythm_soloist@72, {3.rand}), Pseq(rhythm_soloist@73, {3.rand}), Pseq(rhythm_soloist@74, {3.rand}), Pseq(rhythm_soloist@75, {3.rand}), ], 5) ], inf), \amp, Prand([ Pseries(0.2, 0.075, 7), // cresc Pseries(0.6, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ), ( // drone // gat_b Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@5, inf), \dur, Prand( [Pseq(rhythm_drone@22, {3.rand}), Pseq((rhythm_drone@22).reverse, {3.rand}), Pseq((rhythm_drone@22).scramble, {3.rand}), Pseq(rhythm_drone@23, {3.rand}), Pseq((rhythm_drone@23).reverse, {3.rand}), Pseq((rhythm_drone@23).scramble, {3.rand}), Pseq(rhythm_drone@24, {3.rand}), Pseq((rhythm_drone@24).reverse, {3.rand}), Pseq((rhythm_drone@24).scramble, {3.rand}) ], inf), \amp, Prand([ Pseries(0.2, 0.075, 5), // cresc Pseries(0.6, -0.075, 4), // decresc Prand([0.3, 0.4, 0.5, 0.6], 5) ], inf) ) ), ( // drum_rhythms // gat_b Pbind( \instrument, "drum_001", \midinote, Prand([Pseq(drum_pitch@1), Pseq(drum_pitch@2), Pseq(drum_pitch@3), Pseq(drum_pitch@4), ], inf) , \delta, Prand([ Prand( [Pseq(drum_rhythm_b@9, {3.rand}), Pseq(drum_rhythm_b@10), Pseq(drum_rhythm_b@11), Pseq(drum_rhythm_b@12), Pseq(drum_rhythm_b@13), Pseq(drum_rhythm_b@14), Pseq(drum_rhythm_b@15), Pseq(drum_rhythm_b@16), ], {7.rand} ), Prand( [Pseq(drum_rhythm_b@1), Pseq(drum_rhythm_b@2), Pseq(drum_rhythm_b@3, {3.rand}), Pseq(drum_rhythm_b@4, {3.rand}), Pseq(drum_rhythm_b@5), Pseq(drum_rhythm_b@6), Pseq(drum_rhythm_b@7), Pseq(drum_rhythm_b@8, {3.rand}), ], {5.rand} ), Prand( [Pseq(drum_rhythm_b@17), Pseq(drum_rhythm_b@18), Pseq(drum_rhythm_b@19), Pseq(drum_rhythm_b@20), Pseq(drum_rhythm_b@21), Pseq(drum_rhythm_b@22), Pseq(drum_rhythm_b@23), Pseq(drum_rhythm_b@24), Pseq(drum_rhythm_b@25), Pseq(drum_rhythm_b@26), Pseq(drum_rhythm_b@27), Pseq(drum_rhythm_b@28), Pseq(drum_rhythm_b@29), Pseq(drum_rhythm_b@30), Pseq(drum_rhythm_b@31), Pseq(drum_rhythm_b@32), ], {11.rand} ) ], inf), \amp, Prand([0.2, 0.3, 0.5, 0.7, 0.8],inf) ) ) ]); jhala = Ppar([ ( // soloist // jhala Pbind( \instrument, "ragalike_melody_01", \midinote, Prand( [ //P, R, I, IR Pseq(scale_raga), Pseq(scale_raga.scramble), Pseq(scale_raga.reverse), Pseq(melody_soloist@(rrand(1,4)), {5.rand}), Pseq(melody_soloist@(rrand(1,4)), {5.rand}), Pseq((melody_soloist@(rrand(1,4))).scramble, {5.rand}), Pseq((melody_soloist@(rrand(1,4))).reverse, {5.rand}), Pseq(12 - scale_raga), Pseq((12 - scale_raga).scramble), Pseq((12 - scale_raga).reverse), 12 - Prand(scale_raga), ], inf) + Prand ([ Pseq([(octave_soloist@8).choose], {30.rand}), Pseq([(octave_soloist@8).choose], {30.rand}), Pseq([(octave_soloist@8).choose], {30.rand}), Pseq([(octave_soloist@8).choose], {30.rand}), Pseq([(octave_soloist@8).choose], {30.rand}) ] , inf), \dur, Prand( [Pseq(rhythm_soloist@77, {3.rand}), Pseq((rhythm_soloist@77).reverse, {3.rand}), Pseq((rhythm_soloist@77).scramble, {3.rand}), Pseq(rhythm_soloist@78, {3.rand}), Pseq((rhythm_soloist@78).reverse, {3.rand}), Pseq((rhythm_soloist@78).scramble, {3.rand}), Pseq(rhythm_soloist@79, {3.rand}), Pseq((rhythm_soloist@79).reverse, {3.rand}), Pseq((rhythm_soloist@79).scramble, {3.rand}), Pseq(rhythm_soloist@80), Pseq(rhythm_soloist@86, {3.rand}), Prand([ Pseq(rhythm_soloist@81, {3.rand}), Pseq(rhythm_soloist@82, {3.rand}), Pseq(rhythm_soloist@83, {3.rand}), Pseq(rhythm_soloist@84, {3.rand}), Pseq(rhythm_soloist@85, {3.rand}), ], 5) ], inf), \amp, Prand([ Pseries(0.2, 0.075, 7), // cresc Pseries(0.6, -0.075, 5), // decresc Prand([0.3, 0.4, 0.5], 5) ], inf) ) ), ( // drone // jhala Pbind( \instrument, "ragalike_drone", \midinote, Prand( [ //P, R, I, IR melody_drone + Pseq(octave_drone), melody_drone + Pseq(octave_drone.scramble), melody_drone + Pseq(octave_drone.reverse), Prand(octave_drone) + melody_drone, Prand(octave_drone.scramble) + melody_drone, Prand(octave_drone.reverse) + melody_drone, ], inf), \gliss, Prand(gliss_drone@7, inf), \dur, Prand( [Pseq(rhythm_drone@25, {3.rand}), Pseq((rhythm_drone@25).reverse, {3.rand}), Pseq((rhythm_drone@25).scramble, {3.rand}), Pseq(rhythm_drone@26, {3.rand}), Pseq((rhythm_drone@26).reverse, {3.rand}), Pseq((rhythm_drone@26).scramble, {3.rand}), Pseq(rhythm_drone@27, {3.rand}), Pseq((rhythm_drone@27).reverse, {3.rand}), Pseq((rhythm_drone@27).scramble, {3.rand}) ], inf), \amp, Prand([ Pseries(0.3, 0.075, 5), // cresc Pseries(0.7, -0.075, 4), // decresc Prand([0.3, 0.4, 0.5, 0.6, 0.7], 5) ], inf) ) ), ( // drum_rhythms // jhala Pbind( \instrument, "drum_001", \midinote, Prand([Pseq(drum_pitch@1), Pseq(drum_pitch@2), Pseq(drum_pitch@3), Pseq(drum_pitch@4), ], inf) , \delta, Prand([ Prand( [Pseq(drum_rhythm_j@9, {3.rand}), Pseq(drum_rhythm_j@10, {5.rand}), Pseq(drum_rhythm_j@11, {7.rand}), Pseq(drum_rhythm_j@12, {5.rand}), Pseq(drum_rhythm_j@13), Pseq(drum_rhythm_j@14), Pseq(drum_rhythm_j@15), Pseq(drum_rhythm_j@16), ], {7.rand} ), Prand( [Pseq(drum_rhythm_j@1, {7.rand}), Pseq(drum_rhythm_j@2), Pseq(drum_rhythm_j@3, {3.rand}), Pseq(drum_rhythm_j@4, {3.rand}), Pseq(drum_rhythm_j@5), Pseq(drum_rhythm_j@6), Pseq(drum_rhythm_j@7), Pseq(drum_rhythm_j@8, {3.rand}), ], {5.rand} ), Prand( [Pseq(drum_rhythm_j@17, {7.rand}), Pseq(drum_rhythm_j@18, {5.rand}), Pseq(drum_rhythm_j@19, {3.rand}), Pseq(drum_rhythm_j@20), Pseq(drum_rhythm_j@21), Pseq(drum_rhythm_j@22), Pseq(drum_rhythm_j@23), Pseq(drum_rhythm_j@24), Pseq(drum_rhythm_j@25), Pseq(drum_rhythm_j@26), Pseq(drum_rhythm_j@27), Pseq(drum_rhythm_j@28), Pseq(drum_rhythm_j@29), Pseq(drum_rhythm_j@30), Pseq(drum_rhythm_j@31), Pseq(drum_rhythm_j@32), ], {5.rand} ) ], inf), \amp, Prand([0.4, 0.5, 0.7, 0.8],inf) ) ) ]); tihai = Ppar([ ( // soloist // tihai Pbind( \instrument, "ragalike_melody_01", \midinote, Pseq( [ //P, R, I, IR Pseq(melody_soloist@9, 12), ([0, 12, 3, 7]).choose ], 1) + 72, \dur, Pseq( [Prand([ Pseq(rhythm_soloist@87, 4), Pseq(rhythm_soloist@88, 4), Pseq(rhythm_soloist@89, 4), Pseq(rhythm_soloist@90, 4), Pseq(rhythm_soloist@91, 4), ], 3), 3]), \amp, Prand([ Prand([0.4, 0.5], 5) ], inf) ) ), ( // drone // tihai Pbind( \instrument, "ragalike_drone", \midinote, Pseq( [ //P, R, I, IR Pseq(melody_drone) + octave_drone.choose, 60, ], inf), \gliss, Prand(gliss_drone@9, inf), \dur, Pseq( [Prand([ Pseq(rhythm_drone@28, 4), Pseq(rhythm_drone@29, 4), Pseq(rhythm_drone@30, 4), ], 3), 3]), \amp, Prand([0.5, 0.6], inf) ) ), ( // drums // tihai Pbind( \instrument, "drum_001", \midinote, Prand([Pseq(drum_pitch@1), Pseq(drum_pitch@2), Pseq(drum_pitch@3), Pseq(drum_pitch@4), ], inf) , \delta, Pseq([ Prand( [Pseq(drum_rhythm_t@1, 4), Pseq(drum_rhythm_t@2, 4), Pseq(drum_rhythm_t@3, 4), Pseq(drum_rhythm_t@4, 4), Pseq(drum_rhythm_t@5, 4), Pseq(drum_rhythm_t@6, 4), Pseq(drum_rhythm_t@7, 4), Pseq(drum_rhythm_t@8, 4), ], 3 ), 3], 1), \amp, Prand([0.7, 0.8, 0.9],inf) ) ) ]); ////////////////////////////////////////////////////////////////////////////////////////// // GUI w = JSCWindow.new("Ragalike, by Renick Bell", Rect(50,100,620,525) ); b = JSCCompositeView(w,Rect(0,0,620,525)); b.decorator = FlowLayout(b.bounds); c = JSCButton(b,Rect(20,20,600,30)); c.states = [ ["click to start the piece", Color.black], ["currently in alap_a, click to proceed",Color.black], ["currently in alap_b, click to proceed",Color.black], ["currently in jor_a, click to proceed",Color.black], ["currently in jor_b, click to proceed",Color.black], ["currently in nomtom_a, click to proceed",Color.black], ["currently in nomtom_b, click to proceed",Color.black], ["currently in gat_a, click to proceed",Color.black], ["currently in gat_b, click to proceed",Color.black], ["currently in jhala, click to proceed",Color.black], ["currently in tihai, the final section",Color.black], ]; c.action = { arg section; section.value.postln; if( section.value == 0, {} ); if( section.value == 1, {t.schedAbs(t.elapsedBeats.ceil, {x = alap_a.play} )} ); if( section.value == 2, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = alap_b.play })} ); if( section.value == 3, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = jor_a.play })} ); if( section.value == 4, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = jor_b.play })} ); if( section.value == 5, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = nomtom_a.play })} ); if( section.value == 6, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = nomtom_b.play })} ); if( section.value == 7, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = gat_a.play })} ); if( section.value == 8, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = gat_b.play })} ); if( section.value == 9, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; x = jhala.play })} ); if( section.value == 10, {t.schedAbs(t.elapsedBeats.ceil, {x.stop; tihai.play })} ); }; JSCStaticText( b, Rect( 20, 20, 300, 10 )).string_("timbre, soloist").align_( \left ); JSCStaticText( b, Rect( 20, 20, 300, 10 )).string_("timbre, drone").align_( \left ); melody_timbre_slider = JSC2DSlider(b,Rect(0,0,300,300)); melody_timbre_slider.action = { arg ratioValue; ([ratioValue.x, ratioValue.y]).postln; melody_timbre_controller.set(\ratio_x, ratioValue.x, \ratio_y, ratioValue.y) }; drone_timbre_slider = JSC2DSlider(b,Rect(0,0,300,300)); drone_timbre_slider.action = { arg ratioValue; ([ratioValue.x, ratioValue.y]).postln; drone_timbre_controller.set(\ratio_x, ratioValue.x, \ratio_y, ratioValue.y) }; JSCStaticText( b, Rect( 20, 20, 340, 10 )).string_("tempo" ).align_( \left ); tempo_slider = JSCSlider(b,Rect(20,20,600,20)); tempo_slider.action = { arg tempo_slider_value; t.tempo = tempo_slider_value.value * 2; tempo_slider_value.value.postln; }; JSCStaticText( b, Rect( 20, 20, 340, 10 )).string_("amplitude, soloist").align_( \left ); amp_soloist_slider = JSCSlider(b,Rect(20,20,600,20)); amp_soloist_slider.action = { arg butt; butt.value.postln; channel_soloist.set(\level, butt.value); }; JSCStaticText( b, Rect( 20, 20, 340, 10 )).string_("amplitude, drone").align_( \left ); amp_drone_slider = JSCSlider(b,Rect(20,20,600,20)); amp_drone_slider.action = { arg butt; butt.value.postln; channel_drone.set(\level, butt.value); }; JSCStaticText( b, Rect( 20, 20, 340, 10 )).string_("amplitude, drum").align_( \left ); amp_drum_slider = JSCSlider(b,Rect(20,20,600,20)); amp_drum_slider.action = { arg butt; butt.value.postln; channel_drum.set(\level, butt.value); }; w.front; ) )