scaleStream



scaleStreams aka chord changes

each scale is a FloatArray

a stream of scales is a sequential series of these arrays


(

// random pentatonics

p = Instr("scaleStream.randpentas");


// returns a pattern when valued

x = p.value(4,16,0);


Pbind(

\degree, Pseq([1,3,5,7,9,11,3,2],inf),

\scale, x,

\octave, 3,

\dur,0.25

).play;


)


By using a Patch you get gui sliders to try out different settings.

You should examine the source code at the same time.


(


Sheet({ arg f;


Instr.leaves('scaleStream').do({ |instr|

ActionButton(f.startRow,instr.name,{

var p;

p = Patch( instr );

Sheet({ arg f;

var esp,tf;

tf = SCTextField(f,Rect(0,0,500,350));

tf.string = instr.func.def.sourceCode;

p.gui(f.startRow);

ActionButton(f.startRow,"PLAY Pbind",{

if(esp.isPlaying,{ esp.stop });

esp = Pbind(

\degree, Pseq([1,3,5,7,9,11,12,17],inf),

//\degree, Patch(Instr.choose(\degreeStream)).rand.value,

\scale, p.value,

\octave, 3,

\dur,0.125

).play

});

ActionButton(f.startRow,"STOP Pbind",{

esp.stop;

});

},instr.name)

},minWidth: 300);

})

})


)