latest(phrase)
Return the ending time of the latest note in the given phrase.
legato(phrase)
Extends the duration of each note to abutt the start of the next note.
Doesn't modify the duration of the last note.
limitval(v,minv,maxv)
Takes a number and limits it to the specified range.
listports()
A simple utility that lists the available MIDI ports to the console.
lowest(phrase)
Returns the lowest pitch in the specified phrase.
lowestnt(phrase)
Returns the lowest-pitched note in the specified phrase.
makenote(pitch [,duration [,volume [,chan]]] )
A simple utility for generating a single-note phrase.
The pitch is the only required argument; additional
arguments specify the duration, velocity, and channel.
makerootevery(melody,intrvl)
Figure out a root note (using findroot()) every intrvl beats,
and return it.
maxvolume(phrase)
Returns the largest volume in the specified phrase.
midiloop()
This is intended to be the one-and-only task which reads messages
from the Midiinfifo, a special fifo that is opened whenever KeyKit
is rebooted, and to which KeyKit sends messages containing
all MIDI input. Any task wanting to read MIDI input should add
an entry to the Midiin array. The index of the Midiin array
is normally the task id, and the value of the array element
is the fifo id.
millisince(tm)
Returns the number of milliseconds since a given time
millisleep(milli)
Sleep (i.e. pause the task which calls this function)
for the specified number of milliseconds.
minduration(phrase)
Returns the smallest duration in the specified phrase.
minvolume(phrase)
Returns the lowest volume in the specified phrase.
mono(phrase,type)
Returns a monophonic version of the specified phrase.
If type==0, high notes are given priority (e.g. if two notes are
playing simultaneously, the higher note will be chosen).
If type==1, low notes are given priority. If type==2,
the priority is randomized.
mouseloop()
This task is intended to be the one-and-only task that reads
directly from the Mousefifo, a special fifo that is opened
whenever KeyKit is rebooted, and to which KeyKit sends messages
about changes in the mouse state. mouseloop() normally figures
out which window is underneath the mouse, and sends the message
to the Mousein fifo for that window. If someone wants to grab the
mouse, they should set Mousegrabwind, and mouseloop() will instead
send the mouse messages to that window. This procedure should be done
with the grabmouse() and ungrabmouse() functions.
nanopatch(ch,bank,prog)
Return sysex that changes a parts bank/program.
Assumes that the 16 parts are assigned to channels 1-16.
ch is 1-based
bank is 0-based
prog is 0-based
nextquant(number,quantize)
This function quantizes the specified number using the specified
quantize value, and returns the result. The result is guaranteed to
be greater than the original number; if quantization would produce
a smaller number, it is increased by the quantize value. This is
typically used when you want to quantize a time value, and want to
guarantee that the result will refer to some time in the future,
not in the past.
See:
numquant
nexttime(ph,st)
Return the time of the next note AFTER time 'st', in phrase 'ph'
If there are no notes after it, returns -1;
nonnotes(ph)
Return all non-notes (i.e. controller, sysex, etc) of ph.