Quantization

q<num1>,<num2>

<num1> (0 — GATE-DENOM)
Divides lengths of entered notes by this number per the formula listed below. Won't affect attack times.

<num2> (-INT_MAXINT_MAX)
Optional. Adds a number of frames to the length of the note. If not specified, 0 assumed. Also note that this value can be negative.

Note length is calculated as follow:

$\left(\textrm{Original note lenght}_{\textrm{in frames}}\right) \cdot \frac{\textbf{<num1>}}{\textrm{GATE-DENOM}} + \textbf{<num2>}_\textrm{in frames}$ = Quantized Note Length in frames

Please note that GATE-DENOM default value is 8.

This will quantize the length of notes played, but not when they are played. Note lengths are cut by key-off.
If the resulting note length is shorter than one frame long, it is set to one frame long; in the same manner, if the resulting note length is greater than the original note length, it is set to the original note length. Note however that if <num1> == GATE-DENOM and <num2> is more than zero, ppmckc will issue an error, though.

Example:

;Default value of gate-denom
#gate-denom 8

;Play sixteenth notes in length, but quarter notes in placement 
A v10 l4 q2 
A c c c c

;This will sound the same as above, regardless of volume macros used
A q8
A c16 k8. c16 k8. c16 k8. c16 k8.

;You can make fixed-length note with q0,<num>
A q0,2    ;2 frames-long notes
A c c c c

@q<num>

<num> (-INT_MAXINT_MAX)
Number of frames to cut off of each note. Oddly, the value can be negative, but it does nothing special, it will act as if <num> were zero.

As stated, it is a specific variation of q<num1>,<num2>. One may want to cut a note by a fixed length of frames early, instead of a proportion of the note length. Typing qGATE-DENOM,-<num> works, but is pretty boring. So this command is a shorthand for this.

Example:

;Default value of gate-denom
#gate-denom 8

;This will cut 4 frames at the end of the note
A v10 l4 @q4
A c c c c

;Note that this is totally equivalent
A q8,-4
A c c c c
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.