Search:
Submit Search


Hauptwerk Page Turner

A discussion forum for anything even marginally Hauptwerk-related.

Hauptwerk Page Turner

Postby Bill Skees » Wed Jul 05, 2017 12:33 pm

Any suggestions for how to implement a page-turner piston for a monitor displaying PDF sheet music?
Bill Skees
Member
 
Posts: 3
Joined: Sat Nov 16, 2013 6:58 pm

Re: Hauptwerk Page Turner

Postby smfrank » Wed Jul 05, 2017 12:48 pm

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
smfrank
Member
 
Posts: 130
Joined: Sun Dec 20, 2009 10:53 am
Location: NY, NY

Re: Hauptwerk Page Turner

Postby Organorak » Thu Jul 06, 2017 5:45 am

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.
Organorak
Member
 
Posts: 623
Joined: Sun Nov 22, 2009 7:55 am

Re: Hauptwerk Page Turner

Postby Bill Skees » Thu Jul 06, 2017 6:13 pm

Sounds like exactly what I'm looking for. Yes, I would appreciate your sharing the code. Thanks in advance,
Bill
Bill Skees
Member
 
Posts: 3
Joined: Sat Nov 16, 2013 6:58 pm

Re: Hauptwerk Page Turner

Postby Organorak » Mon Jul 17, 2017 5:32 pm

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
Organorak
Member
 
Posts: 623
Joined: Sun Nov 22, 2009 7:55 am

Re: Hauptwerk Page Turner

Postby Bill Skees » Mon Jul 17, 2017 5:40 pm

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.
Bill Skees
Member
 
Posts: 3
Joined: Sat Nov 16, 2013 6:58 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 3 guests