Patchbox OS image 2020-03-14 (and MODEP)

thanks for the update.
tried it today with pi4, old version pisound,
got everything working except for jack.
can start jack with pisound.

Which config parameters did you use for Jack? The most important one is the sampling rate - Pisound supports 48, 96 or 192 kHz.

I reinstalled the image, now it works. checked several setups (48 or 96, 64/128/256 blocksize, 2)
But have to start jack manually after every startup via patchbox setup.
(auto-login to user patch, desktop GUI on)

And it runs all fine, when starting the pure data module via patchbox-config.
… think I just missed selecting that. :slight_smile:

Just found out, that the issues seems to be the fan SHIM software.
The autoscript controlling the fan seems to conflict with pisound / pisound button.
when leaving the autoscript off… everything is fine.

What is the Fan Shim you are using? What is its button supposed to do?

It is the Fan, mentioned by @rbn here: PiSound with Raspberry Pi 4
After starting the background process described here pisound button reacts not or with a several seconds long delay.

The button on the Fan is used for manually switching it on/off apply it to trigger other functions/scripts.
To me it appears, as if the fan button and pisound button are both connected the same way to the Pi, and so one also switches for the other.

That is no problem, if it is possible to control the fan with terminal or scripts. But when using the python scripts as described in the Fan Shim Manual, pisound button does react strange and all related processes (like Pd Startup) become very very slow, and then there is no Audio coming out, until turning the processes off and rebooting.

Sorry, that I cant offer any better help in this case and just can describe. But
solving this issue would make fan work, that fits perfectly between Pisound and Pi and does not require soldering. Think this could be a great option for a lot of people.

1 Like

Thank you for reporting these issues, I have released a fix for the MIDI Learn and will look into the other issue a bit later.

Anyone experiencing the MIDI Learn issue may get the fix by running:

sudo apt update && sudo apt install modep-mod-ui

Indeed, the same button pin is used on Pisound :slight_smile: @rbn, any advices on how to get it play nice together with Pisound?

Btw, I see the fan uses BCM 18 too which is actually critical for the I2S audio interface, so if possible, any fan functionality related for that pin should not be used. This is a quote from Fan SHIM product page:

Because Fan SHIM uses pin BCM18 to control the fan, and this pin is also used by I2S audio devices, you won’t be able to use I2S DACs like pHAT DAC, pHAT BEAT, and the IQAudio boards at the same time as Fan SHIM

1 Like

Hey this is great! I’ve been able to get Modep working, however so far have been unable achieve this
without logging in with a keyboard/monitor every time i boot up.

No option for auto login seems to appear in sudo raspi-config.

How can I achieve this?
Thanks so much!

Hey, do you mean you must login manually in order for MODEP to work? Or you simply want no login prompt after booting the system?

If you want auto login, run sudo raspi-config, go to 3 Boot Options, then B1 Desktop / CLI and pick one of the options with ‘Autologin’ in them.

I have added the autologin options to patchbox->boot menu. You simply have to run patchbox->update to get the config utility updated.

This issue is now fixed as well, again, run the same command to get the fix:

sudo apt update && sudo apt install modep-mod-ui

Yeah, for some reason the usual boot options that include auto login aren’t showing up.
I’ll run patchbox-update and give the options you added a try.
Thanks!

Looking forward to trying this! Will your MODEP packages work on a regular Raspbian setup, and if so, is there a place to grab the binary packages? Thanks!

Yes, it’s possible to install MODEP on Raspbian:

  1. Set up our apt server:

    curl https://blokas.io/apt-setup.sh | sh
    
  2. sudo apt install modep -y.

    While the Jack backend is being installed, answer ‘yes’ to the realtime priority question asked (‘no’ works too, the answer you give doesn’t really matter for MODEP, as it’s started using systemd services)

  3. Edit /etc/jackdrc to set the command line for Jack backend, if you are using a different card than Pisound.

  4. Ensure that all the critical services are running, if one of them failed, the UI won’t be accessible. Start fixing from the jack service errors, then modep-mod-host and finally modep-mod-ui. Most likely cause of issues is Jack misconfiguration.

    sudo systemctl status jack
    sudo systemctl status modep-mod-host
    sudo systemctl status modep-mod-ui
    

    Use start or restart instead of status in above commands to start the services. Use sudo journalctl -u jack and similar to see the full output logs.

  5. To get MODEP to autorun on startup run:

    sudo systemctl enable modep-mod-ui
    
2 Likes

Perfect - thanks for the detailed response!

Lovin’ it.
Got it up and running with a Pisound 1.0 and RPI 4.
Everything seems to be good, except BOTH kernels, stock/realtime, disconnects the bluetooth/app.
Is there another workaround, or do we have to wait for a bluetooth bug fix?

Right after I posted that last one about a bug fix I did an apt upgrade it found some bluetooth updates. I reboot and re-paired it and NO MORE CONNECTIVITY DROPS.

patch@patchbox:~ $ sudo apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
bluez libbluetooth3
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 857 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y

1 Like

Thank you for reporting this, did BT connections work well even when using the realtime version of the kernel?

This is what I’m seeing now. I burned a fresh image, updated patchbox, and configured jack to use pisound: 48000, 128, 2

After I power-on the jack service is dead, but it runs if I start it.

How to debug?

hey @joebowbeer,
don’t think this is a bug.

There is the concept of modules:

After I activated the Pure Data Module and restarted the Pi,
Jack was starting up automatically, and works fine at many different settings …didn’t try all combinations :wink: