Topic: Help me configure a lean mean PTQ machine

I want to build a linux box just for pianoteq. (Sorry if I've missed if there are postings like this; at least I can't find any recent).
Normally I would use it without monitor or keyboard, just turn it on and use a single sound. Hopefully it should be possible to program the power button to make a controlled shutdown. It should be as small as possible. The required ports would be video, USB, ethernet (or wifi) and audio out.

Price is not very critical.

Assuming that I can handle the software setup, can someone suggest what hardware I should look at?


Andreas

Re: Help me configure a lean mean PTQ machine

This is not an answer to your question, because CPU is most likely too small, but it's very low power and passively cooled (so completely noiseless):
http://www.intel.com/content/www/us/en/...tykhe.html
CPU: Intel® Atom™ processor E3815 (1.46 GHz single core, 512 KB cache, 5 W thermal design power (TDP))

But either way you should check out other NUCs (more powerful, but not passively cooled (but supposedly some people open them up, remove fans and install bigger radiators)):
http://www.intel.com/content/www/us/en/...rview.html
Probably not the most cost effective, but very cool.

Re: Help me configure a lean mean PTQ machine

If you want fanless, aim for a quad-core Bay Trail.

If a bit of fan noise is ok, a low-end dual-core Haswell is enough.  (I leave my old laptop permanently underclocked to 1.2ghz to reduce the fan noise.)

There are also optional cases where the entire case is a heatsink in order to run a 17W Haswell fanless.

* https://www.google.com/search?q=intel+n...mp;bih=844

If you use Linux, I can post my start/stop/suspend/resume scripts.  I don't have to power my Pianoteq computer off -- I just let it go into suspend after 30 minutes of inactivity.  And when I want to play again, I hit the power button once and it wakes up within 5 seconds.

Last edited by Mossy (19-09-2014 14:29)

Re: Help me configure a lean mean PTQ machine

I just built myself a passive Linux Mint 17 server based on an ASROCK q2900 ITX motherboard with an integrated intel pentium quad core and it's ultra stable and 100% silent.

Thanks for giving me the idea to let it do double duty as a PTQ machine!

But yeah, I highly recommend the q2900 which is Bay Trail also I believe. I looked into those custom fanless cases and they are SO expensive. Just get a 50 dollar Mini ITX case from Silverstone and stick a fanless power supply and one of these 2900s in it. If you want something smaller you can also do that too. Make sure your external sound card's drivers work for it (well, you do get one PCIe 1x slot with this mobo...hmmm, maybe I'll put in my old Xonar DX in there).

Last edited by rlburnside (01-10-2014 18:01)

Re: Help me configure a lean mean PTQ machine

Pianoteq on Pentium M with Linux

I see that some users worry that a left-over computer they would like to dedicate for Pianoteq won't be peppy enough for the job. So just for laughs I installed Pianoteq 5.1 on a 10-year old Dell Latitude notebook with a single-core, Pentium M processor (M13/S6/F6, 1.8 MHz; pianoteq performance index 11 to 14) and 1 Gigabyte of RAM. An up-to-date Linux won't work on a cpu this old, so I'm still using Ubuntu Linux 10.4, non-PAE, kernel 2.6.32. I attached a Casio PX-150 sending high-definition Midi. Sound output was set to "stereophonic". I then tried to overload the processor by playing lots of bass chords, holding down the sustain pedal, adding runs and trills... and succeeded royally. Sometimes I only got crackles and pops. What surprised me, however, was that with not much tweeking, I could get sound from this old laptop that to my ears was hardly worse than I get from my modern office computer (Intel core i5-3570K, 4-core, 3.4 GHz, 8 G RAM; Pianoteq performance index 28).

The key was to look at the recommendations for Linux in the file 'README_LINUX.txt' and reduce the internal sampling rate (exact values seem to depend on your computer). After some experimentation, I found that I could get quite satisfying performance on my old laptop, except for the fan that had to run full tilt to carry out the heat.

Now in detail. You need to do four things: 1) Pare down the amount of other stuff running on your system, 2) get the cpu to run at full speed continuously, 3) get yourself privileges to start Pianoteq with real-time scheduling priority, 4) create a menu item to start Pianoteq with real-time scheduling (or at least high time-sharing priority).

One by one.

1) Presumably you're not going to be surfing, chatting or doing other things while practicing, so you might want to disable services that might take memory and processor time away from Pianoteq. First, open the dialog

   System>Preferences>Startup applications
   
or install the terminal utility rcconf and disable all of the services, like WLAN, Bluetooth, Nepomuk, that a pure Pianoteq computer won't need. Set disk options to shut down the disk drive when not in use (package powertop).


2) The file README_LINUX.txt tells you to open a terminal window and type the terminal command

   cpufreq-set -g performance

to get the cpu to run at full speed, without throttling.

On my Dell Latitude and with Ubuntu 10.4, this command did not disable throttling. To keep the processor running at maximum rate I needed to use the -d option, which sets a minimum clock frequency, like this

   /usr/bin/cpufreq-set -d 1.8GHz

