Skip to content


[module] md-helpers

Auxiliary functions used by other libmdal modules

[procedure] (normalize-note-name N)

Convert note names from MDAL's format to the conventional tracker naming scheme, eg. non-sharps are hyphenated, and "rest" is replaced with "===".

[record] range

[constructor] (make-range #!key MIN MAX)
[predicate] range?
implementation: defstruct

field getter setter
min range-min range-min-set!
max range-max range-max-set!

[procedure] (in-range? VAL RANGE)

Check if VAL is within the limits defined by the RANGE object.

[procedure] (bits->range BITS SIGNED)

Create a range object for an integer with the given number of BITS.

[procedure] (int->bytes I NUMBER-OF-BYTES ENDIAN)

Convert the integer I into a list of bytes, capped at NUMBER-OF-BYTES and respecting ENDIANness.

[procedure] (add-hash-table-entry HT KEY VALUE)

Add a key/value pair to the hash-table HT. Will be ignored if KEY is already in HT.

[procedure] (add-to-list LST VAL)

add val to all numeric elements of the list lst

[procedure] (remove-keyword-args ARGS KEYWORDS)

Drop the given KEYWORDS and their corresponding value arguments from the list of ARGS.

[procedure] (symbol-contains SYM STR)

Check if the symbol name SYM contains the string STR.

[procedure] (mdal-abort MESSAGE #!optional (WHERE ""))

Abort with an exception of kind mdal. WHERE is a string specifying a libmdal component, and MESSAGE is the error message to display.