bugDenemo - Bugs: bug #28346, Metronome mark not seen, script...

 
 

bug #28346: Metronome mark not seen, script tweak

Submitter:  None
Submitted:  Sat 19 Dec 2009 08:04:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 31 Dec 2009 08:54:59 AM UTC, comment #1: 

I appear to have put this in git, but not updated here.

Richard Shann <rshann>
Group administrator
Sat 19 Dec 2009 08:04:58 PM UTC, original submission:  

I wonder if this problem has been fixed in the new fluidsynth version--but it's present in the 0.8.10 windows version.
The midi playback doesn't play back in the correct bpm if it was set in a previous measure.  It only sees bpm settings from the current measure onwards.

Also, I think it might be worthwhile to change the Metronome Mark script so that it puts a standalone rather than a chord directive.  This way, if you enter a MM before you've entered a note (in an empty measure), you'll still get the MM, whereas now, you get nothing after entering all the data. (To see what I mean, from a blank score, try to insert a MM-you get zilch.)  Also can delete them just like deleting a note.

It appears that using it this way works just as well with midi playback on this 0.8.10 version.  The script is below.

Ultimately, it would be nice to have a hard-coded version that included a checkbox for whether it's printed or not (may just want to modify MIDI), and perhaps it could be integrated with the tempo marks (in lilypond, the same command can set tempo and put a tempo mark).  Attached is an image from lilypond tool that is along the lines of what I mean. 

Here's the complete script, modified for standalone marks (gave it some minpixels and set ty, etc.):

(let ((input "") (len 1) (dotted #f)(duration "4")(bpm 60)(midiBpm 60)(valid #f) )
(set! input (d-GetUserInput "Metronome Marking" "Give unit beat duration \n(e.g., 4. for dotted-quarter):" "4" ))
(set! len (string-length input) )
(set! dotted (equal? "." (substring input (- len 1) len ))  ) ;see if a dot at end
 (if (equal? dotted #t)
 (set! duration (substring input 0 (- len 1)))  ;if there's a dot, cut it off from input to get base duration.
   (set! duration input)  )  
   (set! bpm (d-GetUserInput "Metronome Marking"
      "Give number of these beats per minute:" "60" ) )
      (set! valid   (not (equal? (and (string->number duration) (string->number bpm) ) #f)))  ;don't go unless both are numbers.
      ;don't go unless base duration is valid lilypond: (could go higher if wanted):
      (if (and (equal? valid #t) (or   (equal? duration "1")(equal? duration "2")(equal? duration "4")(equal? duration "8")(equal? duration "16"))   )
(begin
;want * 3/2 for dotted,*4 since midi uses quarters and divide by duration,
(if (equal? dotted #t) (set! midiBpm (number->string (floor (* (/ (string->number bpm) (string->number duration)) 6 ) ) ) )
    (set! midiBpm (number->string (floor (* (/ (string->number bpm) (string->number duration) ) 4))  ) )
)
  (d-DirectivePut-standalone "MM" )
  (d-DirectivePut-standalone-prefix "MM"  (string-append "\\override Score.MetronomeMark #'padding = #3
  \\tempo " input " = " bpm))
  (d-DirectivePut-standalone-override "MM" (logior DENEMO_OVERRIDE_TEMPO DENEMO_OVERRIDE_STEP))
  (d-DirectivePut-standalone-midibytes "MM" midiBpm)
  (d-DirectivePut-standalone-display "MM" (string-append input "=" bpm))
  (d-DirectivePut-standalone-ty "MM" 80)
  (d-DirectivePut-standalone-minpixels "MM" 10)
  (d-CursorRight)
)
(d-WarningDialog "Incorrect syntax.")
))

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #19297:  TempoDialog.bmp added by None (120KiB - image/bmp)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by steele (Updated the item)
  • -email is unavailable- added by rshann (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-04 steele Open/ClosedOpen Closed
    2009-12-31 rshann StatusNone Fixed
    2009-12-19 None Attached File- Added TempoDialog.bmp, #19297

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code