Page 1 of 1

Hauptwerk Page Turner

PostPosted: Wed Jul 05, 2017 12:33 pm
by Bill Skees
Any suggestions for how to implement a page-turner piston for a monitor displaying PDF sheet music?

Re: Hauptwerk Page Turner

PostPosted: Wed Jul 05, 2017 12:48 pm
by smfrank
http://www.MusicReader.net allows assigning midi messages via keys, or anything else, to turn forward or back. Works very well, and the music does not need to be in focus (the front most window).
Steve

Re: Hauptwerk Page Turner

PostPosted: Thu Jul 06, 2017 5:45 am
by Organorak
That's a helpful program to know about.

The "focus" issue was a puzzle initially for me (namely, if the last program I've clicked in is Hauptwerk e.g. for a stop change, how do you first arrange to click on the pdf then turn the page?) but is overcome by using a MIDI signal for instance via a thumb piston. I have a thumb piston and toe piston for page forward, and another thumb piston and toe piston for page back (necessary if you accidentally turn two pages, or need to return back to play a repeat section).

To implement this in Windows without paying for proprietary software you need to install two additional freeware programs - Bome's MIDI translator and Autohotkey (Bome is postcardware - you can use it without registering but if you send the author a postcard he will provide a registration key).

I have set up Bome to recognise a MIDI signal (e.g. channel 1 note 100) and convert that into a complex keystroke (e.g. Control + shift + PageUp). The reason for having a complex keystroke rather than a single keystroke is that I use my Hauptwerk computer for other things and I don't necessarily want to trigger any pdf document that happens to be open to be brought into focus and turn the page every time I hit the PageUp button on my keyboard, and I don't use Control + shift + PageUp routinely for anything else. But you could just use a single key as long as it isn't used for anything else.

I have written a short Autohotkey script that recognises Control + shift + PageUp and on receiving that signal, brings any pdf document into focus (if it isn't already in focus, which it would be if it has been opened since the last time any Hauptwerk changes were registered) and turns the page up or down. I also have a shortcut to the script in my Startup folder so that on logon the AHK script automatically runs all the time in the background. This all happens very quickly on activating the piston.

I use Foxit as my default pdf reader. It seems to have all the advantages of Adobe Acrobat including being able to annotate, but with the further advantages that it can be set to automatically open any document fullscreen, and that its home screen has a list of recently opened files that can be helpful to review during a practice session.

I'm happy to share the AHK script if anyone would like me to.

Re: Hauptwerk Page Turner

PostPosted: Thu Jul 06, 2017 6:13 pm
by Bill Skees
Sounds like exactly what I'm looking for. Yes, I would appreciate your sharing the code. Thanks in advance,
Bill

Re: Hauptwerk Page Turner

PostPosted: Mon Jul 17, 2017 5:32 pm
by Organorak
Having had a few reques5s to share my Autohotkey codes, here we go. Note:

(1) You need to be running Bome's MIDI translator which is postcardware (ie free if you mail the author a postcard). Bome can be made to start up automaticcally with Windows by placing a shortcut to it in the Wundows shortcut folder (for my PC the username is Organ and so the shortcut must be placed in C:\Users\Organ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) You also need to run Autohotkey.

(2) The computer keyboard shortcuts I use to program into Bome's MIDI translator are Control, Alt, Pageup and Control, Alt, Pageup. I could have just used Pageup without the simultaneous Control plus Alt but if I did so, I would find whenever I pressed the Pageup key on my PC keyboard when reading say a Woed document it would activate the macro and bring any open pdf into focus and turn the page in the pdf!

(3) The Sleep command is potentially unnecessary but just builds in 0.001 seconds between lines of code to avoid crashing the macro if it tried to do things too fast.

(4) I use Foxit Reader rather than Adobe Reader. It's free and has similar functionality including ability to annotate. But it scores by having an option to open files in fullscreen by default rather than each file needing to be created that way to open fullscreen in Acrobat. If you use Adobe Acrobat, just substitute "Adobe Reader" for "Foxit Reader" in the scripts below.

(5) After creating the AHK scripts you must first compile them (right click the script and select Compile to create an application). Then create a shortcut to each application and put the forward and back shortcuts in the afore-mentioned shortcut folder so they run when you boot up.

Job done!

Page forward
SetTitleMatchMode, 2
Sleep 1
^!PgDn::
Sleep 1
WinActivate, Foxit Reader
Sleep 1
Send {PgDn}
Sleep 1
Return

Page backward
SetTitleMatchMode, 2
^!PgUp::
Sleep 1
WinActivate, Foxit Reader
Sleep 1
Send {PgUp}
Sleep 1
Return

Re: Hauptwerk Page Turner

PostPosted: Mon Jul 17, 2017 5:40 pm
by Bill Skees
Several things here for me to look into. Thanks for the guidance. I'll see what I can do with it and get back to you.

Re: Hauptwerk Page Turner

PostPosted: Sat Feb 10, 2018 6:46 am
by ludu
Up to now, I used PDF-XChangeViewer for my scores. Reading Organorak’s posts, I have tried Foxit Reader. This program has an advantage on PDF-Viewer: the full screen can display 2 pages at the same time. But on the other hand, I don’t see in Foxit any setting in order to avoid the paging 3–4 instead of 2–3, for example. In a music score correctly engraved, the easiest page turn is always after an odd page. Or do I miss something?

Re: Hauptwerk Page Turner

PostPosted: Sat Feb 10, 2018 7:43 am
by Jan Loosman
I also use music reader for my music. To turn the pages i use the outher foot pistons.
My built in midi card has 2 midi out usb connections. Lucky me!
For the music reader software i use a old mini computer not longer used in my work and connected to the second midi out.
Works perfect.

Regards Jan

Re: Hauptwerk Page Turner

PostPosted: Sat Feb 10, 2018 8:10 am
by ludu
I have bought MusicReader in the past, but I don’t like at all this program (many bugs, a Spartan interface and too few midi inputs). And it does not resolve the problem I have explained here above, concerning the paging.

Re: Hauptwerk Page Turner

PostPosted: Sat Feb 10, 2018 8:25 am
by Jan Loosman
The music reader pro version allows you to use 2 pages on your screen.
The basic license only allows one page.

Jan

Re: Hauptwerk Page Turner

PostPosted: Sat Feb 10, 2018 8:27 am
by ludu
Yes, but it does not allow to avoid the paging 3–4 instead of 2–3 (see my post above).