aleatoric midi sequencer
Quark is an aleatoric midi sequencer which at a given tempo plays notes, randomly taken from a selected musical scale. Additional randomization options are available, such as volume, note duration and even dynamic scale changes. All open instances of the sequencer can be synced to each other and can additionally trigger Hydrogen to play in sync.
Technical overview
Quark was created to be used in a modular audio environment of a GNU/Linux system. On other systems sync between sequencer instances and Hydrogen might have little meaning. Quark was tested on GNU/Linux only.
From Pd perspective, the patch uses basic objects, but visually is a little messy. It is one of my first patches and by the time I found out about subpatches and abstractions, it was easier to leave it as it is. At the same time it is not a big patch at all, fitting on a laptop screen, and important sections are commented.
GUI Description
Some GUI elements should be self explanatory, but most require some sort of clarification. Let us go from top to bottom.
In order to work, sync control requires you to connect Pure Data midi ports to each other, so that Pd can send midi to itself. Sync control uses midi to trigger Hydrogen as well, so you would have to make a midi connection from Pd to Hydrogen as well. In Hydrogen you should go to midi settings and configure Hydrogen to act on received notes. Quark is programmed to send note 107 to turn Hydrogen on (option PLAY in Hydrogen) and note 106 to turn Hydrogen off (option STOP in Hydrogen). You can either use those or you can open the patch, find a place where these notes are defined and change them to your liking.
scale change, when turned on, will sometimes change the played scale - each period, which by default is set to 20 seconds, it will decide whether to change scale or not. So the time setting does not mean that a scale will be changed in 20 seconds - it only means that in 20 seconds the chord may change. The probability of a scale changing is 50%. Right below these controls are number boxes, which allow the user to choose the two scales, which will interchange.
scale switch allows you to choose a scale. You can change a scale at any time without stopping the sequencer. Numbers above the switch allow the user to understand which scale is which when choosing scales for random scale change, described in the previous paragraph.
Although the scale switch contains only minor scales, the parallel nature of scales in fact means that there are as many major scales available as minor. For instance, A minor scale is C major, C minor is E-flat major. Not all scales are available, but most common are. The "P" letter indicates a pentatonic scale, consisting of "black keys", namely C#, D#, F#, G#, A#. Using key shift, described below, one can transpose it, for example, to the regular C, D, E, G, A pentatonic scale.
note midi num and volume number boxes are just indicators and show currently played midi note and its volume, so changing their values will not do anything.
key shift transposes what is being played, either up or down. The octave switch does the same and is there to make octave jumps easier, by instantly doing "+12" or "-12" without the need to change the value of the number box with a mouse.
Quark has two volume units - constant volume and random volume, - which are then added together to form the midi note volume you hear. By default, random volume is 97 and constant is 30, together making a possible maximum of 127. Values of both number boxes can be manipulated to change Quark volume handling. For instance, by setting random volume to 0 and setting constant volume to 127, you make Quark play all notes at maximum velocity.
duration section does exactly what it looks like - randomly changes the duration of played notes within a given range. Duration time, just like scale change time, is shown in miliseconds.
position allows you to shift the position of played notes in a 4/4 bar. This can be used to sync two Quarks and have one play at position 0 and another, say, at position 2, which could create interweaving notes, like Q1-Q2-Q1-Q2, instead of playing the notes together. By having four Quarks, you can set them up to play Q1-Q2-Q3-Q4 which might be used to create interesting arpeggios and textures.