ChucK library functions

Main ChucK page

This page has descriptions and limited documentation for the functions I'm working on to have included in the ChucK standard libraries.

Functions

std.stom
int stom(string notename)

Returns the MIDI note number corresponding to a particular note string. Note strings consist of an upper or lower-case note letter followed optionally by zero or more accidentals ('#' or 'b') and a positive or negative octave number. This function assumes middle C to be C4.

Examples: C4 C#4 A-1 G##-1 and ridiculously C###bb##bbbb#3.

Any error in parsing results in a returned note of '0', designd to be low and safe but still valid for the MIDI spec. Notes generated out of the MIDI note range of 0-127 will be clipped to those two extremes.

Functions will be noted with the ChucK version that they first appear in the libraries and any changes made to their behavior after that.