<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <action>ShortMeasure</action>
        <scheme>;;;;;;;;;;ShortMeasure
(let ((duration 0))
   (if (d-MeasureLeft)
  	(d-MeasureRight))
  (set! duration (d-GetDurationInTicks))
  (if (boolean? duration)
      (set! duration 0))
  (while (d-NextObjectInMeasure) 
	 (set! duration (+ duration (d-GetDurationInTicks))))
  (if (d-MeasureLeft)
  	(d-MeasureRight))
  (set! duration (/ duration 12))
  (if (equal? 0 duration)
      (begin
	(d-WarningDialog "No notes/rests in this measure"))
      (begin
	(d-DirectivePut-standalone-postfix "ShortMeasure" (string-append "\\partial 128*" (number-&gt;string duration) " " ))
	(d-CursorLeft)
	(d-DirectivePut-standalone-minpixels "ShortMeasure" 60)
	(d-DirectivePut-standalone-display "ShortMeasure" "Short")
	(d-RefreshDisplay))))
 </scheme>
        <label>Short Measure</label>
        <tooltip>Allow too few notes/rests in this measure. LilyPond will engrave this measure (in all staffs) with the short duration given by notes already present when this command was issued.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
