Topic: Record / replay functionality in headless mode

Hello all,

I managed to set up the Pianoteq in headless mode on my Raspberry pi 4, with the help of notes in this thread (Thank you guys). It works flawlessly, no cooling needed.


The issue I am facing now is not actually related to the Raspberry Pi.

The thing is I want to be able to control the rec/play/stop/pause feature of Pianoteq using midi messages but in headless mode.

I configured the global midi mapping for Pianoteq in the same way as it is in the existing 'full-feature' midi mapping.
(Plus I added some other mapping for switching between the instrument presets).

I'm using a custom web application as a controller, running in the browser on a tablet connected to the raspberry pi via USB cable.

And it works great if I run the Pianoteq in graphic mode. But if run with the --headless parameter, only the preset switching work, bot not the record/replay/etc features.

I even tested it on windows (with both my web app and the Pianoteq connected to the loopMIDI) - with the same result - works in graphic mode, not in headless mode.


Did anyone try similar things? Is this behavior intentional, or is it a bug? Any thoughts about how to achieve my goal?



PS: This is the controller app I'm working on https://pian.co/rc - if anyone is interested - but it will not work correctly without the same midi mapping setup I use (this one).

Last edited by drahoslove (14-02-2021 23:10)

Re: Record / replay functionality in headless mode

Looking at midi assignment options for record, stop, etc., they are all part of "Midi Sequencer (standalone)".  I wonder if the "standalone" designation means it's only available if the standalone Pianoteq app (i.e., the gui) is running.

Using a separate midi recorder/player and/or sequencer application or utility would be one way to get what you want.  Would also require you to do some midi routing on the pc/mac/rpi. 

On raspberry pi, it might also be made to work if you run the Pianoteq gui app without a monitor, but so it could be used remotely via a VNC viewer on a different machine.  Unless I'm forgetting something, I don't think this is headless as far as Pianoteq is concerned; the gui app is running in a virtual x-server; you don't start it up with --headless option.  Of course, it's also using extra resources on the raspberry pi, which are somewhat precious.  If you're running on an actual pc, same approach should work and there's less concern about the gui using resources.