From 73ffd86644877fbbb8e19d328faaf8dea45ac080 Mon Sep 17 00:00:00 2001 From: Julian Squires Date: Tue, 28 Dec 2004 02:49:32 +0100 Subject: [PATCH] Basic volume support. --- examples/demo-y.mbl | 10 ++++++---- src/classes.lisp | 8 ++++++++ src/music-parser.lisp | 32 ++++++++++++++++++++++++++++++++ src/replay-ymamoto.lisp | 12 +++++++++--- 4 files changed, 55 insertions(+), 7 deletions(-) diff --git a/examples/demo-y.mbl b/examples/demo-y.mbl index bfe20db..2b372b8 100644 --- a/examples/demo-y.mbl +++ b/examples/demo-y.mbl @@ -27,7 +27,8 @@ copyright "Julian Squires / 2004" ;;;; D minor. ABC t140 -B q4 +A v12 +B q4 v8 A o2 d1 | f | B o4 @a1 [d8d16d]3 d8d | @a2 [c8c16c]3 c8c | @@ -38,7 +39,7 @@ B [f8f16f]3 f8f | @a1 e8e16ee8e @a2 ee16ee8e | C r | r | ABC !loop -C q8 +C v11 q8 A q6 d4 d d d8>d< | f4 f f f8e | B @a1 [d8d16d]3 d8d | @a2 [c8c16c]3 c8c | @@ -70,8 +71,9 @@ C c2 e4 a | b-2 a4 >c+ | ;;;; A minor. -B @a0 q4 -C q4 +A v- +B @a0 q4 v+ +C q4 v+ A o1 a4 a a a8>a | c4 c c c8cec a4 g | >c4 0 (1+ note->)) - (note (aref notes note->) (aref notes note->)) + note (channel-pos 0 (1+ channel-pos))) ((>= note-> (length notes))) + (setf note (aref notes note->)) (case (music-command-type note) (:note (ymamoto-output-note note channel stream)) (:arpeggio (format stream "~&~8TDC.W $~X" - (logior (ash #b11000000 8) (music-command-value note))) + (logior (ash #b11000001 8) (music-command-value note))) (incf *total-bytes* 2)) (:tempo (setf (channel-tempo channel) (music-command-value note))) (:staccato - (setf (channel-staccato channel) (music-command-value note)))) + (setf (channel-staccato channel) (music-command-value note))) + (:volume + (setf (channel-volume channel) (music-command-value note)) + (format stream "~&~8TDC.W $~X" + (logior (ash #b11000011 8) (music-command-value note))) + (incf *total-bytes* 2))) (when (and (channel-loop-point channel) (= (channel-loop-point channel) channel-pos)) -- 2.11.4.GIT