To avoid doing this by hand each time you start the computer, open the file '/etc/rc.local' (from a terminal window, using e.g. 'sudo gedit' or 'sudo kate') and add the line shown above, substituting whatever the maximum frequency is for your old computer. 'cpufreq-info' will tell you this. (With multi-core processors stick to 'cpufreq-set -g performance'; they tend to overheat if all cores are run full speed.) Note that you have to restart the computer for this command to take effect.


3) Normally you need to have root (administrator) privileges to set the scheduling priority ("niceness") of a program to -10. The file README_LINUX.txt tells you to add lines with "@audio rtprio 90" and "@audio nice -10" to '/etc/security/limits.conf' to get around this limitation. These lines also only take effect after you restart. You should check if your installation process made you a member of 'audio' (mine didn't). On Ubuntu, open System>Administration>Users and Groups>Users settings>Manage Groups>Group settings>Properties. Or from a terminal window, 'cat /etc/group' to see if you're listed at the line 'audio'; if not, use 'groupadd' to make yourself a member of that group and get scheduling privileges.

Now, these lines in 'limits.conf' don't set the run-time priority of Pianoteq; they just authorize members of the group 'audio' - or you alone, if you change @audio to @<your-name> - to start Pianoteq with high priority. This doesn't happen automatically. You must start Pianoteq with a priority-changing program, via a command line in a terminal, e.g.:

   nice -n-10 '/path/to/your/Pianoteq 5'

or

   chrt -r  88  '/path/to/your/Pianoteq 5'

From what I could find out, the default scheduling in Linux is a "time-sharing" mode, which tries to make sure that every process gets some cpu time. The 'nice' command, even with negative "niceness" of -10 (i.e., "pushiness") still lets things like the window manager react very quickly; if you try out this command you will see that, while Pianoteq is running, the cursor arrow on your desktop still moves smoothly; you can open and move windows as usual. Even when you don't do anything, the operating system still has all sorts of housekeeping things going on that want to compete with Pianoteq.

This isn't what you want on a lame laptop. You want Pianoteq to get nearly everything. This seems to happen with the second command; the -r option tells Linux to use a real-time scheduling regimen for Pianoteq, with very high priority (88). You'll notice that once Pianoteq starts playing music, the cursor arrow jumps while following the mouse, and everything else on the desktop is jerky and sluggish. That's because Pianoteq gets to use the cpu most of the time. 'chrt' definitely gives better performance than the 'nice' command. I can set sound card and internal sampling to 22050Hz and get no clicks or dropouts on the most complex midi file I could find, Marouan Benabdallah playing Rachmaninoff, Sonata in B-flat Minor, Op. 36, from the 2006 e-Piano competition, Univ. of Minnesota (I can't play this sort of thing myself). Even at 32000Hz only the worst passages with lots of bass chords and polyphony cause dropouts. Benabdallah's playing of Debussy's Suite Bergamasque (from the same competition) goes through at 32000Hz and polyphony of 64 without a hitch. (http://www.piano-e-competition.com/ecom...2006.asp#B). At this sampling rate the frequency bandwidth is presumably about 15 kHz, better than my hearing, and the sound is all I could wish for.

This second command (chrt) probably requires an up-to-date Linux kernel; I tested it only with 2.6.32, from the latest Ubuntu 10.4, non-PAE update.


4) Of course, you don't want to start Pianoteq from a terminal, using a command line that you'd have to write down somewhere. Use the menu editor of your Linux desktop to create a new command icon, and as command use one of the two commands from section 3). As icon for the menu item I had to take a picture of a quarter-note from /usr/share/icons; I wish I could find the Pianoteq icon somewhere.

That's it, and you might not need to buy a new computer.

Last edited by MinorChord (09-03-2015 21:44)

Re: Help me configure a lean mean PTQ machine

Is there any chance that Raspberry Pi 2 Model B will be able to run Pianoteq? It has 4-core SoC with 1GB ram. Of course Pianoteq must be built for the arm architecture, but are the specs enough? It would make a nice little box (92 x 64 x 17 mm and 45 g) that probably could be hidden inside the keyboard.

Re: Help me configure a lean mean PTQ machine

Unfortunately no, the 900MHz cortex-A7 of the raspberry pi 2 will not be able to run Pianoteq , even at its lowest settings

Re: Help me configure a lean mean PTQ machine

Perhaps a version of Pianoteq with fully distributed processing, then? Surely an order for 88 x Raspberry Pi 2 Model B would qualify for a big discount...?

Re: Help me configure a lean mean PTQ machine

Core number doesn't help as much as core frequency, really.

Hard work and guts!

Re: Help me configure a lean mean PTQ machine

I don't believe that for one moment. My post #8 was a joke, but to be serious, I am aware of the issues that would have to be addressed to make Pianoteq work on 88 Raspberry Pi's. And those issues are not primarily at the applications level for Modartt where Pianoteq would need to be modified, but at the operating systems level of having the facilities to make 88 processors communicate with each other. I do not see that the Pi has even the infrastructure available to implement a distributed operating system sensibly - or even at all (perhaps only as an academic experiment).

Re: Help me configure a lean mean PTQ machine

Core number might help with overall polyphony count, but the complexity of calculations that are needed to create the sound in Pianoteq always leans on pure Ghz muscle. You cannot solve differential equations by processing them in parallel, you need serial processing for that - so the faster the core is, the faster the calculation gets done. Believe it.

Hard work and guts!