Stefan Sauer

Articles and Webapps


Project maintained by ensonic Hosted on GitHub Pages — Theme by mattgraham

Ensonic’s articles and web app experiemnts

On this page I’ll host some articles and publish some web app experiments.

Web app experiments

When you open any of those below in a modern browser (tested with chrome) you should get a banner asking whether you’d like to install the app. If such a banner does not show up, open the 3-dots menu on the top-right and select “Install ‘App Name’” / or “Add as a desktop shortcut”. When you start the app though the newly created shortcut they will open in fullscreen and work offline. The apps will also auto update (when online). To force an update delete cached ontent for the app from chrome. On Android open the page, tap the 3-dots menu, select the circled ‘i’, select website- settings and there tap the trashcan to delete cached files. Then close the dialogs and swipe the page down to reload. This will update the cache for the pinned app.

To serve an app for local development, run:

cd apps
python3 -m http.server 8000

and then open http://localhost:8000//

Music theory

In order to have more music theory for reference in a compact form, I am working on some cheat sheets. Each of them comes with the code to generate them.

Using a Joystick/controller for midi

In my studio I am using the Novation Launchpad X a lot. It is compact and gives me 8 octaves to play. Occacionally I am missing a pitchbend / modwheel though. A few days a good I discovered an old usb joystick with 3 axis - two for the actual joystick and one thruster (that does not revert back to 0). Using such a device as a midi controller is not a new idea at all. Here is how I’ve set it up:

> cat /etc/modules-load.d/virmidi.conf 
snd_virmidi

> cat /etc/modprobe.d/90-virmidi.conf
options snd-virmidi midi_devs=1
# or if you need multiple devices:
options snd-virmidi enable=1,1 midi_devs=1,1 index=10,11 id=VirMIDI10,VirMIDI11

# Apply the options (command below is for OpenSuse, might be different for other distros)
> sudo mkinitrd

> cat /etc/udev/rules.d/90-midijoystick.rules
# Bus 001 Device 004: ID 06a3:0502 Saitek PLC ST200 Stick
SUBSYSTEMS=="input", ENV{ID_VENDOR_ID}=="06a3",ENV{ID_MODEL_ID}=="0502", TAG+="systemd", ENV{SYSTEMD_WANTS}="midijoystick.service"

> cat /lib/systemd/system/midijoystick.service 
[Unit]
Description=usb joystick to aseq midi deamon

[Service]
ExecStart=/usr/bin/aseqjoy -0 10 -1 11 -2 1
ExecStartPost=/bin/sh -c "/usr/bin/sleep 2s && /usr/bin/aconnect Joystick0:0 'Virtual Raw MIDI 0-0':0"

The example above uses a version of seqjoy with some patches to better support gaming devices and to be able to send pitch bend changes. You will need to adjust /etc/udev/rules.d/90-midijoystick.rules and put the values for your joystick/gamepad there (use the lsusb command to find the vendor- and model-id values).

The whole setup will start aseqjoy automatically when you connect the device and will also run aconnect to feed the values into virmidi. The virmidi setup is required for Bitwig Studio, since that has no support for the alsa sequencer api.

Bitwig Studio on OpenSuse

I am using Bitwig Studio on openSUSE Tumbleweed.

Since the Bitwig Studio packages are made for Ubuntu, they need to be converted from deb to rpm:

V="3.3"
# converting deb to rpm (warning, its slow)
sudo alien -rv bitwig-studio-$V.deb

# installing
sudo rpm -i --test bitwig-studio-$V-2.x86_64.rpm
sudo rpm -i bitwig-studio-$V-2.x86_64.rpm

# upgrading
sudo rpm -U --test bitwig-studio-$V-2.x86_64.rpm
sudo rpm -U bitwig-studio-$V-2.x86_64.rpm

I am using the stock gnome desktop. I installed this cpufreq add-on to switch the govenor to performance mode. This gives less jitter on the dsp graph.

And I used the realtime-config quick-scan script to tweak some system settings. I am not using a preempt-rt kernel though, for composing 5.8 ms latency are more than enough.