denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML anatomy


From: Richard Shann
Subject: Re: XML anatomy
Date: Sun, 12 Jan 2020 18:15:50 +0000

On Fri, 2020-01-10 at 09:08 +0000, Richard Shann wrote:
> I'm guessing it means
> lengthening (some?) some notes and shortening others in pairs? 

I had a power cut which corrupted my file system, but having got things
working again I find an email from Bric has gotten nuked. I don't see
it in the denemo-devel archive either ... however it occurred to me
that there is a problem with the play back in Denemo that affects me
when I'm checking that the music is correct - namely grace notes aren't
played.
And it occurred to be that it is possible to fix this reasonably
easily. For your case of making 8th note pairs unequal for example the
following Scheme script does the trick:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

(let ()
    (define (swing)
       (if (and    (equal? (d-GetNoteDuration) "8")
                (d-MoveCursorRight)
                (equal? (d-GetNoteDuration) "8"))
        (begin
            (d-SetDurationInTicks 256)
            (d-DirectivePut-note-postfix "Swung" "8")
            (d-MoveCursorLeft)
            (d-SetDurationInTicks 128)
            (d-DirectivePut-note-postfix "Swung" "8")
            )))
(d-MoveToBeginning)
(swing)
(while (d-NextNote)
    (swing))
     (d-CreateTimebase)      
    (d-SetSaved~f))

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

If you paste that script into the Scheme Window and click "Execute"
then it will change the sounding durations of pairs of 8th notes to 1/3
2/3.
The display is a bit wild ... but it's a start.

Richard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]