Topic: Raspberry Pi 4

The Raspberry Pi 4 has just been launched. It seems to be 2 to 3 times more powerful than the model 3B.   This may be useful for those interested in running Pianoteq as it should significantly improve the polyphony..

Unfortunately I don’t have time to try this myself at the moment but it sounds like very good news.

Re: Raspberry Pi 4

That's major news for those interested in running a headless set up for peanuts. The quality and polyphonic will surely be massively upped.

I had it running on the pi3.

Does anyone know if the same image (on the micro SD card) can simply be slotted into the pi4.

If not do the instructions for installing PTQ on the pi3 need amending for the pi4 or can they be used unamended?

Re: Raspberry Pi 4

Whallsey wrote:

That's major news for those interested in running a headless set up for peanuts. The quality and polyphonic will surely be massively upped.

I had it running on the pi3.

Does anyone know if the same image (on the micro SD card) can simply be slotted into the pi4.

If not do the instructions for installing PTQ on the pi3 need amending for the pi4 or can they be used unamended?

I see no reason that it wouldn't simply run as before, just faster.
except for a few things detailed here; https://www.tomshardware.com/reviews/ra...,6193.html
BTW, clock speed isn't up by much, prefetch is deeper, out of order execution, etc will help.
It will be interesting to see "bottom line" ptq improvements.

I have been resurrecting my pi project at a low priority - this could inspire me to raise the priority.

PS
No, you will need new version of the OS - maybe some libraries.
Now I'm starting to doubt this, some needed utilities may not be updated - yet.
Patience, I'll probably get one anyway - fixes will come, eventually.

The bigger ram might get me to try a software score display with page turning.

Last edited by aandrmusic (26-06-2019 12:43)

Re: Raspberry Pi 4

The NOOBS file for Pi4 (backward compatible) is about 1.4 Gig it is V3_1_1
Although it works on the Pi3 it seems that a LOT of the content hasn't been updated in quite a while, i.e. updating it once it is installed is over 300 Meg.

It is up and working again on my Pi3, I expect to merely move the micro SD card to my Pi4 when that arrives.

Re: Raspberry Pi 4

Now that's good news; last time I looked at Raspberry Pi's, it was still the model 2, with performances that were too modest for what I expected... I'll look at the stats of the new model, I may get convinced by it.

Re: Raspberry Pi 4

As it turns out...  GENERAL AVAILABILITY of the 4Gig version isn't until early August.

The instructions leaflet lists an 8 Gig version, so apparently the print shop are on a different schedule to the announcements team<grin>

I will probably play on the water for as long as Summer (& Fall) weather lasts here, then focus on indoor things - could be November.

Re: Raspberry Pi 4

I have Pianoteq 6 stage trial up and running on a Pi4B.

The demo is playing as I type this :-)

The Pi4B seems to be generally available now - got mine from PiHut.

I have done similar to Edgar's guide but not put the tweak in for the Ethernet port, as I am not using it.

So:

-Installed Pianoteq 6
-Added the settings in limits.conf as per the README_LINUX.txt
-Installed cpufrequtils and used Edgar's script to launch, setting each core's governor state to performance.

I am presently using the PI4B onboard sound output.

I've played with Pianoteq for a few years but never been happy enough to use it professionally; it runs amazingly on my old but good-at-the-time PC, which is far too clunky to gig, and it just doesn't run well enough on my equally old but super cheap laptop.

I saw the claims for the PI4B and decided to give it a go for £55 for the 4GB version.

Back to my experiences.  I have the following settings in Pianoteq:

sample rate 44100Hz
audio buffer size 512 samples (11.6ms)
multicore rendering max
internal sample rate 22050

I am only however getting a performance index of 16, which doesn't seem greatly advanced on what some Pi3B+ owners with overclocking are reporting.  Certainly not the four times as fast as the PI4B has been made out to be.

But - with the sustain pedal clicked down (just for a laugh), and polyphony set to 48, it plays the demo without a pop or click.

The "audio load" shows about 30% in this situation, and resource monitor on the PI shows CPU use about 40% on the graph.

This suggests it's eminently usable for live stuff.

However...

If I drop the audio buffer size to 128 samples - about the upper limit of what I find playable, latency wise (2.9ms) - it pops and cracks even with the polyphony set as low as 8.

Maybe this is due to what is reported elsewhere, that the PI onboard audio is just not suitable for low-latency performance?  Anyone any thoughts on that? It certainly doesn't seem to be a CPU overload issue as the CPU use still doesn't get anywhere near max with the polyphony set so low.

I think I need to try a sound card or DAC hat.

