sampler-parse-midinote-filename   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm

Implementation

;; this will match e.g. 60.aiff (where 60 is the midi note number)
(define sampler-parse-midinote-filename
  (lambda (filename)
    (let ((result (regex:matched filename "([0-9]+?)\\.(wav|WAV|aif|AIF|aiff|AIFF|ogg|OGG)$")))
      (if (null? result)
          #f
          (list filename (string->number (cadr result)) 0 0)))))


Back to Index