|
From: | Simon Albrecht |
Subject: | Re: Defining custom MIDI dynamics |
Date: | Tue, 09 Sep 2014 22:56:44 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
Hello Knute, perhaps its just an unusual topic few have experience with? At least I don’t; yet after a look in the NR section on the topic I think you’re on the right path with the cond approach. After all, you want to define a single function to pass it on as dynamicAbsoluteVolumeFunction. And to do this, you tell Lily what she will do with some exceptional values (like pTresDouxMarkup and the like in your example) and to resort to the usual procedure (default-dynamic-absolute-volume) in all other cases. Only there are some brackets missing, see below. Am 09.09.2014 um 20:55 schrieb Knute
Snortum:
(“how to define the absolute midi volume for a single custom dynamic” would have hit the nail on the head) This should be #(define (myDynamics dynamic) (cond ;; each (<test> <_expression_> …) sequence must be wrapped ;; into brackets ((equal? dynamic pTresDouxMarkup) 0.55) ((equal? dynamic pLegerMarkup) 0.77) ;; and so forth: insert as many as you like (else (default-dynamic-absolute-volume dynamic)))) See <http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_sec_4.1.5> for more information on syntax and semantics of (cond …). (which document is the first place for delving deeper into scheme) If instead of this approach you use multiple defines, the latter ones will override the former IIUC, so that’s no good idea. I may encourage you to do some trial and error – it can’t do any harm and it will help in posting more specific questions. HTH, Simon |
[Prev in Thread] | Current Thread | [Next in Thread] |