Re: Raspberry Pi 4

You appear to have a geographic advantage, closeness to PI foundation, i.e. UK.

Still waiting for the 4 Gig boards here in the US.
There is suggestion that there is an 8 Gig version on the horizon (under the lab bench).
I build SAGE (math package) and that thrash swaps in less than about 5 1/2 Gig (on X64, arm may be different).

So, onward and upward - PI with 64 Gig memory, sure - or should I wait for the 128 ?

Re: Raspberry Pi 4

Interesting, do you know if the audio jack of the RPi4 is still based on two PWM outputs or the new chip finally includes a decent audio codec? Otherwise, the usage of an external DAC connected to the I2S controller would be quite mandatory, like the previous models of this family of SBC.

Re: Raspberry Pi 4

Good question, I had to look it up but the answer is pwm.
I ordered a Pi DAC+ which has just arrived - not had time to plug it in yet and try but would hope it improves the perf score. For the Pi4B to be any use for me it has to run headless, so am presently trying to learn some python to be able to run a tiny lcd display (7" too big, I need it to fit in 1/2U rackspace) and also to give me a shutdown button.

Re: Raspberry Pi 4

Encouraged by your post scarlet_man, I ordered a Pi 4 2GB last week and got it set up yesterday. I’m getting surprisingly good results running Pianoteq Stage on it with an old USB DAC (Behringer UCA202), maxing out at these settings without getting audible glitches playing the demo:

Sample rate: 48000 Hz
Audio buffer size: 64 samples (1.3 ms)
Multicore rendering: MAX
Internal sample rate: 48000 Hz
Auto (Optimistic) polyphony limit looks to be around 24.

The only pre-configuration I did was:

sudo cpupower frequency-set -g performance

to set the performance governor state on all cores. PTQ shows a performance index of 17. Reading http://jackaudio.org/faq/linux_rt_config.html leads me to believe that the limits.conf changes are probably no longer required in Debian/Raspian.

Hearing the warnings about the Pi 4’s thermals and CPU throttling, I opted for Pimoroni’s fan shim. I think it’s worth considering. Testing PTQ without the fan, I can get the CPU close to thermal throttling temps after 30 mins or so playing. The fan keeps it to well below those temperatures. It might be that better passive cooling would be sufficient, but I'm not sure.

I’m really happy with these early results and like you I’m thinking a headless setup with LCD would be a fun project, and will certainly be a massive upgrade in sound for my lounge digital piano!

I'll be interested to hear how well the Pi DAC+ performs.

Re: Raspberry Pi 4

I can't wait to hear how it works, and put something together me too to give some contribution. Thank you in advance for any update.

Last edited by tec4ever (21-07-2019 18:19)

Re: Raspberry Pi 4

In my case, running Pianoteq without the desktop ( runlevel ≤ 3) obviously in headless mode, improved the performance (not acceptable anyway), but I could not see the index.
To configure Pianoteq I had to enter grafical mode (startx) and then reboot to play.

EDIT: this was on a Raspberry pi 3

Last edited by marcos daniel (21-07-2019 21:09)
Pianoteq Pro - Bechstein - Blüthner - Grotrian - K2 - Kremsegg 1 & 2 - Petrof - Steingraeber - Steinway B & D - YC5
Kawai CL35 & MP11

Re: Raspberry Pi 4

Just picked mine up in Cambridge (Mass) today.
Too much of a hurry, forgot that I will need a different power connector (more power anyway) and a different (smaller) monitor cable connector.
Considering a run to YDI tomorrow, or somewhere in Worcester if I can find anywhere - ...Littleton ?, yes the shop that used to be a Radio Shack, he should have just about everything.

The hurrieder I go the behinder I get.

Last edited by aandrmusic (21-07-2019 23:30)

Re: Raspberry Pi 4

I had a great deal of trouble finding a USB source that could put out 3 amps.
I looked mostly at USB-A chargers and they all seemed limited to 2.5 or less.
I know the DAC is going to take some current, although I know it will be a lot less than 2 x 20W.

Today I found this;
http://www.youdoitelectronics.com/manha...p;fep=7829

Slightly over $40 at the local store with tax, possibly cheaper on line, but I wanted it and I wanted it NOW !

So the PI-4 is up and running, I also had to get a HDMI to HDMI-micro adapter.
Everything else was a straight swap and plug from the PI-3, including the O/S that I had built a few weeks ago.
The original version didn't support Pi-4, so I had got the new one that is backward compatible to PI-3 and have been configuring and running it on the PI-3 while waiting for my PI-4

Last edited by aandrmusic (23-07-2019 03:04)

Re: Raspberry Pi 4

In the weeks between getting the new version of the O/S and the PI 4 board I had installed various things on the SD card, it had become quite cluttered, so today I decided to start afresh.
ONE thing I wanted to do was to FIRST install my favorite editor (I did NOT like the one that Edgar used) also package manager, system monitor, etc.

I left everything cabled together and NOOBS was taking a very long time to install.
It seems to just look at what is on the distribution but download everything whether it is up to date or not.
I recommend AGAINST leaving the PI connected to the web while NOOBS installs, especially if your internet connection is somewhat slow.

I don't think I'll force the frequencies to max this time, at least not until a need shows.
I have the CPU temp showing in the task bar, it is in the high 50s while playing the trial demo.
I am not using the fans this time.

Re: Raspberry Pi 4

If I could give a suggestion...
perhaps, it would be worth to evaluate the chance to provide also an Aarch64 build of Pianoteq in addition to usual 32bit. Aarch64 provides more registers and typically it provides better bandwidth and performance, usually between 15% and 30%. Gentoo PI64 exists for RPi3 and I expect that it will exist also for RPi4 very soon.
Since 64bit versions already exists for other platforms, in my opinion, it won't be a bad idea to try.

Sincerely.

Last edited by carlo_bra (24-07-2019 18:08)

Re: Raspberry Pi 4

(I had written an extensive post on my experience with the Pi 4 but while I when I submitted the reply I was suddenly logged out of the forums and it said I was not authorized to post. I lost my message and my browser's back button did not recover it. Grrrr )

Short version: the audio DAC is very important. I care about low latency audio and the Pi's internal audio cannot produce that with PIanoteq. The lowest I could get was around 37milliseconds compared to my Piano's internal audio rendering. My USB DragonFly 1.2 DAC was also not working well; it could produce a latency of 12ms but did crackle a lot. A pHAT DAC from Pimoroni worked much better, the latency I got is around 2 - 6 ms compared to my Piano's internal audio.

My conclusion was that the Pi4 works as a dedicated synthesizer. As soon as you try to multitask (e.g. simultaneously play audio from a web browser) it cannot handle it. Running Jack or Pulseaudio to mix Pianoteq's sound with other applications already introduces too much crackling. I'll continue using my Dell D530 2.2GHz Core 2 Duo Xubuntu laptop. It is similar in terms of polyphony and latency but is a lot better at multitasking.

Re: Raspberry Pi 4

I'm curious about the latency one is seeing on pi4 using a DAC.  I found that the Dragonfly black 1.5 introduced a latency of around 25 ms on my Intel NUC i3 2.3 GHz system - unusable.  Does anyone have recommendations for a low-latency DAC for the pi4 or Linux x86?  I'm running Ubuntu with low-latency kernel.

Re: Raspberry Pi 4

harm wrote:

(I had written an extensive post on my experience with the Pi 4 but while I when I submitted the reply I was suddenly logged out of the forums and it said I was not authorized to post. I lost my message and my browser's back button did not recover it. Grrrr )

Short version: the audio DAC is very important. I care about low latency audio and the Pi's internal audio cannot produce that with PIanoteq. The lowest I could get was around 37milliseconds compared to my Piano's internal audio rendering. My USB DragonFly 1.2 DAC was also not working well; it could produce a latency of 12ms but did crackle a lot. A pHAT DAC from Pimoroni worked much better, the latency I got is around 2 - 6 ms compared to my Piano's internal audio.

My conclusion was that the Pi4 works as a dedicated synthesizer. As soon as you try to multitask (e.g. simultaneously play audio from a web browser) it cannot handle it. Running Jack or Pulseaudio to mix Pianoteq's sound with other applications already introduces too much crackling. I'll continue using my Dell D530 2.2GHz Core 2 Duo Xubuntu laptop. It is similar in terms of polyphony and latency but is a lot better at multitasking.

Agreed, running Pianoteq it can be a pretty good stand alone sound generator, however running other programs at the same time....well, to a large extent it depends how "dense" your playing is - by which I mean how much midi traffic you generate.
My playing is simple, and I mean "VERY SIMPLE" <grin>, but if I load up a "dense" midi file and use PTQ as a player piano while compiling then things change.

Right now I am getting into clustering ala Simon. Cox Uni Southampton.
I will 3D print some case parts with the intent of building a 4 raspberry 4 cluster, hopefully for well under $300 with cables ,power supplies, etc.

Last edited by aandrmusic (17-08-2019 18:09)

Re: Raspberry Pi 4

carlo_bra wrote:

the usage of an external DAC connected to the I2S controller would be quite mandatory

Do you think that an USB DAC would be worse or you just didn't mention it?

Re: Raspberry Pi 4

A suggestion I read somewhere in this forum, that made a huge difference in performance for me, was to select "direct audio output without any conversion".
It should be mentioned in the Linux installation instructions.

Since I did that, no more occasional cracks and no need for performance governor (thus low temperature and quiet fan). Didn't test it with rPi though, I'm running lubuntu with low latency kernel on an old touchscreen subnotebook.

Re: Raspberry Pi 4

Separate from this I have been testing the Pi 4 for use in a cluster.
This could be due to the efficiencies of a whole number of factors, (not least of which being the arm architecture and instruction set).
In building SAGEMATH from source a single Pi 4 is comparable to an I7 laptop (at 2.2 GHz., not the latest and greatest), i.e. around 6 hours wall clock time.

My plan is for a 4 node cluster, not for pianoteq but for general purpose computing.

Last edited by aandrmusic (23-08-2019 17:20)

Re: Raspberry Pi 4

Hey guys, here are my results of Pianoteq on a Raspberry Pi 4 playing a complicated MIDI file: https://www.forum-pianoteq.com/viewtopi...0#p962550.

It's amazingly smooth!

Re: Raspberry Pi 4

Hello everybody,

The midifile's demo is working as I'm writing this lines !

It works perfectly on raspberry pi4.

Here are my specifications :

I made just the first advices from Edgar Bustamante (thanks to him !), without overclocking the cpu, without the ethernet configuration.

system : NOOBS ver 3-2-1
pianoteq version : 6.0.3 Standard (6.6.0 doesn't work for now because the launchfile doesn't appear as an executable... ?! maybe because of this I don't have all of my instruments the interface ? )
dac : HIFI DAC HAT from inno-maker (DAC PMC5122 up to 384Khz in 32 bits) available on Amazon...
you have to add this line in the config.txt (sudoedit /boot/config.txt) :
dtoverlay=allo-boss-dac-pcm512x-audio
no driver to install ; it seems to be directly recognize by NOOBS

Here are the Pianoteq configuration :

audio out : ALSA
out : BossDAC ; Direct sample mixing device
Channels : channel 1 & channel 2
frequency : 48000Hz (I have this choice only in the main menu but I can choose less in perf menu)
buffer : 96 samples (2.ms) the minimum I can reach
resolution : 32 bits (no editable)

Perf :
ident CPU : ARM, x4
fréq CPU : 1500 Mhz
perf indic : 22
multi-hearts on ; detect cpu overload : off
polyphonie tested with the sustain pedal on : 48

I can change the instrument during playback, I can navigate on Internet while listening, I can play very faster on the keyboard and no crack, no glitch... at over 64 polyphony on Grand Steinway model D, a cpu surcharge is detected (clusters, fast notes...) and the sound stops.

Now, I'm going to find how to use midi on raspberry...

I'll keep you informed !

Bye

Last edited by Andysan (08-12-2019 22:45)

Re: Raspberry Pi 4

Andysan wrote:

pianoteq version : 6.0.3 Standard (6.6.0 doesn't work for now because the launchfile doesn't appear as an executable... ?! maybe because of this I don't have all of my instruments the interface ? )

I set up the latest demo (6.6.0) on a Pi 4 (4gb) yesterday and at the demo's default setup it works perfectly to my newbie ears even with the desktop open and the browser open displaying a webpage.
Clicking on the program via the file system explorer - as you would in a windows machine - didn't work, an error about not knowing how to open shared libraries but I found using the command line to navigate to that folder and running the program from there (I typed ./Pian and pressed tab to complete due to the spaces in the name)
and it worked fine, opening the normal interface that let me play away for 20 minutes. The Pi doesn't even seem to get that hot, about 47 deg, but I'm not exactly playing Chopin.

I have the Roland UM-One Mk2 Midi-USB cable and I didn't have to set anything up with that, it was there in the Pianoteq menu and when I selected it it worked.
I had more trouble getting the iQAudio DAC to send audio out at first.

Last edited by Liam (11-12-2019 12:55)

Re: Raspberry Pi 4

Thank you so much for your message.

Indeed, I connect my "Prodipe Midi USB 1i/1o", and it  works perfectly when I select "Midi USB" in the options menu of Pianoteq 6.60.

For the last version, it also works ; I created the shotcut as the tutorial and it's ok. As we make the shell as an executable with the chmod, it works...

The latency is comfortable, I have to calibrate the velocity curve of my keyboard now.

Bye

Last edited by Andysan (15-12-2019 19:13)

Re: Raspberry Pi 4

alessandro wrote:
carlo_bra wrote:

the usage of an external DAC connected to the I2S controller would be quite mandatory

Do you think that an USB DAC would be worse or you just didn't mention it?

Actually the I2S controller is dedicated only for this purpose.
It is directly connected to the bus and the CPU, so there is not latency except the processing time.
Unlike the USB, it does not share its bandwidth with any other device.
If I can say my opinion, from the experience that I got when working on embedded devices, I2S should be the preferred choice, if you can use it.

Re: Raspberry Pi 4

After reading Edgar's howto I could not resist to buy a Pi 4 and start playing with it. After some changes I end up with a headless solution using the Pi 4 4GB together with the Suptronics new X400 v3.0 case. I installed the Raspbian starting from the Lite version and adding SSH and VNC interfaces using raspi-config and the GUI without login manager as explained here. The total installation including PQ6 occupy less than 2GB of my SD card.

Both SSH and VNC connections work like a charm from PC and mobile. Now I am trying to figure out the best strategy to run Pianoteq in order to make it usable but save resources at the same time. By reading various posts on this forum I am thinking about three possible scenarios:
1. Run vncserver at startup with PQ in fullscreen mode. I may connect with the mobile and have the nice configuration interface ready, at the cost of having some memory and CPU used by the GUI that is always running.
2. Use SSH to start/stop PQ in headless mode when I play and vncserver when I need to change the settings, usually only presets. I found ( but not yet tested) a nice app called Raspberry SSH Lite that can be configured with buttons to send commands via SSH.
3. Run PQ in headless mode only and change the presets by sending MIDI signals. I may also install some physical button to change few presets I use the most, and I understood that also the keyboard keys can be configured to send such signals.

Unfortunately I could not find instructions regarding the 3rd scenario, which MIDI signal to send and how. Someone may direct me to any document, post or else where to find such instructions?

Last edited by jimmi (31-12-2019 05:54)

Re: Raspberry Pi 4

From manual, section 3.4.3:

You can assign Pianoteq parameters to MIDI controllers such as those that may be on your keyboard. Select the parameter slider that you want to assign (right click on the slider and click on MIDI ► Assign MIDI Control) and move the knob of the MIDI controller that you have chosen for this parameter. Pianoteq will automatically assign the parameter to the controller. More sophisticated possibilities are provided in the Options/MIDI section.
Any MIDI control may be assigned except the following ones: MIDI controls 6, 38, 96-101 which are used for RPN and NRPN MIDI parameters; controls 120 to 127 are reserved for various reset operations ("all notes off" etc.); controls 32 to 63 are reserved for 14-bit precision controllers.

Then in MIDI section of options dialog this can be saved as a preset

I think have said it before, running raspbian without GUI improves the performance (at least in rpi3)

Pianoteq Pro - Bechstein - Blüthner - Grotrian - K2 - Kremsegg 1 & 2 - Petrof - Steingraeber - Steinway B & D - YC5
Kawai CL35 & MP11

Re: Raspberry Pi 4

marcos daniel wrote:

From manual, section 3.4.3:

Thanks for the hint Daniel, however I must admit my ignorance, what is written there it does not make much sense for me. I never used MIDI controllers until now so I'm running in the dark.

To start simple say that all I want to do is the possibility to change few of the existing presets. In the Option/MIDI panel I understand how to create a new action and assign the action of a specific preset, say Steinway B Jazz, and use Control Change or Program Change to trigger it. My problem is that I don't know what a Control Change or Program Change is and how to generate it via keyboard or command line.

If you know were I may find some howto or tutorial on this issue would be perfect

Re: Raspberry Pi 4

jimmi wrote:
marcos daniel wrote:

From manual, section 3.4.3:

Thanks for the hint Daniel, however I must admit my ignorance, what is written there it does not make much sense for me. I never used MIDI controllers until now so I'm running in the dark.

To start simple say that all I want to do is the possibility to change few of the existing presets. In the Option/MIDI panel I understand how to create a new action and assign the action of a specific preset, say Steinway B Jazz, and use Control Change or Program Change to trigger it. My problem is that I don't know what a Control Change or Program Change is and how to generate it via keyboard or command line.

If you know were I may find some howto or tutorial on this issue would be perfect

I am very far of being an expert... The only control I assigned is the wheel of my MP11 to the volume of Pianoteq. I'm quite sure that MIDI controllers have many knobs and sliders to assign, but they have poor actions (I've never used one). If you have some DIY abilities cou could build a cheap MIDI controller based on a microcontroller. See for instance: https://www.pjrc.com/teensy/projects.html

Pianoteq Pro - Bechstein - Blüthner - Grotrian - K2 - Kremsegg 1 & 2 - Petrof - Steingraeber - Steinway B & D - YC5
Kawai CL35 & MP11

Re: Raspberry Pi 4

After playing for few weeks I finally got my RP4 box with Pianoteq running. I would like to share my experience in this howto. Any comment will be welcome.

Re: Raspberry Pi 4

Is there actually a need to run Pianoteq headlessly on a Pi4?

It was needed on the Pi3, and if you are doing something like jimmi's appliance in a black box then headless makes sense but is a Pi4 capable of running well with a screen and GUI running?

I have it set up with the 7" screen and have Pianoteq and web pages running and it all seems good to me, at default settings. I upped the polyphony to 128 and that doesn't seem to have caused any issues.

At the risk of bringing to my attention things I would never notice, what am I looking for to know the Pi4 is overstretched and what settings should I look to change beyond the default values to try to stress it?

Re: Raspberry Pi 4

Liam wrote:

Is there actually a need to run Pianoteq headlessly on a Pi4?

When I started building my appliance I bought the 7" screen and assembled, but later I changed idea. There are several reasons that brought me to this conclusion:
- The screen is anyway larger and more delicate than the box. Using a mobile or a tablet connected via VNC is in my view more convenient and flexible.
- A headless box can be placed anywhere, even inside your piano (well, you don't need the box in that case) or away from it.
- The test I did suggest that this use require a fan for cooling. Playing piano even this small noise can be disturbing, but if you place the box on floor behind your piano can be acceptable.

Re: Raspberry Pi 4

I'm very tempted to try this and buy a Rasberry Pi 4. Is anyone using Pianoteq with a passive cooler? Or is this definitely not possible?

Regards
Martin

Re: Raspberry Pi 4

I bought a Pimoroni Fanshim when I ordered my Pi4 but it turned out it doesn't work with the IQAudio hat I also bought to use as the DAC. I didn't want to wait for some passive cooling to turn up so I set the whole thing up 'just to try'

I have the Pi4 and the DAC attached to the 7" touchscreen, so the Pi is not in a case but open to the air but it sits at ~37c idling and gets up to ~50c when running Pianoteq Stage with me playing. That's cool enough that the PI4 isn't throttling at all that I can see. It would need to get hotter for that. It's meant I don't actually need a heatsink let alone a fan for the Pi4.

However, if you wanted to put it inside an enclosure or case it would get hotter. If you push the settings too far beyond the defaults then the Pi4 will have to work harder and you might need some cooling then but for my playing with the Stage version it works fine just open to the air.

Re: Raspberry Pi 4

Liam wrote:

I It's meant I don't actually need a heatsink let alone a fan for the Pi4.

Thank you, Liam.
A question about the RAM: there are 1GB, 2GB and 4GB versions available. My plan is to run Pianoteq Standard on Raspian Lite - with a remote via vnc.
Is 1 GB enough for this?
I suppose my Behringer UMC404HD will work as a midi interface. Hopefully I can use the audio output too?

Regards
Martin

Re: Raspberry Pi 4

[Edit: Some optimization after further research; systemd services ignore the limits.conf file, so it's crucial to enable the realtime scheduler in the unit file itself. Also, setting a fixed processor speed enables the "userspace" governor.]

I'm running a Raspi4 for some months now with a Hifiberry Amp2 and a SL 88 Grand. Absolutely satisfying setup. Pianoteq is running headlessly, internally with a sample rate of 29.4 kHz, host sample rate 44,1 kHz, 96 samples buffer size (2.2 ms). Set to a polyphony of 48.

I wrote a systemd service which starts/stops Pianoteq and sets up the CPU governor/frequency and volume level. Also I wrote udev rules which automatically start/stop Pianoteq if I switch on (connect)/switch off (disconnect) my master keyboard. This way Pianoteq is only running when I want to play.

The same Raspi is running Raspotify and the MPD Music Player Daemon. Pianoteq completely takes over the sound output when running, but as it gets stopped when the master keyboard is switched off, the other sound processes can just normally use the ALSA output.

pi@raspi4:~ $ cat bin/start-pianoteq
#!/bin/bash --

amixer sset 'Digital',0 190
sudo cpufreq-set -g performance
/home/pi/bin/pianoteq --headless --multicore max $@


pi@raspi4:~ $ cat bin/leise 
#!/bin/bash --

sudo cpufreq-set -g ondemand
amixer sset 'Digital',0 170


pi@raspi4:~ $ cat /etc/systemd/system/pianoteq.service 
[Unit]
Description=Pianoteq
Wants=multi-user.target

[Service]
User=pi
Group=pi
LimitMEMLOCK=500000
LimitRTPRIO=90
LimitNICE=-10
Nice=-10
Restart=always
RestartSec=10
#PermissionsStartOnly=true
ExecStart=/home/pi/bin/start-pianoteq
ExecStop=/home/pi/bin/leise


pi@raspi4:~ $ cat /etc/udev/rules.d/80-pianoteq.rules
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="9516", ENV{ID_MODEL_ID}=="2015", RUN+="/bin/systemctl start pianoteq"
ACTION=="remove", SUBSYSTEM=="sound", ENV{ID_VENDOR_ID}=="9516", ENV{ID_MODEL_ID}=="2015", RUN+="/bin/systemctl stop pianoteq"


pi@raspi4:~ $ cat bin/start-pianoteq-gui 
#!/bin/bash --

amixer sset 'Digital',0 190
sudo cpufreq-set -g performance
/home/pi/bin/pianoteq --multicore max $1

I'll set up a Github project if anyone is interested in collaborating to the scripts.
-- erik

Last edited by eriks (26-02-2020 07:01)

Re: Raspberry Pi 4

My installation seems to be satisfying too now.
It's a Raspberry Pi 4B (2 GB) in a passive cooling aluminium box.
I'm using a Behringer UMC 404HD for Midi in and audio out, and I can run the lowest latencies with it.
I've tried the standard Raspian installation (the one with desktop but without programs). The system doesn't boot into the desktop, but I start tightvnc as a service.
I've done all the tweaks from the guide in the thread about the RPi3.
Pianoteq 6 Standard starts automatically, because I'm not doing anything else with the box.
With RaspAP I configured the wireless device as an Access Point. With VNC on my iPad (or Smartphone) I'm able to control the GUI of Pianoteq.
I use 48000 kHz sample rate, with 32000 internal. Even in headless mode without vnc it didn't work without errors with a higher internal sample rate. But I'm ok with 32000.
The temperature stays at around 55 degrees Celsius (when I play), so I'm glad I didn't buy something with a fan.

And I've installed Resilio Sync on the Raspi and my PC. A very easy peer-to-peer synchronization of dedicated folders. Now both Pianteq instances share their presets and recently played notes.

Finally I wrote a bash script that shuts down the pi after 120 minutes idle time.

Last edited by MartinGr (19-02-2020 22:12)

Re: Raspberry Pi 4

I'm very happy with my installation now - everything works fine.
But one thing is not perfect: when I shut down the Pi (by a GPIO switch), the Pianoteq process is killed. So when I made some adjustments and didn't save them, they are gone when I restart.
My question: is there a way to quit the Pinateq GUI properly, but with a script when the system is shutting down?

Regards,
Martin

Re: Raspberry Pi 4

This thread may be useful: https://www.raspberrypi.org/forums/view...p?t=149425

Spotify: https://open.spotify.com/artist/2xHiPcCsm29R12HX4eXd4J
Pianoteq Pro & Organteq 2
Steinways, Grotrian, Steingraeber, Bechstein, Petrof, Blüthner, K2, Karsten, & Kremsegg
Casio GP300

Re: Raspberry Pi 4

Hello all.

I'm running Pianoteq Stage v6.7.0 on a RPi 4 4GB with a ES9038Q2M I2S DAC. I fix the CPU frequency at 1500MHz and edited limits.conf according to README_LINUX.txt.

I start Pianoteq with the "--multicore max" option and audio settings are ALSA and Output "I-Sabre Q2M DAC [...] Direct hardware device without any conversions".

I use Internal Sample Rate and Host Sample Rate both 32000Hz, buffer size 256 and max polyphony 96.

This works great, no crackles, even with fast, dense chords in the lowest registers with continuous sustain pedal.

Except one problem: if I don't touch any key or pedal for about 8 seconds or more, then the output is silent for the first fraction of a second if I play a note again (attack of note not audible). Like something in the system goes to sleep and needs to wake up. Not sure what though. This does not change if I change the audio settings. Any ideas?

Regards,
David

Re: Raspberry Pi 4

david.bragason wrote:

Hello all.

I'm running Pianoteq Stage v6.7.0 on a RPi 4 4GB with a ES9038Q2M I2S DAC. I fix the CPU frequency at 1500MHz and edited limits.conf according to README_LINUX.txt.

I start Pianoteq with the "--multicore max" option and audio settings are ALSA and Output "I-Sabre Q2M DAC [...] Direct hardware device without any conversions".

I use Internal Sample Rate and Host Sample Rate both 32000Hz, buffer size 256 and max polyphony 96.

This works great, no crackles, even with fast, dense chords in the lowest registers with continuous sustain pedal.

Except one problem: if I don't touch any key or pedal for about 8 seconds or more, then the output is silent for the first fraction of a second if I play a note again (attack of note not audible). Like something in the system goes to sleep and needs to wake up. Not sure what though. This does not change if I change the audio settings. Any ideas?

Regards,
David

It’s probably the CPU frequency scaling down, you need to fix the CPU frequency each time the raspberry pi boots (the setting is not persistent). Or alternatively use “cpufreq-set -g performance” to enable the performance governor.

Re: Raspberry Pi 4

Hello dear Pianoteq friends!

I plan to install Pianoteq6 on my Rasperry4 (1GB) and then use it like a Digital Piano without the monitor and keyboard.

How long does your Raspebrry take to boot until I can play?

Can I turn off the Rasperry without shutting it down or do I always have to shut it down? Is it possible to use the OperatingSystem in read-only-mode?

Re: Raspberry Pi 4

Maxorth wrote:

I plan to install Pianoteq6 on my Rasperry4 (1GB) and then use it like a Digital Piano without the monitor and keyboard.
How long does your Raspebrry take to boot until I can play?

Can I turn off the Rasperry without shutting it down or do I always have to shut it down? Is it possible to use the OperatingSystem in read-only-mode?

You will usually be fine pulling the plug to turn off without issuing shutdown command first, but that's not guaranteed.  If the OS is writing to disk when you pull the plug, it could cause a problem.  Safest to make sure you issue shutdown command first.

It is possible to set the Pi into a readonly mode where you could safely unplug without shutdown.  I assume it works.  I tried the setup in this github page and screwed up my install, though.  I haven't tried to get read-only mode going again.  https://gitlab.com/larsfp/rpi-readonly

Not sure how long from power on to usable headless pianoteq on my Pi4.  Under a minute, I'm guessing close to 30 seconds, would have to test.

Re: Raspberry Pi 4

Maxorth wrote:

Hello dear Pianoteq friends!


Can I turn off the Rasperry without shutting it down or do I always have to shut it down?

I've written a bash script which shuts down my Pi after two hours of idle time. Or when I press a switch connected to GPIO 3. It's not very elegant, because I've never written a bash script before, but it works. If you need it, I could share it...

Re: Raspberry Pi 4

Thanks for the answers.
I just finished the other piano project with Rasperry 3b+:   https://youtu.be/N4NE-AZtLEQ
My Raspberry boots by this solution about 60 seconds and the quality is acceptable but I hope that the quality at Pianoteq with Raspberry4 should be more better.
As for turning Rasperry off, I have considered using the ATX Raspi: https://lowpowerlab.com/guide/atxraspi/

Last edited by Maxorth (01-05-2020 19:50)

Re: Raspberry Pi 4

Maxorth wrote:

Thanks for the answers.
I just finished the other piano project with Rasperry 3b+:   https://youtu.be/N4NE-AZtLEQ
My Raspberry boots by this solution about 60 seconds and the quality is acceptable but I hope that the quality at Pianoteq with Raspberry4 should be more better.
As for turning Rasperry off, I have considered using the ATX Raspi: https://lowpowerlab.com/guide/atxraspi/

Could you please tell us the details of this other piano project--the sample source, etc?

Re: Raspberry Pi 4

Jake Johnson wrote:
Maxorth wrote:

Thanks for the answers.
I just finished the other piano project with Rasperry 3b+:   https://youtu.be/N4NE-AZtLEQ
My Raspberry boots by this solution about 60 seconds and the quality is acceptable but I hope that the quality at Pianoteq with Raspberry4 should be more better.
As for turning Rasperry off, I have considered using the ATX Raspi: https://lowpowerlab.com/guide/atxraspi/

Could you please tell us the details of this other piano project--the sample source, etc?

I am not the author of this project but you can see more details on follow websites: https://www.samplerbox.org/ and http://homspace.xs4all.nl/homspace/samplerbox

I discovered the youtube-video (shown above) a week ago, ordered Raspbery Pi, put an newest image from https://ator2109.home.xs4all.nl/samplerbox/, connect USB-Audio/Midi-Interface and it was done.
But the newest image support Raspberry until 3b+. For version 4 you would have to do all settings and installation manually.

Once I have installed Pianoteq on my Raspberry I will compare both solutions and hope that Pianoteq runs well.
The one of advantages of Pianoteq is that many settings can be made easily.

Last edited by Maxorth (01-05-2020 23:03)