Thanks Elektrofon and Giedrious. I had to manually add these two config.txt lines above on my original full-fat build (with monitor) to work. The automated install script ran but didn’t add these lines (tested twice).
I’ve had a look but cannot find config.txt on the Pianoberry fileset. Are these unzipped on boot? If so, not sure how I find config.txt and edit without a monitor. This is where two days of Rasberry Pi and linux is letting me down - my apologies.
When the system is running, the config.txt file should be here:
/pianoberry/pianoberry/p1/config.txt
Thanks Giedrius. I’m slowly working my way through this, but finding Tiny Core Linux without a GUI quite restrictive for a Linux beginner. It looks like I will need to build a new Pianoberry image to cover a change to Pianoteq91.prefs reflecting the change to pisoundmicro - This is what this looks like on my official Raspberry PI OS:
deviceType=“ALSA” audioOutputDeviceName=“pisoundmicro, PSM-0A3KSVE adau-hifi-0; Direct hardware device without any conversions”
What a great project, thank you, Elektrofon! Exactly what I was looking for to improve the aging digital sound of my Yamaha YUS-5 SG hybrid upright without always hooking up my MacBook. A Pisound & case are already on their way to me.
A few questions:
-
What’s the recommended RAM size for the Raspberry Pi just for this use case? 2/4/8/16 GB? I have a Pianoteq 9 Pro Studio licence that includes all instrument packs, which may increase RAM needs. Of course, more RAM never hurts, and I don’t mind the extra cost, but it might increase system temperature.
-
Is the Raspberry Pi active cooling system required for this setup? Its docs say not to take it off once it’s mounted, so I’d like to understand this beforehand.
Thank you!
Welcome @Orcmeal !
-
Since Pianoteq does direct DSP – meaning it computes samples and writes more or less directly to the output buffer – I don’t think it requires much RAM. Couple that with Pianoberry running it headless and we remove the overhead of the GUI. It would not surprise me if this ran just as well on 512MB of RAM as it does on 8GB. I forget what my Raspberry Pi 5 is equiped with but I believe it is the 4GB model. The OS also runs in RAM so we have to take this into account as well. Getting a 4GB Raspberry Pi 5 is the right choice I think; you get a computer you can use for lots of projects.
-
I run active cooling. I think Raspberry recommends it. The official standard cooling fits underneath the Pisound with no problems. Cooling ensures that the chip will not clock down under load.
Thank you Elektrofon! I’ll get the active cooling then and get some more RAM for futureproofing. ![]()
One other question: Like bidinou, I often feed music into my YUS-5’s analog aux input to practice to wearing headphones. That might be a fairly frequent usage scenario. Is the analog audio input on the Pisound disabled in Pianoberry? How hard would it be to turn it on, and would you expect this to add any latency? I really like your sleek TinyCore setup, and a working aux input would make it pretty much a drop-in replacement for Yamaha’s Silent Piano sound boxes. Thank you!
Audio input is beyond the scope of the Pianoberry core, but I’m happy to review pull requests which implements this.
Since I’m not running anything other than ALSA for audio, you will need an additional application to run if you want to set up audio loop backs. alsaloop in alsa-utils is probably a good place to start if audio input is not something that’s already possible in Pianoteq.
I’ve been building and testing new images today. No luck on the micro. I’ve tried incorporating audio and midi device Pianoteq91.prefs settings from my working Raspberry Pi OS version. I can also see the additional config.txt lines working on boot:
dtparam=i2c_arm=on,i2c_arm_baudrate=400000
dtoverlay=pisound-micro
I’m out of time for a couple of weeks, and now wondering if I should have purchased the original Pisound, and not the micro. The time factor on this project outweighs the cost, so I know I should have stuck to the original.
If anyone else has had any success with the micro, and if you are able to share how you got it to work, that would be welcome.
This solution from Elektrofon is absolutely ideal for my intended use. Thanks again for sharing.
Thank you Elektrofon for the pointer to alsaloop! I will take a look. My PiSound and case arrived yesterday, I assembled and installed everything, and my Pianoberry worked right out of the box with the included demo version of Pianoteq.
Here are a few observations, questions, and tips for other newcomers:
-
When trying to install my full, licensed version of Pianoteq, I am running into the same disk space problem others have reported, so I suppose I’ll need to increase the disk size and rebuild the image as discussed above. I have a Pro Studio license. Maybe version 9 just got bigger?
-
I was surprised that my Pianoberry used a (very muffled) “U4 Felt II” instrument until I changed the instrument in config.txt. Maybe the shipped config file could specify a more standard instrument, like the “NY Steinway D Classical”?
-
My biggest issue that is keeping me from using the Pianoberry is that the Pianoberry sounds distinctly darker and muffled than when running the same instrument on my MacBook Pro (using the same headphones). This seems to improve somewhat when I turn down the volume on the Pisound, but then it’s too quiet for practical use. Is the Pisound audio output much weaker than that of a typical laptop? Do I need to add a headphone preamp? It almost sounds like I am driving the Pisound into saturation.
-
Is the second knob on the Pisound supposed to do anything with Pianoberry? It does not seem to have any effect when I turn it.
-
Boot time for the Pianoberry (with a Raspberry Pi 5 with 16 GB RAM and a new official Raspberry Pi µSD card) is 22 seconds (someone asked about this). A red light flashes on top when it’s ready to play. Maybe less memory shortens bootup time because there is less memory to verify; I know that was true for my 1982 Sinclair ZX Spectrum home computer.

- Yes, you need to configure and rebuild. Having the top tier Pianoteq license is not the norm and I don’t want to make the standard image larger than it needs to be. Pianoberry is meant as a spring board for creating a customized instrument.
- The choice of having U4 Felt II as default for the demo is only because I like it. I have a default MIDI map that assigns felt thickness and dampening. This is just a demo and a starting point for making your own instrument. Pianoberry is not a product in and of itself.
- The Pisound output can drive headphones, but as I understand it it’s not a headphone output. It’s a 2.1 V RMS line output. Your MacBook has a headphone amplifier that can drive even high impedance headphones pretty well. Pisound is more suited for hooking up to line level audio inputs; please correct me if I’m wrong about this.
- This knob is not assigned to anything.
- First boot will be slow compared to subsequent boots. Mine boots in about 10 seconds. If we made a completely custom Linux distro for Pianoberry it would be possible to get boot time down to 2-5 seconds. This would require the OS to be loaded from something other than an SD card though, and it would require serious software development efforts.
Thanks Elektrofon! It’s all working now, and doing exactly what you said: Switch on and play without option paralysis.
Awesome! Here are some tips that might help future users:
-
Depending on your headphones (I have Bose QC15s), you need to add a headphone amp. As Elektrofon suspected above, the Pisound audio output is indeed too weak and may sound muffled otherwise. Others have reported the same issue elsewhere on the forum. I bought a simple “cooidea” headphone amp from Amazon for just 24 € that works well. It even has two stereo inputs so I can now feed in music to practice to. It’s so tiny you can stick it to the side of the PiCase and power it from the PI’s USB-A port (cable included). You’ll just need to adjust the volume at your sources, because the amp has no controls.
-
If you have a calibrated custom note-on velocity curve, you also need to copy that over; otherwise your Pianoberry piano will play and sound differently (mine still sounded more muffled than on my MacBook, for example). Instructions below.
-
If you make a mistake during installation and need to reinstall, do not deactivate your license — you cannot reactivate it on the same hardware and will need to contact Modartt. You can see your licenses online in your User Area under “Manage Licenses”.
So my path to success was this (with Pianoteq Pro Studio 9.1 and a Mac):
-
Download the latest pianoberry source code from github to your Downloads folder and unpack it. The result is a folder
pianoberry-mainif you download the current project source code like me. I will use this as my starting point for the file paths below. (If you download a release, it will be calledpianoberry-1.2.0or similar.) -
If you have (global) custom velocity curves for your keyboard: Find your Pianoteq preference file. On a Mac, hold down option and select Library from the Go menu in the Finder. From there, navigate to
Application Support/Modartt/Pianoteq91.prefsand open it in TextEdit. In that file, find the following section and copy it (your actual numbers will be slightly different, of course), then open the filepianoberry-main/pianoberry/Pianoteq.prefsand paste that section at the corresponding place (it was right before the end of the Properties for me):
<VALUE name="global_velocity_curves”>
<state enabled="1”>
<noteon x="0, 0.0787402, 0.340332, 0.44357, 0.637795, 1" y="0, 0, 0.251969, 0.503937, 0.755906, 1”/>
<noteoff x="0, 1" y="1, 1”/>
<sustain x="0, 0.08, 0.582677, 0.92, 1" y="0, 0, 0.5, 1, 1”/>
</state>
</VALUE>
(You should be able to use the exported .mfxp file for this instead, but I was not able to get this to work.)
-
Download your licensed full version of Pianoteq for Linux from Modartt (mine was called
Pianoteq 9, with a space). Move that file into the folderpianoberry-main/pianoberry/ -
Edit the file
pianoberry-main/pianoberry/build(not the one in the folder above) by changing the three six-digit numbers as follows to make the image big enough for this version of Pianoteq (thanks to @bidinou!). Don’t accidentally delete the s behind numbers 2 and 3! (Don’t ask.) Note: This may not be necessary for earlier versions or those with very few instruments.
dd bs=512 seek=511999 of=pianoberry.img < /dev/null
parted --script pianoberry.img
mklabel msdos
mkpart primary fat32 8192s 255999s
mkpart primary ext4 256000s 100%
-
Download, install and run the Docker app. You can quit the app again, you won’t be using it, but this launches the service (or daemon) that needs to be running. On macOS, it shows up as a menu bar icon.
-
Open the Terminal app, then enter
cd Downloads/pianoberry-main/and then./build. If you’re repeating this after an error, use./build --force-rebuildinstead. This will download lots of stuff, then go quiet for several minutes while it’s building the disk image. -
Insert a µSD card (with SD card adapter) into your Mac. The smallest card will do; Pianoberry only needs a few hundred MB. But card speed will impact boot times. My Raspberry Pi 32 GB card boots my Pianoberry in 22 seconds. Download and run the official Raspberry Pi Imager App. Select your RPi model, then on the next screen scroll all the way down and select “Use custom”. Navigate to the file in
pianoberry-main/deploy/pianoberry.img, then select your inserted SD card as the target. -
Re-insert the SD card (it mounts as “pianoberry”), open the file
config.txton there in TextEdit, scroll to the end, insert your Pianoteq serial number, and set your preferred preset (I use “NY Steinway D Binaural”, for example). Check the exact spelling of the preset in the Pianoteq GUI on your computer. Save the file back to the card and eject it. Tip: I use BlueHarvest to remove those nonessential Mac-specific invisible files like._SpotlightV100before ejecting SD cards. -
Connect the RPi and Pisound to Ethernet for the one-time license activation, insert the SD card, connect MIDI in and audio out, and power it up. After about 20 s, it’ll blink bright red, indicating it’s ready to play. If you forget to activate, there will be no sound at all; just connect Ethernet and power-cycle.
That’s it! I hope this helps more people get started with @Elektrofon’s excellent Pianoberry!
Thank you for the detailed writeup @Orcmeal.
Great stuff!
Quick question: not sure all the pisound-micro drivers are installed. The Blokas website install uses an APT server which doesn’t seem to work on Tiny Core Linux. Any thoughts on this, and how I can ensure the right drivers are installed?
Other notes:
I’m learning what is installed and working on the full Raspberry Pi OS 64 build with Pianoteq (which works well), but come unstuck when working on the pianoberry build using Tiny Core linux.
An example is Alsa seems to be installed, but no joy with aplay -l
I haven’t given up yet!
The most bare bones way to get Pisound Micro running is adding this to the bottom of your /boot/firmware/config.txt:
[all]
dtoverlay=pisound-micro
dtparam=i2c_arm=on,i2c_arm_baudrate=400000
After rebooting, the kernel should attempt to load the driver, if successful, the device should appear in the ALSA utilities. Don’t forget to configure the audio volumes in alsamixer and then do sudo alsactl store to make it memorize your levels.
If it’s still not working, please send me the dmesg log.
Quick update: I’ve done some more research and it looks like there is no sound device after boot. This led to researching how the kernel supports the pisound (original) which works.
The Pianoberry image builds using piCore64-15.0.0.zip. Version “15” contains pisound.dtbo and puts these into /overlays. Note this is pisound.dtbo, and not pisound-micro.dtbo which is missing.
piCore64-16.0.0.img.gz DOES contain pisound-micro.dtbo.
Before I proceed trying to create a new build script and image using version “16” - can I check I’m on the right line?
(using a video recording during boot, I can confirm the config.sys is calling dtoverlay=pisound-micro & dtparam=i2c_arm=on,i2c_arm_baudrate=400000, but no pisound-micro.dtbo appears in /overlays).
Yes, this makes sense - if piCore64-15.0.0 used a Raspberry Pi kernel version before Pisound Micro module was merged into it, it would be missing. 16.0.0 sounds promising ![]()
Thanks Giedrius. This should open the possibility of a build which works for both models.