Use MIDI markers to turn pages of sheet music

florian

2009-11-14 10:26:34

A user asked this:

1) When I am playing/singing along with a MIDI FILE live on stage, and the song gets to the end of page 1 of the sheet music, I want the sheet music pages to turn automatically in my Macbook Pro laptop by inserting midi commands at the end of each page.

2) Then, have markers inserted into the MIDI file to go back to a verse or course etc. These markers would be assigned to midi foot pedals. And when the assigned pedal is pushed the marker would trigger the MIDI file to go back to that verse or course in the MIDI file. In this way the MIDI file could be extended as long as the singer desires.

Would the MIDI TRANSLATOR accomplish this for me?

florian

2009-11-14 10:50:15

1) MT Pro should be able to do what you need. The general way of doing it
would be:

All MIDI data of the song is routed to MT Pro using a virtual MIDI port. A "translator" in MT Pro will react on the marker MIDI messages and emulate the keystrokes for turning a page (e.g. PageDown for next page). This will work only if the program that displays the sheet music is currently the active (focused) application. Then it will receive the keystrokes from MT and turn the page accordingly.

As an example, let's arbitrarily define a controller message 4 (CC#4) as marker event for "next page" (when the controller value is 0). You'd need to insert those CC messages into your MIDI file whenever you need to turn a page of the sheet music. Note, a controller message in hexadecimal MIDI notation is 3 numbers of 2 digits each. The first number is B0 (meaning Controller message on MIDI channel 1), the second is the controller number (e.g. "04" for CC#4 or "2A" for CC#42). The last number is the value of the controller (e.g. "00" for 0).

Then configure MT Pro with the following translator:

Code: Select all

Translator 1: CC4: Next Page
Incoming: MIDI B0 04 00
Outgoing: Keystroke Sequence "PageDown"
2) For jumping to specific pages "at random", it depends on the program that displays the sheet music.

2A) If it allows you to define keystrokes for particular pages, then all you need to do is to send that keystroke on reception of that special marker MIDI event.

For example, let's define "CC#5" as your marker event, and the CC value will tell which section, e.g. value=0 will be the beginning of the song, value =1 will be the first verse, value=2 the following chorus, etc. Your sheet music program is configured to use Ctrl+0 to jump to the beginning, Ctrl+1 to the first section, Ctrl+2 to the second section, etc.

Then you need to create these translators:

Code: Select all

Translator 2: CC5 0: Beginning of song
Incoming: MIDI B0 05 00
Outgoing: Keystroke Sequence "Ctrl(0)"
Translator 3: CC5 1: First section
Incoming: MIDI B0 05 01
Outgoing: Keystroke Sequence "Ctrl(1)"
Translator 2: CC5 2: Second Section
Incoming: MIDI B0 05 02
Outgoing: Keystroke Sequence "Ctrl(2)"
... and so on.

2B) If you can configure keystrokes to "jump to the next section", then things get a little more complicated. You'd need to create translators that go back to the beginning and then skip as many sections as needed in order to jump to a particular section. E.g. in order to get to section 2, send the keystroke to go to the first page, then send the keystroke "next section" twice. Let me know if you need help setting this up.

2C) If you can only use "PageUp"/"PageDown" to turn to the previous/next page, it'll be difficult to directly jump to certain pages. There are different ways to achieve that.

One way would be to use a global variable in MT Pro that keeps track of the current page. When you want to give the MIDI command to jump to a particular page, MT Pro will take the difference of the target page and the current page. If it is negative, it needs to send as many "PageUp" keystrokes, otherwise as many "PageDown" keystrokes.

An alternative way would similar to 2B): always jump back to the first page, then flip through all pages with "PageDown" as often as the target page number is.

In any case for 2C, the marker event should send the direct page number and not the section number to jump to.

It might make sense to look for a sheet music display program that supports 2A or, at least, 2B...

Thanks,
Florian