Skip to content

md-helpers

[module] md-helpers

Auxiliary functions used by other libmdal modules

[procedure] (transpose MATRIX)

Standard matrix transposition.

[procedure] (remove-duplicates LST #!optional (TEST eqv?))

Remove duplicates from the list LST, using TEST as comparator. If TEST is not given, eqv? is used.

[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 "===".

[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] (bytes->asm BYTES)

Convert a list of bytes to .db assembly statements.

[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.