Mantis - Squeak
Viewing Issue Advanced Details
7775 OS-Linux major always 06-25-13 18:05 10-20-17 22:21
new 4.4  
0007775: unix midiplugin cannot play standard instruments via ALSA midi connection
The MIDI plugin is expected to be able to play sounds using the standard MIDI instrument list; on unix with ALSA sound drivers (i.e. on the Raspberry Pi in this case) this seems not to work. Apparently this has been a problem for some time since the Scratch code using it has been commented out since 2009.
The result is that a lot of sounds are very sub-par for the users of Scratch on any unix platform and of course the Pi. This is a pity, since it gives a very poor impression.
After gazing at the unix midi code I had to conclude that it didn't look like it could work at all, but what do I know? At the simplest level, querying the number of ports seems to give an answer that classes with related functions that get passed a port number. Compare, for example, sqMIDIGetPortCount and sqMIDIGetPortDirectionality [^] (18,532 bytes) 06-25-13 18:05

04-07-17 05:53   
More info about ALSA here: [^]
10-20-17 18:29   
awesome, thanks travm1 [^]
10-20-17 22:21   
Oh my, I'd forgotten about this; long time ago.
The problem was actually 'fixed' a couple of years ago by someone (and I can't find any trace of the name, but Yoshiki might recall since it is one of the Japanese squeakers) who wrote a shell scfript to install Timidity and soundfonts.

It works, but Timidity seems to have a resource leak since it gradually takes more and more cpu%. There are timing issues as well, with the HDMI sound being particularly strange.

The script on the Pi is /usr/share/scratch/