Yoshimi on the Raspberry Pi

For all other computers and operating systems, including Atari, Linux and mobile apps.

Yoshimi on the Raspberry Pi

Post by Folderol »

Well I finally got round to making a serious attempt to get this working on my Pi 3B, which has been languishing in a draw for many months. Please excuse some to the techie details if you don't know what they are :tongue:

I used rasbian-lite as a base, then just pulled in xorg, openbox, rox, and the minimum dependencies to install the current Yoshimi master.

I cheated, and used installing qjackctl to get it to configure the Pi for audio, but don't actually run jack with it - performance is not as good as all Alsa. I also used cpufrequtils to push the Pi up to 'performance'.

Oddly, cat /proc/cpuinfo doesn't show the clock rate, but it does increase the bogomips when performance is set. Still not brilliant goes from 36 to 74 (but not really sure what that actually means).

Unfortunately there is a only single USB hub, and I have to use all 4 ports, so that prolly doesn't help.

I'm getting not brilliant, but usable results working at either 44.1k or 48k with a buffer of 512, Alsa Midi and audio. This is using one of the very small USB audio modules. This can just about drive a pair of sensitive headphones, and connecting it to a proper amp gives a surprisingly good response.

There is no RealTime kernel available from raspbian, but running a CPU monitor tends to suggest the audio is hogging one core, and the others show some activity with GUI and keyboard action. The Pi CPU runs only slightly warm. I haven't tried running it headless yet, but suspect it would be a very small improvement.

I'll take it along to SynthFest and run it alongside my laptop (which will be running the KA6). This means I can take the audio across via KA6's inputs 1&2, and push it out amplified to the same speakers :)

I'll be leaving it all out in the open - so hopefully it will create a bit of interest :)
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by BJG145 »

Cheers Folderol, good to know it's working... :thumbup:
User avatar
BJG145
Longtime Poster
Posts: 8088 Joined: Sat Aug 06, 2005 12:00 am Location: UK

Re: Yoshimi on the Raspberry Pi

Post by Eddy Deegan »

Really nice work Will... any chance of a dd image? ;-)
User avatar
Eddy Deegan
Moderator
Posts: 9988 Joined: Wed Sep 01, 2004 12:00 am Location: Brighton & Hove, UK
Some of my works | The SOS Forum Album projects | My Jamuary 2025 & 2026 works

Re: Yoshimi on the Raspberry Pi

Post by Drew Stephenson »

And if you can't get it running to your full satisfaction you can console yourself with the knowledge that you've provided most of the script for the next computer-hacker-vs-the-terrorists blockbuster movie.
:)
User avatar
Drew Stephenson
Apprentice Guru
Posts: 29722 Joined: Sun Jul 05, 2015 12:00 am Location: York
(The forumuser formerly known as Blinddrew)
Ignore the post count, I have no idea what I'm doing...
https://drewstephenson.bandcamp.com/

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

Eddy Deegan wrote:Really nice work Will... any chance of a dd image? ;-)

Uploading in progress but it s S L O W. ISP is throttling me to 120k and its a 1.3G file. Taken 30min to get to 20% :(

Target time looks to be aboit 13:30. I'll update when it's done.

When complete it will be at:
http://www.musically.me.uk/themainevent/yoshimiPi.zip
This will unpack to an 8G image file which can be DDed to the card.
I'll prolly leave it in place till at least Tuesday. If you can confirm it works for you, I'll leave it longer and let people at synthfest know it's available :)

It's not verified as I don't have any spare cards, and don't want to risk trashing what works!
Login is the default 'pi', password 'raspberry' - not exactly high security so i didn't bother to set up a new user. However, I did enable root access - password available on request :)

Finally, when you first run it Yoshimi will complain it can't find an audio device, unless by some amazing coincidence you have the same mini usb module as me :)
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

OK, it's there now - a bit quicker than I expected :)

I'd be very grateful if someone could try it out as soon as possible. There's no point in me writing out a guide for novices if it doesn't at l;east install correctly!

Oh, and...
@BD :tongue:
Last edited by Folderol on Sat Sep 28, 2019 1:09 pm, edited 1 time in total.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Eddy Deegan »

Thanks Will :clap::clap::clap:

I've downloaded it and I'll let you know how it goes (hopefully Tuesday as I had to order a new Pi)!
User avatar
Eddy Deegan
Moderator
Posts: 9988 Joined: Wed Sep 01, 2004 12:00 am Location: Brighton & Hove, UK
Some of my works | The SOS Forum Album projects | My Jamuary 2025 & 2026 works

Re: Yoshimi on the Raspberry Pi

Post by Nazard »

I'd be very grateful if someone could try it out as soon as possible.

Thank you, Wonks, I'll give it a try if I can find a spare micro SD card.

Incidentally, I was lucky enough to pick up a Pi4 (4Gb) from Rapid a few weeks ago, which is superb. Wow, is it quick and responsive!
Nazard
Frequent Poster
Posts: 797 Joined: Sat May 15, 2010 12:00 am

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

In view of the interest shown at Synthfest (and the very generous gift of a Pi4) I've decided to try and make a complete and compact Yoshimi-Pi system. This will comprise a 7inch HDMI monitor that will sit on a 'base unit' comprising the PI itself,USB-Audio module and PSU. The PSU will use a standard mains lead and power both the Pi and the monitor.

I'll also keep track of the cost of all parts.

The only extras would then be a mouse and keyboard.

I'm currently waiting for bits to arrive, and will get on with this as soon as possible. I should have a clearer idea of how well this works sometime next week, but the following week I'll be in Germany, so might not be able to make much progress beyond proof of concept until November.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Eddy Deegan »

Folderol wrote:In view of the interest shown at Synthfest (and the very generous gift of a Pi4) I've decided to try and make a complete and compact Yoshimi-Pi system. This will comprise a 7inch HDMI monitor that will sit on a 'base unit' comprising the PI itself,USB-Audio module and PSU. The PSU will use a standard mains lead and power both the Pi and the monitor.

I'll also keep track of the cost of all parts.

The only extras would then be a mouse and keyboard.

I'm currently waiting for bits to arrive, and will get on with this as soon as possible. I should have a clearer idea of how well this works sometime next week, but the following week I'll be in Germany, so might not be able to make much progress beyond proof of concept until November.

You just made my day! Put me down for one with certainty. I'll also get my youtube friend to film a demo video for you of me going nuts on it if you'd like :thumbup:
Last edited by Eddy Deegan on Thu Oct 10, 2019 7:56 pm, edited 3 times in total.
User avatar
Eddy Deegan
Moderator
Posts: 9988 Joined: Wed Sep 01, 2004 12:00 am Location: Brighton & Hove, UK
Some of my works | The SOS Forum Album projects | My Jamuary 2025 & 2026 works

Re: Yoshimi on the Raspberry Pi

Post by ConcertinaChap »

If I get to see Eddy going nuts on it I'd get one of these for sure! Put me down for number 2 :)

CC
User avatar
ConcertinaChap
Jedi Poster
Posts: 15246 Joined: Wed Jul 20, 2005 12:00 am Location: Bradford on Avon
Making music: Eagle Alley
Recording music: Mr Punch's Studio

Sir, more than kisses, letters mingle souls. - John Donne

Re: Yoshimi on the Raspberry Pi

Post by BJG145 »

Maybe you could base it on a Pisound?

That would be great 'cos then I could just stick a card in mine.

Image
Last edited by BJG145 on Thu Oct 10, 2019 8:54 pm, edited 4 times in total.
User avatar
BJG145
Longtime Poster
Posts: 8088 Joined: Sat Aug 06, 2005 12:00 am Location: UK

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

A bit more info - while I wait impatiently for the screen and cable to arrive.

Using the Pisound is unfortunately not an option. For a start it massively increases the total cost, but also the case style would not work with the extras I'll need to install.

Yoshimi can in fact run at 192k, but with much increased processor loading. The module I'm currently testing with costs about £10 and runs at 48k 16bit. This sounded fine at the show, and also sounds fine directly running a pair of Sennheiser phones, as well as through a sudo-balanced lead into my main amp at home. However, what I'm thinking of doing is fitting a standard TRS plug to the case for ease of use with phones etc. but also leaving the USB port exposed so it can be unplugged and a high quality unit plugged in - this of course to some extent negates the self-contained nature!

The Pi4 uses a micro HDMI socket. These are rather fragile, and there are reports of the plugs breaking after a few plug/unplug cycles, so I'm considering making this a captive lead. The other end is a standard size HDMI plug, so much more robust.

The captive (but replaceable) lead idea I've used in the past is to cut a grove in the box where it meets the lid that's a fairly close fit but allows some movement, then put a strain relief clip inside the box.

I'm also considering finding a way to do a whole system shutdown rather than standby, with a latching relay on the mains in, so you will press a button to power up, like you would on a conventional computer. There would actually be zero demand after you do the normal shutdown from the desktop.

I'll almost certainly use a diecast metal case. They are easy to work with, provide effective screening and heat dissipation. They are also are pretty robust. Yoshimi will only use one CPU core heavily, and the others quite lightly, so it's most unlikely I'll actually need the heatsink with the one I've got.
Last edited by Folderol on Fri Oct 11, 2019 11:26 am, edited 2 times in total.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by The Elf »

So Yoshimi is about to become a 'hardware' sound module, addressable over USB from a DAW? If so, it becomes a much more viable proposition for my working methods.

Or have I misunderstood?
User avatar
The Elf
Forum Aficionado
Posts: 21437 Joined: Tue Aug 14, 2001 12:00 am Location: Sheffield, UK
An Eagle for an Emperor, A Kestrel for a Knave.

Re: Yoshimi on the Raspberry Pi

Post by BJG145 »

It sounds very cool Folderol, good luck with it! :thumbup:
User avatar
BJG145
Longtime Poster
Posts: 8088 Joined: Sat Aug 06, 2005 12:00 am Location: UK

Re: Yoshimi on the Raspberry Pi

Post by Eddy Deegan »

Folderol wrote:... through a sudo-balanced lead

At first I was "eh, wot?"

Folderol wrote:Yes. I am that Linux nut.

And now I'm "Yes. Yes you are." :lol:
User avatar
Eddy Deegan
Moderator
Posts: 9988 Joined: Wed Sep 01, 2004 12:00 am Location: Brighton & Hove, UK
Some of my works | The SOS Forum Album projects | My Jamuary 2025 & 2026 works

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

Opps! My excuse is I wrote that before lunch :tongue:

@Elf: That's exactly what I'm hoping to achieve.

@BJG145: Thanks, it should be an interesting challenge.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by The Elf »

Folderol wrote:@Elf: That's exactly what I'm hoping to achieve.

Then you now have my attention! :thumbup:
User avatar
The Elf
Forum Aficionado
Posts: 21437 Joined: Tue Aug 14, 2001 12:00 am Location: Sheffield, UK
An Eagle for an Emperor, A Kestrel for a Knave.

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

To put it mildly, I am a little less than delighted with Amazon.

The monitor I ordered was quoted as due for delivery today. Well I just checked on-line and this has now magically changed to between the 26th, and 5th November - right in the middle of the time I'll be in Germany :madas:

I do have another HDMI capable monitor, but it's a bit inconvenient to say the least. It's hooked up to this computer.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Wonks »

Cancel and get another one.
Last edited by Wonks on Tue Oct 15, 2019 12:42 pm, edited 1 time in total.
User avatar
Wonks
Jedi Poster
Posts: 19210 Joined: Thu May 29, 2003 12:00 am Location: Freethorpe, Norfolk, UK
Reliably fallible.

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

It is supposedly on its way, and too late to cancel - makes me wonder were it's coming from!

The situation is annoying but not a total disaster. I can keep on refining this on the Pi 3B. In particular the physical layout in the box is not completely decided, and some notes in a document folder might be a good idea :tongue:
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Wonks »

Just contact their customer service team. The contract was placed based on the stated quick delivery (always take a screen shot with Amazon!). Moan and raise hell!
User avatar
Wonks
Jedi Poster
Posts: 19210 Joined: Thu May 29, 2003 12:00 am Location: Freethorpe, Norfolk, UK
Reliably fallible.

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

Quite honesty, on this occasion it's not worth the hassle. The fact it's so long suggests it's coming from some 'distant' country, so Amazon won't make it an easy ride. I know the corner shop takes deliveries for locals sometimes, so I can always ask if they will accept this for me.

Besides, it's given me more time to plan layouts etc. (also knocking about a tenner off the component price). The icing on the cake, is that I've discovered a better base system than Raspbian so that even the 3B is now giving very presentable results. Added to which startup is now down to ~15 seconds and shutdown ~7 seconds :)
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: Yoshimi on the Raspberry Pi

