It is currently Fri Mar 29, 2024 10:18 am


PDF Page Turning with MIDI signals

A discussion forum for anything even marginally Hauptwerk-related.
  • Author
  • Message
Offline
User avatar

Stuart

Member

  • Posts: 40
  • Joined: Sun Oct 10, 2010 12:02 pm

PDF Page Turning with MIDI signals

PostThu Aug 11, 2022 11:52 am

I have been trying to implement page turning in Mobilesheets using MIDI signals from pedal pistons on my console. When Hauptwerk is not running, I've had success interfacing directly with Mobilesheets with my Midisport 2x2 or alternatively using a spare Tbox 2x2 USB interface. I've also been able to go through Bomes MIDI Translator simulating keyboard arrows.

But, whenever I start Hauptwerk none of the above approaches seem to work, even when the MIDI device of interest is not ticked for either input or output within Hauptwerk. (I've also tried some of the virtual MIDI port software such as LoopBe1 or LoopBe30, or LoopMIDI none of which seem to work with or without Hauptwerk running although they do show up in the port lists in Mobilesheets, Bome, and Hauptwerk.)

I'm not all that familiar with the inner working of MIDI and am wondering if I'm missing something that would be obvious to others? Thanks for any input.
Offline
User avatar

vpo-organist

Member

  • Posts: 306
  • Joined: Wed Apr 29, 2020 6:49 am

Re: PDF Page Turning with MIDI signals

PostThu Aug 11, 2022 12:24 pm

On a Windows PC only one software can use a specific midi port.
Try to find out which midi devices and ports are used by Mobilesheets and Hauptwerk with the tool Midi-OX. With the sixth button in the toolbar you can display the "Midi Port Activity" window. First start Mobilesheets and note the active input ports. Then start HW and look at the active input ports as well.
If identical input ports are used in both programs, then the problem is detected.
Offline
User avatar

Stuart

Member

  • Posts: 40
  • Joined: Sun Oct 10, 2010 12:02 pm

Re: PDF Page Turning with MIDI signals

PostFri Aug 12, 2022 3:02 pm

It appears that my setup (which uses a single encoder for all midi signals except the keyboards) is such that it is not possible to have any two programs running that need MIDI. Even MIDI-OX will prevent Hauptwerk from loading an organ because Hauptwerk detects that one or more ports are already in use. I think I will have to seek another solution to page turning. :( Thanks for the input which did help me understand the issue.
Offline

Organorak

Member

  • Posts: 685
  • Joined: Sun Nov 22, 2009 6:55 am

Re: PDF Page Turning with MIDI signals

PostSun Aug 21, 2022 5:09 pm

Search my posts, I have the same setup but use a workaround to avoid Windows focus issues. In essence I use

1. widescreen 26 inch monitor same size as A4 double spread pages
2. page forward (and back) Midi outputtimg toe and thumb pistons
3. each piston triggers a Midi signal
4. Bomes Midi translator converts that to a key (ie computer) combination, eg I could allocate alt shift f to be forward
5. a simple Autohotkey executable is always running from startup listening for that keystroke. On pressing piston, Bome converts Midi signal to that unique keystroke which triggers AHK to bring your preferred pdf reader into focus and turn the page (or back).

Job done, Hauptwerk carries on playing even if no longer in focus until you next click on it eg for a stop change.

I use Foxit free pdf reader so have to name it in my script. It opens to fullscreen, is easy to notate and unlike Acrobat gives me no audio glitches.
Offline

Organorak

Member

  • Posts: 685
  • Joined: Sun Nov 22, 2009 6:55 am

Re: PDF Page Turning with MIDI signals

PostSun Aug 21, 2022 5:17 pm

My pageforward AHK script:
SetTitleMatchMode, 2
Sleep 1
^!PgDn::
Sleep 1
WinActivate, Foxit Reader
Sleep 1
Send {PgDn}
Sleep 1
Return

My pagebackward AHK script:
SetTitleMatchMode, 2
^!PgUp::
Sleep 10
WinActivate, Foxit Reader
Sleep 10
Send {PgUp}
Sleep 10
Return

I programmed AHK to recognise (and Bome to convert piston Midi signals to)
forward: Control-Alt-PgDn
back: Control-Alt-PgUp

NB you don't NEED the complex keystroke with control and alt, but my HW PC was used for other things so I didn't want Foxit jumping into focus every time I was reading a Word document and pressed Page Down!
Offline
User avatar

Stuart

Member

  • Posts: 40
  • Joined: Sun Oct 10, 2010 12:02 pm

Re: PDF Page Turning with MIDI signals

PostMon Aug 22, 2022 3:05 pm

Thanks for the additional info. I have tried the Bome Translator more or less as you have noted, but was unable to have it work as described - perhaps I got something wrong, or perhaps Windows 11 is even less friendly toward this setup. I eventually found a solution by installing a couple of inexpensive programmable foot switches that connect by USB and issue the appropriate keyboard presses needed by Mobilesheets. Perhaps not quite as neat as using the toe pistons, but they have worked well for over a week now.
Offline

Organorak

Member

  • Posts: 685
  • Joined: Sun Nov 22, 2009 6:55 am

Re: PDF Page Turning with MIDI signals

PostMon Aug 22, 2022 4:35 pm

Oooh that's worrying. I am still on Win 7 and Hw4. I miss not being able to install new samples but have a system that works perfectly after much tweaking. Might I check what you have tried in more detail to try to understand the problem?

Is it that Bome is failing to convert Midi signals to keystrokes in Win 11 (eg if you program a note or piston to "Z" and keep Notepad open, do you get a string of Zs appear?

Is a keystroke eg Z triggering the Autohotkey macro (ensure you have converted the AHK text file to an executable AND the exe is running in the background)

Is the AHK script failing to bring Foxit (or other pdf reader of choice, which MUST be named in the AHK script) into focus and turning the page?

Have you tried it with Foxit in fullscreen mode and showing double pages, setting Zoom to "fit page"?

It works so well for me, I cant be the only one with a working digital music desk and page pistons!
Offline
User avatar

Stuart

Member

  • Posts: 40
  • Joined: Sun Oct 10, 2010 12:02 pm

Re: PDF Page Turning with MIDI signals

PostWed Aug 24, 2022 2:20 pm

I'm not sure I can be of much help since I didn't pursue this very far before changing course to the USB foot pedals. I did find that under Windows 11 the Bome translator worked fine by itself and would accept MIDI inputs and convert them to keystrokes for MobileSheets. But once I started Hauptwerk, the Bome translator ceased to do anything (as did all of the other MIDI loop setups such as LoopMidi. Their ports showed up in Bome and Hauptwerk, but otherwise behaved like they were inactivated.) At that point I wasn't willing to spend much more time on the issue, so I don't have much more to share. Hope this is at least somewhat helpful.

Return to General discussion

Who is online

Users browsing this forum: No registered users and 6 guests