A Qust score can consist of one or more blocks (or musicaly speaking voices) which are marked at their beginning by a >
.
At the toplevel of a score the window size (W:width x height) and the number of boxes (S:column x row) are defined:
W:800x800&S:8x8or if MIDI is going to be used it should be indicated as well:
W:800x800&S:8x8&MDNow initialize the first block and give it an initial tempo (
BPM
) and an initial color (R
= red, G
= green, B
= blue). You can gain different colors by setting RGB parameters of a color (values 0 - 255). These parameters can be reset later at any time during the piece. At the end of the assignments terminate the line with a ;
:
>BPM:120&R:255&G:100&B:15;
In the next lines write the instructions for the boxes, with 0
and 1
indicating which box is off or on. In this example having 8x8
boxes a single state (musical pulse) would look something like:
00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111*
Note that with the exception of the very last state, each state should terminate with a *
. An example of changning the tempo after each single state at runtime would look like:
> BPM:60; 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111* BPM:90; 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111* BPM:135; 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111* BPM:203; 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111
MIDI information come after each raw of a state. Each light box (1
) will be associated with a single MIDI message which are read from left to right as pitch+velocity (at this time only these two parameter are supported). MIDI information which can not be associated and mapped to any light boxes are not processed. A pipeline should separate a raw from it's MIDI information.
In the following example a successive lights of a 1x8 grid are mapped to midi numbers 60, 64, 67, 71, 76, 80, 85, 90 and 96 with each note having a velocity of 100:
S:8x1&W:800x100&MD >BPM:60&R:255; 10000000|60&100* 01000000|64&100* 00100000|67&100* 00010000|71&100* 00001000|76&100* 00000100|80&100* 00000010|85&100* 00000001|90&100* 00000001|96&100
Having more than one light in a raw it will be interpreted as a chord by assigning appropriate number of pitches+velocities.
This is shown in the following example where lights are mapped from left to right order
to pitches and velocities. Note that a plus sign +
is used for expressing simultaneous
pitches and velocities:
S:8x1&W:800x100&MD >BPM:60&R:255; 10000001|60+96&60+120* 01000010|64+90&65+110* 00100100|67+85&71+101* 00011000|71+80&78+92* R:0&B:255; 00011000|76+76&85+85* 00100100|80+71&92+78* 01000010|85+67&101+71* 10000001|90+64&110+65* 10000001|96+60&120+60
You can find more examples in the etudes directory.
Here you can watch a demo on YouTube:
Fri Aug 2 20:05:03 2019