Skip to content

md-note-table

[module] md-note-table

Generate note to frequency divider/lookup value mappings

[procedure] (make-dividers-range CYCLES BEG END REST BITS CPU-SPEED)

[procedure] (make-inverse-dividers-range CYCLES BEG END REST CPU-SPEED)

[procedure] (make-dividers CPU-SPEED CYCLES BITS REST . SHIFT)

generate a note table with divider->note-name mappings wrapper func for make-dividers-range that will auto-deduce optimal range parameters: cycles - number of cycles in sound generation loop bits - size of the dividers, as number of bits rest - the value that represents a rest/note-off [shift] - number of octaves to shift the table

[procedure] (make-inverse-dividers CPU-SPEED CYCLES BITS REST . SHIFT)

generate a note table with inverse divider->node-name mappings ie. dividers are countdown values see make-dividers for further documentation

[procedure] (make-counters BEG END FIRST-INDEX REST-INDEX)

Generate a note table with simple note-name->index mappings.

BEG - lowest note, as offset from c-0

END - highest note, as offset from c-0

FIRST-INDEX - index of the lowest note

REST-INDEX - index of the rest/note-off

[procedure] (lowest-note TABLE)

Returns the lowest note in the given note table.

[procedure] (highest-note TABLE)

Returns the highest note in the given note table.

[procedure] (note-table-range TABLE)

Returns (lowest highest) notes in the given note table.