Creating a Pianoteq box

Hi! I’m a total newb when it comes to Linux but I’ve managed to slowly get Patchbox installed and running as well as Pianoteq 6 running with my license.

Now my goal is to make a box that I can just plug my MIDI controller into and play piano whenever I like, so I’d like this to be headless.

I can’t for the life of me figure out how to make Patchbox autostart Pianoteq. I’m in desktop mode, should I be using console instead?

Also, at some point during initla setup I selected a minimoog patch thinking it’d be fun to have that launch at startup… I no longer want that and can’t figure out how to stop it from happening. I’m going out of my mind.

Any help would be appreciated, thank you!

Hi, select the ‘none’ module in patchbox utility’s modules menu to disable autostarted software. Or just run:

patchbox module deactivate

For Pianoteq, check this out: https://github.com/CarlColglazier/pianoteq-patchbox-module

It expects the Pianoteq binary to be installed in /usr/local/pianoteq/pianoteq:

sudo mkdir /usr/local/pianoteq/

# Update the first path argument to the actual
# path to the binary of the full version:
sudo cp ~/Downloads/.../Pianoteq /usr/local/pianoteq/pianoteq

Finally do:

patchbox module install https://github.com/CarlColglazier/pianoteq-patchbox-module

It should end up autostarting the Pianoteq on system startup.

Awesome! Thank you so much, that worked swimmingly!

Now when I start the Pianoteq module is active, but the Pianoteq app has not launched. If I want to tweak the sound or load other patches I would be doing all of that within the module, is that correct? (and possibly doing to Button programming)

Have any resources you could point me to for that process?

Thanks again, huge help!

That’s possible too, a couple of modifications are in order:

First install a missing dependency of patchbox-cli for this to work: (won’t be necessary any more for versions above patchbox, version 1.3.2)

sudo apt install libgtk-3-bin

Then modify patchbox-module.json:

sudo nano /usr/local/patchbox-modules/imported/pianoteq-patchbox-module/patchbox-module.json

add "is_desktop": true, after launch_mode (note the line must end with a comma), so the entire file looks like this:

{
    "name": "pianoteq",
    "version": "0.0.6",
    "description": "pianoteq loader",
    "author": "carl / modartt",
    "launch_mode": "auto",
    "is_desktop": true,
    "depends_on": [
        "jack.service"
    ],
    "services": [],
    "scripts": {
        "install": "install.sh",
        "launch": "launch.sh",
        "stop": "stop.sh"
    }
}

Then remove --headless arg and use of su in launch.sh:

sudo nano /usr/local/patchbox-modules/imported/pianoteq-patchbox-module/launch.sh

so the entire file looks like this:

#!/bin/sh

/usr/local/pianoteq/pianoteq --multicore max --preset "Simple Steinway D"

After rebooting, the Pianoteq software will launch with GUI. Keep in mind that you must select “Desktop Autlogin” boot mode, for it to start automatically without waiting for you to login to the desktop.

Thank you so much for all this help. Sadly, I tried these steps (installed the dependency, modified the 2 files and set to Desktop Autologin) but it’s not launching Pianoteq upon booting yet. Any idea why?

Hi, what output do you get by running these commands:

ps -ef | grep -i piano

patchbox module deactivate

sudo patchbox --user module activate pianoteq-patchbox-module

It could be either a syntax error in the json file (it’s a very strict file format, you can try pasting the contents on https://jsonlint.com/ and see if it’s valid), or a mistake in the file path in the launch.sh script. You may paste the contents of the edited files here to see if we can spot the issue.

That worked! You sir, are a genius.

After that third command it launched Pianoteq, but it was asking for Activation (which I have done already on this computer). But after activating and rebooting, it now launches on startup. Not sure what the issue was, but it appears to be resolved.

Couple follow-up/theory questions if you don’t mind:

  1. Running in desktop mode vs console vs headless, is there any CPU difference without a monitor attached? Like, is the Pi still trying to process graphics even with no output? Is one more more efficient than the others?
  2. If I were to run in console mode instead, would that Pianoteq be accessing my same preferences? (Should I program any options/preferences/presets in Desktop, then leave it in console mode when I simply want to play or gasp gig with this?)

Thank you again for lending me your brainpower. You have made my life better!

1 Like

There shouldn’t be any significant CPU usage difference, as it’s just there idling, only Desktop should take up slightly more RAM.

The Pianoteq should be accessing same location for settings in headless mode too, but you should definitely make sure it does, before the actual gig. :slight_smile: