denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Playback with repeats


From: Richard Shann
Subject: [Denemo-devel] Playback with repeats
Date: Sat, 25 May 2013 10:23:47 +0100

I just realized how to do playback with repeats, I have created a sample
script which does the simple case of one repeat barline somewhere after
the start. It will need first and second time bars and repeat start
barlines, and then some C to play all the bits in a less clunky way on
slow machines...
Here is my first draft:

;PlayWithRepeats
(d-CreateTimebase)
(d-MoveToBeginning)
(let ((timings '())(start-repeat 0.0)(end-repeat #f)(timing 0.0))
  (while (d-NextObject)
    (if (d-GetMidiOffTime)
      (set! timing (d-GetMidiOffTime)))
      (disp "MIDI off time " timing " ok")
    (cond
      ((Music?)
          (disp "music"))
      ((d-Directive-standalone? "RepeatEnd")
          (set! end-repeat timing)
          (disp "Midi repeat from " end-repeat " ok")
          (set! timings (cons (cons start-repeat end-repeat) timings))
          (disp "timings now " timings " ok")
          (set! start-repeat end-repeat)
          (set! end-repeat #f))
    )
  )
(disp "timings is this list " timings " ok")
(d-SetPlaybackInterval (car (car timings)) (cdr (car timings)))
(d-Play
  (string-append "(d-SetPlaybackInterval " (number->string (car (car
timings))) " " (number->string timing) ") (d-Play)"))
)

Does anyone want playback with repeats? Not very useful if you just want
to check the notes are entered correctly by ear... but Nils put it on
the wish list before he left.

Richard





reply via email to

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