/* SIMULATIONS */



/*

 *  Typers

 *  Simulation of eight PLOrk typers.

 *  The `Typers' object sends messages directly to a KeyboardWindow and 

 *  a ConductorWindow (no OSC).

 *

 *

 */


(

var

numPlayers = 8,

projection = false;

k = KeyboardWindow(numPlayers, projection);

f = FreqTablesWindow(numPlayers, projection);

m = MsgWindow(playerNum: 0, public: true);

c = ConductorWindow(numPlayers, simulation: true);

)



l = [

[

"0:12 +",

"0:15 4411"

],

[],

[

"0:10 M \"This is a test\"",

],

[],

[],

[],

[],

[]

];


t = Typers(

cmdLists: l,

keyboardWindow: k,

conductorWindow: c

)


/* Sound objects */


/*

 *  Chord

 *

 */


(

c = Chord(

startTimes: [10.0, 10.1, 12.0],

endTimes: [14, 14, 14],

playerNums: [0, 1, 5],

freqs: [4410.0, 4410.1, 4411]

).as_msg_lists;

)


(

c = Chord.from_numeral(

startTimes: [27, 28, 29, 30],

endTimes: 35 ! 4,

playerNums: [0, 1, 5, 6],

numeral: 1

).as_msg_lists;

)


/*

 *

 * ChordProgression

 *

 */


(

ChordProgression(

startTime: 40,

endTime: 43,

playerNums: [0, 1, 2, 4],

numerals: [1, 4, 5]

).as_msg_lists;

)



/*

 *  Hocket

 *

 */


(

h = Hocket(

startTime: 10,

endTime: 20,

freqRange: [4410, 4412],

playerOrder: [1, 2, 3],

evenness: 1,

ampString: ["", ""],

changeFreq: [true, true]

).as_msg_lists;

)


/*

 *  Polyrhythms

 *

 */


(

Polyrhythms(

startTimes: [20, 23],

endTimes: [27, 27],

playerNums: [4, 5],

numPulses: [7, 13]

).as_msg_lists;

)