Post by Eddy Deegan »

Folderol wrote: Besides, it's given me more time to plan layouts etc. (also knocking about a tenner off the component price). The icing on the cake, is that I've discovered a better base system than Raspbian so that even the 3B is now giving very presentable results. Added to which startup is now down to ~15 seconds and shutdown ~7 seconds :)

:clap::clap::clap:
User avatar
Eddy Deegan
Moderator
Posts: 9988 Joined: Wed Sep 01, 2004 12:00 am Location: Brighton & Hove, UK
Some of my works | The SOS Forum Album projects | My Jamuary 2025 & 2026 works

Re: Yoshimi on the Raspberry Pi

Post by Folderol »

Progress Report:

After a short panic when Amazon said the monitor was delivered last Friday, it actually arrived about half an hour ago. I could at last make tentative tests on the Pi 4. The monitor looks, and feels quite solid and robust.

Being somewhat impatient I used the same card as I'd been running on the Pi 3 and was first a bit miffed that the desktop image didn't appear. However, I manged to work round that and got Yoshimi started and displayed. With the size of screen the main window fits well and the text is very clear albeit small. Other windows also seem to be well proportioned.

Next, the performance. I started out cautiously at first with a few lightweight sounds. Everything was fine, so I went for some of the bigger ones. Still no issues. Took a deep breath and loaded up the most complex and processor hungry patch of the lot. Breezed through it, to the extent I threw caution to the wind and and started playing arpeggios. It's only on a mini keyboard at the moment, so I was limited to a degree. However, I'm frankly astonished at the performance. I couldn't detect a single Xrun, dropped, or stuck note.

I had it on a 5V bench PSU (fed via the GPIO pins)) and the current consumption remained well below 1A, mostly about 700mA.

I'll order the case and other bits now, and get to work on a full build. I'll also make a dedicated P4 image with all the goodies.

P.S.
One thing that's clear, is that you absolutely must not unplug the USB audio module while running. It will crash most resoundingly, likely requiring a power-off reset, and the attendant risk of SD card corruption.
User avatar
Folderol
Forum Aficionado
Posts: 20889 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?
Post Reply