PS3 and LinuxSampler

You name it!
lowkey
User
Posts: 69
Joined: Thu Jan 24, 2008 2:11 am

PS3 and LinuxSampler

Post by lowkey » Sun Jan 27, 2008 4:11 pm

Hi Peeps :)

Would it be possible to run LS on my PS3 and have the front end on my PC? the amount of computing power shown here...

http://linuxmint.com/forum/viewtopic.php?f=17&t=7208

would be cool to utilize. It seam's like the Ps3 is a number crunching monster!

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: PS3 and LinuxSampler

Post by dahnielson » Sun Jan 27, 2008 5:02 pm

Why not?

If you install some GNU/Linux distro on its hard drive then you can also install Linuxsampler. Put netJack on the PS3 and your PC to send all audio data over the LAN so that you only need to use your PC's audio interface.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

lowkey
User
Posts: 69
Joined: Thu Jan 24, 2008 2:11 am

Re: PS3 and LinuxSampler

Post by lowkey » Sun Jan 27, 2008 8:24 pm

Cheer's for the info Dahnielson. I'll shuffle some files around and get started :D

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: PS3 and LinuxSampler

Post by dahnielson » Sun Jan 27, 2008 8:46 pm

I can't guarantee it will work. But that's the most obvious way to do it.

Good luck with the project!
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: PS3 and LinuxSampler

Post by dahnielson » Sun Jan 27, 2008 9:01 pm

Of course, Linuxsampler will run but there are still some more hoops to jump through to take advantage of the computing power, in other words patching the application:

http://www.ibm.com/developerworks/power ... EDU#N1020A
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

sbenno
Developer
Posts: 80
Joined: Wed Jan 23, 2008 8:30 pm

Re: PS3 and LinuxSampler

Post by sbenno » Sun Jan 27, 2008 9:17 pm

Christian and me were toying with the idea of using cheap PS3 as a sampling cluster using the coprocessors on board,
they would probably churn out lots of voices but the problem is that the PS3 hardware is too limited, the biggest showstopper
is the limited amount of RAM.
according to:
http://en.wikipedia.org/wiki/Ps3
The PlayStation 3 has 256 MB of XDR main memory and 256 MB of GDDR3 video memory for the RSX.
I think under linux you can address the graphics memory too but IIRC when the CPU accesses it it is slower.
probably when reading it is much slower as games normally do write stuff to the gfx ram (textures etc) so
they optimized the gfx memory for writing.

As you know disk streaming samples need lots of memory if you want to precache a large amount of samples.
The OS and streaming buffers will eat up some memory too so not much would remain for caching sample heads.

We toyed with the idea of using a PC as a RAM cache ... LS runs on the PS3 fetches preloaded samples via gigabit ethernet from a PC
renders the audio and sends it back but since Gigabit ethernet has a limit of about 100MByte/sec you will hit the bandwidth limit
after 100-300 voices (rough estimate).
And a traditional PC can handle such an amount of voices too so the above setup would be just a waste of coding effort and resources.
Until such embedded game consoles don't provide a decent amount of RAM (1GB and more) or do not give the user a way to upgrade the RAM
they will unfortunately remain useless.

A disk based sampler puts quite much stress on the system as it requires lots of RAM, lots of CPU, maximum disk throughput and low latency.

With the advent of SSD (solid state disks) the RAM requirement for a disk based sampler will probably decrease.
since SSDs provide faster seek times (we are talking sub-msec access times vs 8-10msec for traditional HDs), the sampler
can precache a smaller amount of samples and thus allowing to handle more and larger instruments at the same time.

If seek times get very fast and disk I/O databusses can keep up then we could switch to a zero precache model.
This means you don't preload the samples in RAM at all.

Basically you use the SSD as an extension of RAM.

I've read that there are high-end SSDs that can achieve up to 50000 IOPs per second (input/output operations per second)
for example this one:
http://www.stec-inc.com/downloads/flash ... asheet.pdf

the high end SSDs cost several thousand $ but as with everything in technology as soon as everyone will adopt it prices will fall
drastically and over time HDs will become obsolete. (samsung seems to be the pioneer in low cost SSD, some laptops already ship
with the SSDs, they are still costly (several hundreds $) and slower than the one mentioned above but this will IMHO change fast.

Let's do some math what's achievable with SSD.
Assume the SSD is able to deliver 20k i/o operations per sec.
This means a disk seek (plus reading a small amount of data) will have a cost of 0.05msec

If in the sampler we use an audio buffer of 5msec the math is easy.
5 / 0.05msec = 100 seek + read block operations per buffer.

According to the math above having such a SSD we could achieve 5msec audio latency without the need of preloading samples in RAM.
If you need higher polyphony you have to increase the latency but at some point as soon the maximum disk read speed is achieved,
increasing latency will not lead to improvements in polyphony.

But the above scenario is a big step forward compared to disk based sampling as it gets basically back to memory based sampling.
Although SSDs will always be slower than RAM they will become fast enough to achieve low latency and high polyphony without any
RAM preload. Of course if you use multiple SSDs polyphony can be increased.

Simply put some samples on the 1st SSD and others on the 2nd to balance the load. In the above example 200 voices with 5msec latency
can be achieved.

When using the SSD with standard disk based sampling with RAM preload (like LS does now ) you achieve higher polyphony at the expense
of using RAM. current SSDs achieve a read speed of up to 100-200MB/sec so 400 streaming voices and more from a single SSD should be possible.

Of course the preload-less technique will become very appealing in the next years especially for users which need to access
a large number of instruments at the same time, ie orchestral composers.
No annoying sample load times, you fire up your sampler and you can instantly play hundreds of GBytes worth of instruments.
:D

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: PS3 and LinuxSampler

Post by dahnielson » Sun Jan 27, 2008 9:42 pm

I agree that running Linuxsampler on PS3 today might not be any advantage of the reasons you mention. But what would be feasible (and probably more so on a PS3 than a PC) is implementation of an advanced synthesis (additive, waveguide or something completely else) that is computational intensive but don't require a lot of memory or disk i/o. Writing such a thing using a functional programing paradigm (like map/reduce but not necessarily in a functional language) that easily can be distributed over the SPEs would be an interesting exercise. Of course, this speculation is purely academic on my part since I don't own a PS3 unit in the first place. :)
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

lowkey
User
Posts: 69
Joined: Thu Jan 24, 2008 2:11 am

Re: PS3 and LinuxSampler

Post by lowkey » Sun Jan 27, 2008 9:59 pm

Thank you guys :D

So stick with plan A:

Use what I have.

I'm glad I didn't have to take off Oblivion!

sbenno
Developer
Posts: 80
Joined: Wed Jan 23, 2008 8:30 pm

Re: PS3 and LinuxSampler

Post by sbenno » Sun Jan 27, 2008 11:26 pm

Yes Anders you are right,
once the LS modular engine will be up and running one could in theory target the PS3 coprocessors, far from trivial but doable.
As a synth the PS3 is certainly great. If we keep the code generator flexible enough it should be possible to target the PS3 too.
But this is for now future music, let's build the foundation first :)

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: PS3 and LinuxSampler

Post by dahnielson » Sun Jan 27, 2008 11:32 pm

Yes, of course. But it's sometimes fun to speculate about what can be. :D
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

Post Reply