|
From: | Jean ABOU SAMRA |
Subject: | Re: Controlling midi dynamics |
Date: | Mon, 15 Jul 2019 17:41:48 +0200 |
Hi David, Your problem is not with the instrument, it's with the dynamics themselves. The algorithm that affects a volume to a note does a scale between midiMinimumVolume and midiMaximumVolume that includes all dynamics. Mathematically, you can think: volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic Let me try a diagram: 0 | pppp ppp pp p mp mf f ff fff ffff fffff sf | 1 no sound midiMinimumVolume midiMaximumVolume maximum volume possible Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if there is not enough difference for you, you need to influence the scale between the two in addition to minimum and maximum volume. suggests to set the dynamicAbsoluteVolumeFunction property. You will find its default in scm/midi.scm: ;; define factor of total volume per dynamic marking (define-session-public absolute-volume-alist '()) (set! absolute-volume-alist (append '( ("sf" . 1.00) ("fffff" . 0.95) ("ffff" . 0.92) ("fff" . 0.85) ("ff" . 0.80) ("f" . 0.75) ("mf" . 0.68) ("mp" . 0.61) ("p" . 0.55) ("pp" . 0.49) ("ppp" . 0.42) ("pppp" . 0.34) ("ppppp" . 0.25) ) absolute-volume-alist)) (define-public (default-dynamic-absolute-volume s) (assoc-get s absolute-volume-alist)) so now you can modify it, for example: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \version "2.19.83" #(define (my-dynamic-absolute-volume-function dynamic-name) (assoc-get dynamic-name '( ("sf" . 1.00) ("fffff" . 0.95) ("ffff" . 0.92) ("fff" . 0.85) ("ff" . 0.95) ;; was 0.80 ("f" . 0.75) ("mf" . 0.68) ("mp" . 0.61) ("p" . 0.55) ("pp" . 0.10) ;; was 0.49 ("ppp" . 0.42) ("pppp" . 0.34) ("ppppp" . 0.25) ))) \score { \new Staff \with { midiInstrument = "trumpet" } { \set Score.midiMinimumVolume = 0.0 \set Score.midiMaximumVolume = 1.0 \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a' } \midi { } \layout { } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% You understand that default 'piano' is not so piano because we have to go to ppppp. By adjusting the values in that associative list, you can play with dynamics and get the exact contrast you would like. Hope that helps. Kind regards, Jean Abou Samra.
|
[Prev in Thread] | Current Thread | [Next in Thread] |