Wednesday, April 14, 2021

KX Studio + Seq24, Seq64 and SAMBA Network Shares on Raspberry Pi

This all started with me trying to balance music books against the TV behind my setup. Being a somewhat skilled(?) engineer, I soon surmised this was not working and wouldn't it be nice if by some magic my music was on the TV .....

After iterating through a few more balancing acts (no iPads were harmed mostly) .... the penny dropped. Perhaps a Raspberry Pi connected to the TV would work .....

Requirements

  • Network sharing to my windows computer to view my music books.
  • Extended Goal  1 - can USB MIDI just work out of the box????
  • Extended Goal 2 - what it does ?!?! get me a sequencer!!
  • Extended Goal 3 - World domination

Installing CIFS/Samba support

ref: https://www.raspberrypi.org/documentation/remote-access/samba.md

By default, Raspberry Pi OS does not include CIFS/Samba support, but this can easily be added. The following commmands will install all the required components for using Samba as a server or a client.

sudo apt update
sudo apt install samba samba-common-bin smbclient cifs-utils

Mount the folder on the Raspberry Pi

Mounting in Linux is the process of attaching a folder to a location, so firstly we need that location.

mkdir windowshare

Now, we need to mount the remote folder to that location. The remote folder is the host name or IP address of the Windows PC, and the share name used when sharing it. We also need to provide the Windows username that will be used to access the remote machine.

sudo mount.cifs //<hostname or IP>/share /home/pi/windowshare -o user=<name>

You should now be able to view the content of the Windows share on your Raspberry Pi.

Remove CIFS Drives

ref: https://stackoverflow.com/questions/74626/how-do-you-force-a-cifs-connection-to-unmount

sudo umount -a -t cifs -l

USB MIDI out of the Box & Sequencers for ARM/RPi

I have a Kronos 2011 and using Raspberry Pi OS Buster 10 (2021-03-04-raspios-buster-armhf-full.zip) just worked. Some more googling around brought up two easy sequencer options

Seq24 - abandoned(?) but working basic sequencer. Last release Seq24-0.8.7 (2006-8-13)
Sequencer64 - an updated version of Seq24. Current release 0.96.8 (2020-07-05).

Good news and bad news. Seq24 just installed and worked. Seq64 did not! I also installed QjackCtl.
Sudo apt-get install seq24 qjackctl
Some more googling around pointed to Sequencer 64 working with KX Studio repository installed.

What the %^&$ is KXStudio:Repository?

Never heard of it ... but its something to do with Linux Audio and seems to be an initiative that groups together some well-behaving Linux programs and plugins for audio and video creatives. 

You can follow the instructions on the project page for the up to date instructions but it is currently (as of 2021-04-15) something similar to this;

# Install required dependencies if needed

sudo apt-get install apt-transport-https gpgv

# Remove legacy repos

sudo dpkg --purge kxstudio-repos-gcc5

# Download package file

wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb

# Install it

sudo dpkg -i kxstudio-repos_10.0.3_all.deb

But wait ... there is more. Some more detailed instructions found here on what to do after installing KXStudio Repository.  

sudo apt-get update
Everyone do this one.
sudo apt-get install kxstudio-default-settings

You are actually done installing kxstudio specific stuff. All the tweaks and basic tools are now in place, it's just a matter of what programs/packages you want. You could install just the programs that you want to use singly, or use the following command to add hundreds of pieces of studio software to your computer. (Note if you're going to install single programs from here on out, skip down to the last command. Adding user to audio group is a MUST!)

sudo apt-get install kxstudio-meta-all

The above assumes the easiest way to get EVERYTHING studio related in one shot. 

If you want to pick and choose your packages, go for it! But for beginers it's nice to get it all and sort out what you like in your setup. I didn't install everything. I did some research to see the structure of these repositories and found an option to install Applications Only.

sudo apt-get install kxstudio-meta-audio-application

This left me will all these apps on my ARM Raspberry Pi  .... but still no Seq64!!!

One more command before a restart. You're going to add your user to the audio group, which will be very important to make things run the way you want them to. From the terminal enter:

sudo addgroup `whoami` audio

After the reboot you're done!

Now what about Sequencer64?

Now this was 100% wild guess ... after reboot & the repository install ... perhaps this would work.

sudo apt-get install sequencer64

It did! Now I can get back to procrastinating & generally avoiding improving my musical talent.