How to get sound out of Scala in Ubuntu
Are you using a recent version of Ubuntu (or some other Linux distribution, but for those the instructions might need to be tweaked)? Are you using Scala but the Chromatic Clavier doesn't work? Here's what you need to do:
- Open up a terminal and run "sudo modprobe snd-virmidi". To make this happen automatically when you boot up, add "snd-virmidi" as a new line to the file "/etc/modules" (otherwise you'll need to run "modprobe snd-virmidi" every time).
- In Scala, go to Chromatic Clavier and then go to Sound Settings. Because of the first step, there should now be some choices available for "MIDI Output Device". Pick the one with a 0 in the name (something like "/dev/snd/midiC1D0").
- In your favorite MIDI connection manager (I use aconnectgui), the MIDI output from Scala will now be available as "Virtual Raw MIDI 1-0" or "VirMIDI 1-0". You can now connect that to a softsynth or hardware MIDI device of your choice.
- Have fun with the Chromatic Clavier!
The reason this is necessary, I think, is that Scala uses a legacy "raw" MIDI interface from the days when everyone had MIDI synthesizers (with crappy-sounding soundfonts) on their soundcards, and programs used to access those directly. The snd-virmidi kernel module creates a "virtual" MIDI-enabled soundcard that's really just a way to get Scala's MIDI output to appear as a normal MIDI output port.
Further informations if this still doesn't work
In case NO midi hardware is present and sound is not playing from scala, here is what worked for me :
(thankfully inspired by above instructions, but slightly different)
before starting to launch scala:
- timidity should NOT be present at all on the system (see bug details in connection with Qjack at the end below)
- playmidi should be installed (doesn't need to be started)
- Qjack must NOT be started (and not launched at all is good too)
now be very carrefull of the ORDER of starting the devices :
- first, lanch virtual midi device midi virmidi by typing in terminal :
sudo modprobe snd-virmidi
- then launch YOSHIMI (install it if not present) (yoshimi is a synth which has a role of midi player) (and we can play yoshimi keyboard if we want)
- then launch scala by typing in terminal :
(midi connections are done automatically and can can be seen on aconnectgui or on Qjack (qjack NOT STARTED, only looking at the graph of connections. and if qjack is started, scala doesnt play sounds anymore !!!!, idem if yoshimi is stopped)
Details of scala options to get sound
here are the details of scala options which work fine for me (to be chosen simply while scala is running, if you don't see the buttons, see install note below regarding gnome) :
scala user options:
- SYNTH midi player program : playmidi -e
- MIDI midi file player program (PLAY) « set to scala » midi player : scala
- MIDI SOUND SETTINGS midi output device : dev/snd/midiC1D0 (Pick the one with a 0 in the name)
and that's it...
may be all this is not necessary, or there are better solutions, but this worked for me.
detail of my configuration :
debian 11 (very close to ubuntu)
with gcc 4:10.2.1-1 and gcc 10 and gcc 9 all installed by default on my system
note 1 : I still have problem with the plots which scala can not perform (probably because i have only gnuplot 5.4.1)
note 2 : If you don't manage to even lauch scala, look at instructions below.
Instructions for installation of scala on (recent) linux :
In case you dont even manage to run scala, this is for you. These instructions are inspired (exept timidity and Qjack recommendations) from https://linuxmusicians.com/viewtopic.php?t=23847 (which is itself an update of original installation instructions from scala author on his website.
summarised briefly herebelow :
- download scala from https://www.huygens-fokker.org/scala/ . For 64 bit systems the file to download would be Scala 2.46d for 64-bit GNU/Linux on PC/Intel here : http://www.huygens-fokker.org/software/scala-22-pc64-linux.tar.bz2
- The following software is required by Scala ; to get them, from a terminal run the following command(or from any package manager) :
sudo apt install gnat gnuplot fluid-soundfont-gm
- then create a folder for local software SCALA. When the file scala-22-pc-linux.tar.bz2 is unzipped in that location the full folder path will be
you can try to run Scala with (but it probably won't work) by typing in terminal:
then do the following to install the missing libraries (the unpacked archive contains the needed library libgtkada.so.2.24.4. The solution as spelled out in the INSTALL text file is to copy libgtkada.so.2.24.4 into the /usr/local/lib folder)
- From the /your_directory_location/scala-22-pc64-linux location run the following command in terminal:
sudo cp libgtkada.so.2.24.4 /usr/local/lib
- And also it is possible to extract the libgnat-4.9_4.9.2–1_amd64.deb package ( https://www.ubuntuupdates.org/package/core/xenial/universe/base/libgnat-4.9 ) using an archive manager and place the files libgnarl-4.9.so.1 and libgnat-4.9.so.1 directly in directory /usr/local/lib/ (as we did with libgtkada.so.2.24.4 ) (or perhaps more simple, copy them directly into your scala-22-pc64-linux directory)
- then as before run sudo ldconfig into terminal :
This should allow the software scala to lauch properly.
Note from original message : if buttons not visible or active, do not use gnome, but preferably XFCE (at some point there was a bug related to gnome...)
to go directly to software directory and launch scala :
type into terminal:
or directly and more simple type into terminal:
and if sound is not comming out, mentioning factice sound output, use the specific instructions above for scala sound connection.
Hope this is fine for you too.
possible reasons why sound is not comming out (seen on the forums) :
timidity bug :
Conditions for this bug to appear are:
* timidity-daemon is installed
* timidity service (from the timidity-daemon package) is enabled or
timidity gets started by hand
* No midi device is provided by the kernel
plenty or solutions ar proposed on the forums, I didn't try them all but from those I tried none easily worked... so I give information on what worked finaly for me on the specific instructions above for scala sound connection.