[ next page > [back] [back to #library listing]


Adds a function to the list of functions that will be automatically invoked when KeyKit is rebooted.

Return a phrase containing a "sustain off" on all channels. Useful for resetting things if you have a hanging note.

Return a phrase containing all-notes-off messages on each channel. This does not include note-offs for each individual note, however.

Apply stuff (pitch, volume, timing, etc.) from the source phrase to the target phrase. The apptype is the bitwise-or of PITCH, VOLUME, DURATION, TIME, EXACTTIME, CHANNEL. Default apptype is TIME|DURATION

This function splits a phrase into chunksize-sized chunks, applies the function func to some of them (every other one, by default), and returns the result, pasted back together.

Returns an arpeggiated version of the phrase. One way of describing it is that all the notes have been separated and then put back together, back-to-back.

Prints all the elements in the given array. Works for arrays of any dimension.

Sorts the elements in the given array, and returns the sorted array.

Returns those notes in the specified phrase that are sounding at the specified time. If a note ends exactly at the specified time, it is not included.

Changes the tempo based on beats per minute, rather than microseconds per beat

This is an example of using the bsguide() function.

Synthesize a monophonic phrase based on these arguments: arr .br An array whose elements are phrases, each one specifying the allowable notes that can be used on a given step. For example, if bsarr contained these elements: arr[1]='c' ; arr[2]='c,e,g' ; arr[3]='c,g' ; arr[4]='g' then only a 'c' would be allowed in the first step, and the second step would allow a 'c', 'e', or 'g'. The arr array can be of any size; when it runs out, it is reused from the beginning. For example, in the example above, the fifth step would allow only a 'c'. arrkey .br The key that the phrases in the arr array are meant to be in. E.g. in the example above, the value of arrkey would most likely be 'c'. This is needed so that the arr array can be transposed to other keys. keyguide .br A phrase that will determine the key (or really, chords) in the final result. For example, if the value of keyguide was 'c,c,c,f', the notes picked during the first three beats would be based in C, and the final beat would be based in F. Essentially the phrases in the arr array are transposed based on these notes. noteguide .br A phrase whose notes will be used as "guide" points in picking the pitches in the final result. For example, if the guide phrase was 'co5,co4,co3', then the first note in the final result would be as close as possible to 'co5', and the note picked on the second beat would be as close as possible to 'co4'. If the notes of guide are very close together, then they will strongly influence the general shape of the final result. If instead the notes of guide are farther apart, then the final result will be allowed to meander more freely between the guide notes (but still subject to the contraints of the arr array described above). E.g. a guide phrase of 'co5d384,co4' would allow 4 beats of meandering before being pushed back toward 'co4'. stepsize .br This is the step size of the final result. E.g. a value of 1b/4 means the result would consist of sixteenth notes. lng .br The desired length of the final result.

Returns the canonical pitch of a note, ie. a number between 0 and 11.

Adjusts the notes of the melody phrase so that they fall on the notes of the chords that are playing (at the same time) in the chords phrase.

Return p, where every program change message matching the frompatchnum is changed to topatchnum. The program change numbers are 1-based.

Return a string giving channel information about phrase p.

Return a copy of the melody phrase, leaving only those notes that match the chords that occur in the chord phrase at the same time.

closest(note,scale [,direction] )
Returns a note from the specified scale that is closest in pitch to the specified note. If the optional direction argument is given, it specifies the direction (1==up, -1==down) that we want the chosen note to be in (relative to the original note). Specifying the direction also guarantees that a note different from the original is chosen (if possible).

The map argument is a set of notes. This function takes the single note nt and changes its pitch to the closest note in the map set.

[ next page > [back] [back to #library listing]