Raspberry Pi and Pyo?

2,089 views
Skip to first unread message

lucasparis

unread,
Aug 19, 2012, 12:44:45 PM8/19/12
to pyo-d...@googlegroups.com
Hi,

I just received two raspberry pis, haven't even plugged them in yet but I was wondering if anyone had tried running pyo on it and would have tips or a stripped down distribution optimized for pyo?
Otherwise I'll go google hunting for more info, and try to get this to run this winter. 

Also I'll want to hook up some sensors to an adc chip connected to the gpio of the pi, have pyo process the acquired data and send it via osc. Anyone know if I can feed the adc's signal coming in via i2c or spy directly into pyo? would I have to create a custom driver for this? 

Ps: olivier si tu veux experimenter avec le pi j'en ai deux je peux t'en prêter un.

lucasparis

unread,
Aug 20, 2012, 10:56:42 AM8/20/12
to pyo-d...@googlegroups.com
Ok so for anyone interested, I found this nice library https://projects.drogon.net/raspberry-pi/wiringpi/ that allows you to use the pi like an arduino, so I could write a pyo object in C to receive the SPI ADC data and stream it. 
There's even a python wrapper for this library which would be nice if creating low rate control, like lcd + encoder + button interface.  

Bryan Smart

unread,
Aug 20, 2012, 6:20:33 PM8/20/12
to pyo-d...@googlegroups.com
Hi.

I'd love to hear about someone porting Pyo to the Raspberry Pie, but haven't heard anything yet. I hope to eventually bring my Pyo project to a portable device, and the Raspberry seemed like a great base for hobby-level embedded applications. The Raspberry is inexpensive and powerful, particularly given the small cost. I haven't started any work on a port, but have looked in to it at a high level. I'll share what I've learned. I hope that it will help you.

FOr those that don't know, the Raspberry Pie is an extremely inexpensive (less than $40) computer on a motherboard that is the size of a typical credit card. The board includes a processor and GPU, 256MB memory, SD card slot for permanent storage, 10/100 ethernet, and USB. Important to us, it has built-in audio

The design and distribution of the computer are a non-profit effort. It is meant to be a tool for learning programming and for creating small embedded solutions.

The Linux distros available for the Raspberry already include Python.

The C portions of Pyo might need a little help to get working on the Raspberry. The processor is an ARM11, and, as far as I know, no one has compiled Pyo yet for that.

If you get Pyo running, you may find that Pyo is slow. The processor has a clock speed of 700Mhz, but performance will be quite a bit worse than a desktop processor of the same clock speed, of course.

The ARM11 supports SIMD extensions. With the right implementation, these could give a big boost to some typical audio processing operations. I don't know if the C portions of Pyo are already optimized for this, or could be optimized without a huge effort, but it is a possibility if you find that the performance isn't sufficient.

The Raspberry has audio output, but not audio input. The Linux distros support generic USB audio class devices, and you can find many simple dongle and headset style sound devices that will interface this way. If the device is recognized by Linux, and is available through JACK, then Pyo can use it as an input stream.

With Pyo on a device like this, a little scripting could turn a $25 circuit board and a $20 USB audio interface into a digital effects unit, a tiny synthesizer/sampler, a signal analysis device, and all sorts of other useful tools.

Bryan

Tiago Bortoletto Vaz

unread,
Aug 21, 2012, 7:16:30 AM8/21/12
to pyo-d...@googlegroups.com
Hi,

On Mon, Aug 20, 2012 at 06:20:33PM -0400, Bryan Smart wrote:
> Hi.
>
> I'd love to hear about someone porting Pyo to the Raspberry Pie, but haven't heard anything yet. I hope to eventually bring my Pyo project to a portable device, and the Raspberry seemed like a great base for hobby-level embedded applications. The Raspberry is inexpensive and powerful, particularly given the small cost. I haven't started any work on a port, but have looked in to it at a high level. I'll share what I've learned. I hope that it will help you.

Pyo seems to be successful built in Debian for both armv6 (armel) and v7 (armhf):

https://buildd.debian.org/status/logs.php?pkg=python-pyo

Unfortunately the Debian hardfloat port doesn't run in Raspberry Pi because it
uses some v7 processor features not supported in v6. However, I noticed it has
been v6hf-compatible built by raspbian folks:

http://archive.raspbian.org/raspbian/pool/main/p/python-pyo/

Regards,

--
--------------------------------------------------------------------------------
.''`. Tiago Bortoletto Vaz GPG : 1024D/A504FECA
: :' : http://acaia.ca/~tiago XMPP : tiago at jabber.org
`. `' tiago at debian.org IRC : tiago at OFTC
`- Debian GNU/Linux - The Universal OS http://www.debian.org
--------------------------------------------------------------------------------

Bryan Smart

unread,
Aug 22, 2012, 3:27:17 AM8/22/12
to pyo-d...@googlegroups.com
That's great.

Maybe Olivier can comment about optimizations for SIMD. I don't know what is required of an implementation to take advantage of it. I'm pretty sure that good use of it goes well beyond simple automatic compiler optimizations, though.

Bryan

lucasparis

unread,
Aug 22, 2012, 3:27:27 PM8/22/12
to pyo-d...@googlegroups.com
You guys lost me a little, my computer science knowledge isn't holding up ^^ I'll tinker with this as soon as I get the accessories (usb power cable, ethernet and mouse keyboard) and post back here for updates. 
I want to build a OSC controller with the pi like this http://madronalabs.com/DIY using some external DAC and ADC chips connected to the gpio (going to make a pyo object for this when I learn how to program them) then do the fft analysis stuff in pyo to get the usable control data and send it to my main computer via OSC.
So should I use a debian distribution?

Bryan Smart

unread,
Aug 22, 2012, 4:51:54 PM8/22/12
to pyo-d...@googlegroups.com
After reading this thread, I think this is the summary:

1. Pyo isn't yet running on the specific processor in the Raspberry (ARM11 family). Pyo runs on the older ARM processors, though, and some people are working on getting it to run on the newer ones. Unless I misunderstood, though, it isn't available yet.

2. For an ADC, all you need is any generic USB headset, sound card, microphone, etc that supports the generic USB audio class mode. Linux distributions have support for these built-in. If someone gets Pyo running on a Linux distribution that will run on the Raspberry, you'll just plug in one of the USB sound devices, and you'll be ready to go. Pyo can receive input from the device if Linux can recognize/use it, and Linux will recognize/use most of the generic USB audio devices.

Hope that helps.

Bryan

PJ leonard

unread,
Sep 6, 2012, 10:50:31 AM9/6/12
to pyo-d...@googlegroups.com
Hi,

  I have just run pyo on my raspberry pi with debian wheezy. It built out of the box using the ubuntu 10.10 instructions on the installation page. Unfortunately the audio output quality is not good (periodic breaks).  This happens even if I play a single sinewave so I don't think it is due to CPU overload although the breakup is worse for more complex examples. It is also worth mentioning that to get any output I
had to set the python game audio output option to force headphones. I am a bit out of my depth here but if anyone has got any suggestions I will try them out.

Paul.

lucasparis

unread,
Sep 6, 2012, 11:43:04 AM9/6/12
to pyo-d...@googlegroups.com
Yes nice I'm currently in class with olivier i'll take about it at the end of class, I also lent him a raspberry pi so he may be able to test it, I may also start experimenting with it next week.

Have you checked the cpu usage in the terminal with the command top ?

PJ leonard

unread,
Sep 6, 2012, 12:31:59 PM9/6/12
to pyo-d...@googlegroups.com
Top reports CPU for python as

s=Server(duplex=0),boot().start()    4.9%    
ss=Sine(5)                                   5.2%
ss.out()                                        6.9%

This did not report any underruns but I have periodic glitches


Running more complex examples results in CPU > 50 % and lots of underruns which increase the X CPU usage as the terminal scolls.
I simple example just to test the portaudio would be useful. 

best Paul.

Bryan Smart

unread,
Sep 6, 2012, 12:32:01 PM9/6/12
to pyo-d...@googlegroups.com
Forcing the output to headphones shouldn't be a problem. You're probably using HDMI output to drive a display, and, without the manual adjustment, audio will be sent over HDMI, also.

Regarding the breaks in audio, how often do they happen? If the time between breaks is a second or less, then the glitch might be related to the buffer used by the sound device. Not sure if Pyo's buffer size control for the Server has any control over that, or just Pyo's internal mixing buffer.

Try using buffer_size=1024 or buffer_size=2048 when you create the Pyo Server. That is too large for normal operation, but might get rid of the breaks. It could also provide clues, if it works.

I'd also be interested to know what Top says regarding CPU load. The load could be abnormally high due to a processor limitation. For example, I don't think those ARM processors handle floating point calculations very well, or, at least, not like an X86 processor would. Remember we were talking about the ARM extensions for SIMD/vector processing? It may be that Pyo is performing mathematical operations with no native CPU support/must be emulated. My knowledge about the guts of ARM CPUs is extremely limited, but these are some of the pitfalls that can come up when porting code. We should be able to overcome them, if we can figure out what isn't working.

I'm a little out of date with my knowledge about Linux audio, also. Do you know if you're using ALSA directly, or are you going through JACK? Would be worth trying different APIs to see if there is any change.

Bryan

PJ leonard

unread,
Sep 6, 2012, 12:46:33 PM9/6/12
to pyo-d...@googlegroups.com
Hi

On 6 September 2012 17:32, Bryan Smart <bryan...@bryansmart.com> wrote:
Forcing the output to headphones shouldn't be a problem. You're probably using HDMI output to drive a display, and, without the manual adjustment, audio will be sent over HDMI, also.

Stangely I have not heard any sound via the HDMI using pyo or python games (I know this works for other things because I tried xbmc which was very smooth).



 
Regarding the breaks in audio, how often do they happen? If the time between breaks is a second or less, then the glitch might be related to the buffer used by the sound device. Not sure if Pyo's buffer size control for the Server has any control over that, or just Pyo's internal mixing buffer. 

Breaks are about 0.5-1sec with some faster bursts.

 
Try using buffer_size=1024 or buffer_size=2048 when you create the Pyo Server. That is too large for normal operation, but might get rid of the breaks. It could also provide clues, if it works.

I am pretty sure this buffer is only for pyo. I did try 2048 with no change.
 
I'd also be interested to know what Top says regarding CPU load. The load could be abnormally high due to a processor limitation. For example, I don't think those ARM processors handle floating point calculations very well, or, at least, not like an X86 processor would. Remember we were talking about the ARM extensions for SIMD/vector processing? It may be that Pyo is performing mathematical operations with no native CPU support/must be emulated. My knowledge about the guts of ARM CPUs is extremely limited, but these are some of the pitfalls that can come up when porting code. We should be able to overcome them, if we can figure out what isn't working.

See my previous e-mail for CPU.   I also tried  installed the raspbian package

apt-get install python-pyo

Does the above really remove all my manually installed pyo stuff ?
 


I'm a little out of date with my knowledge about Linux audio, also. Do you know if you're using ALSA directly, or are you going through JACK? Would be worth trying different APIs to see if there is any change.


I have just done all the default things so I think that means portaudio using using ALSA directly.  

best Paul

Nat

unread,
Nov 17, 2012, 3:51:53 PM11/17/12
to pyo-d...@googlegroups.com
Hello,
Any updates about pyo running on the raspberry pi ?

PJ leonard

unread,
Nov 18, 2012, 10:44:38 AM11/18/12
to pyo-d...@googlegroups.com
Hi Nat,

Currently it works but is glitchy. I have had a little look at the code. When I get time I will try and increase the portaudio output latency.
I think this can be done by modifying servermodule.c in the routine Server_pa_init. I think Olivier is setting the latency to  

outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;

This is meant to be OK for robust audio output.

But maybe portaudio has not been tuned for the raspbery pi?

I am a bit busy at the moment so it may be a while before I try this.

Paul.

Olivier Bélanger

unread,
Nov 18, 2012, 6:24:03 PM11/18/12
to pyo-d...@googlegroups.com
Hi,

I didn't have time to try... It will not be possible for me before January (and maybe lucas will need his raspberry pi before that!).

Is someone tried to use Jack instead of Portaudio on it? I think it should be more efficient...

Olivier


2012/11/18 PJ leonard <pauljoh...@gmail.com>

paul leonard

unread,
Dec 5, 2012, 8:47:24 AM12/5/12
to pyo-d...@googlegroups.com
Hi,

I just tried to get the simple sinewave  example (part of portaudio distribution) to play using portaudio.
Using defaultLowOutputlatency is very bad  defaultHighOutputLatency is better but still not good.   I tried 
defaultHighOutputLatency*2 but this did not improve things.

Anything else I could try to get portaudio working on the PI?   I have not tried a USB card yet.

A report of jack working OK here.



best Paul.

Olivier Bélanger

unread,
Dec 5, 2012, 9:29:49 AM12/5/12
to pyo-d...@googlegroups.com
I'm pretty sure Jack is the best solution. It should be straightforward to compile pyo with jack on the PI...

Olivier


2012/12/5 paul leonard <pauljoh...@gmail.com>

PJ leonard

unread,
Dec 5, 2012, 4:56:02 PM12/5/12
to pyo-d...@googlegroups.com
I keep getting jack2 replacing jack1 when I install packages like  qjackctrl.

Does pyo work with jack2 ?   This seems to imply it might  . . .

http://trac.jackaudio.org/wiki/Q_differenc_jack1_jack2

cheers Paul.

Olivier Bélanger

unread,
Dec 5, 2012, 5:13:51 PM12/5/12
to pyo-d...@googlegroups.com
Yes, I already used pyo with jack2.

Olivier


2012/12/5 PJ leonard <pauljoh...@gmail.com>

PJ leonard

unread,
Dec 5, 2012, 5:53:52 PM12/5/12
to pyo-d...@googlegroups.com
OK  I have installed jack2 but it  removed portaudio.  
If I try to reinstall portaudio19-dev  it tries to get rid of jack2.

pi@raspberrypi ~ $ sudo apt-get install portaudio19-dev
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following package was automatically installed and is no longer required:
  mtools
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  jackd1 libjack-dev libjack0
Suggested packages:
  jack-tools meterbridge
The following packages will be REMOVED:
  jackd jackd2 libjack-jackd2-0 qjackctl
The following NEW packages will be installed:
  jackd1 libjack-dev libjack0 portaudio19-dev
0 upgraded, 4 newly installed, 4 to remove and 21 not upgraded.
Need to get 305 kB/839 kB of archives.
After this operation, 1,275 kB disk space will be freed.
Do you want to continue [Y/n]?  NO I DON'T 

I can install libportaudio-dev  but then I can not compile pyo.

.... ule.c -o build/temp.linux-armv6l-2.7/src/engine/pyomodule.o -Wno-strict-prototypes -O3
src/engine/pyomodule.c: In function ‘portaudio_count_host_apis’:
src/engine/pyomodule.c:57:5: error: unknown type name ‘PaHostApiIndex’
src/engine/pyomodule.c:65:9: warning: implicit declaration of function ‘Pa_GetHostApiCount’ [-Wimplicit-function-declaration]
src/engine/pyomodule.c: In function ‘portaudio_list_host_apis’:

Is there a flag to switch off the portaudio dependencies in pyo ?
Suggestions ?

Olivier Bélanger

unread,
Dec 5, 2012, 6:38:41 PM12/5/12
to pyo-d...@googlegroups.com
portaudio19 can be installed with jack2, but there is a specific order with which dependencies must be installed. I had this working some time ago...

From this blog:
https://bugs.launchpad.net/ubuntu/+source/portaudio19/+bug/132002

portaudio19-dev depends on libjack-dev which indirectly suggest installation of jackd1. By installing libkjack-jackd2-dev before installing portaudio19-dev this dependency will already be met, and you can install it without having to downgrade jackd.

PJ leonard

unread,
Dec 6, 2012, 11:28:20 AM12/6/12
to pyo-d...@googlegroups.com
OK I have discovered that the latest versions of jackd  don't work.

I am following up this with some success

http://sam.aaron.name/2012/11/02/supercollider-on-pi.html

Should pyo work like this? e.g. will I be able to make the connections.

Paul.

Olivier Bélanger

unread,
Dec 6, 2012, 1:00:12 PM12/6/12
to pyo-d...@googlegroups.com
Yes, pyo should be able to work like this. Just be sure that pyo found Jack headers at the compilation. You'll probably have to modify the setup.py file to add the path of Jack include folder...

The default jackname for the pyo server is "pyo".

Olivier


2012/12/6 PJ leonard <pauljoh...@gmail.com>

PJ leonard

unread,
Dec 6, 2012, 3:23:50 PM12/6/12
to pyo-d...@googlegroups.com
OK with

pyo built with jack1.9.9 
but the jackd is 1.9.8.

pyo does not connect to jack it gives an error messages 
when I boot the server (some about incorrect protocol). 

SO do I need to build pyo with the jack1.9.8?

I am havingto fight to get the prerequisites in place because of the mixture of manual installations and apt-gets. Looks like I need the broken jackd installed to be able to install portaudio.  

I guess I need to know how to tell pyo to link with the 1.9.8 libraries ?

PJ leonard

unread,
Dec 6, 2012, 6:23:27 PM12/6/12
to pyo-d...@googlegroups.com
Seem to be nearly there but l am still having trouble connecting.

If I try to connect (after server.boot()) I get

$ jack_connect pyo:output_2 alsa_out:playback_2

Cannot connect ports owned by inactive clients: "pyo" is not active
cannot connect client, already connected?
JackEngine::XRun: client = pyo was not run: state = 2
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = pyo was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error


If I do server.start() it connects thus:

pi@raspberrypi $ jack_lsp -c
system:capture_1
   pyo:input_1
system:capture_2
   pyo:input_2
system:playback_1
   pyo:output_1
system:playback_2
   pyo:output_2
alsa_out:playback_1
alsa_out:playback_2
pyo:input_1
   system:capture_1
pyo:output_1
   system:playback_1
pyo:input_2
   system:capture_2
pyo:output_2
   system:playback_2

---------
I don't think the following is the problem  (?)  but I include for information

I am assuming that pyo loads dynamic libraries and have 

pi@raspberrypi ~ $ echo $LD_LIBRARY_PATH 
/home/pi/local/lib

which is my local build of 1.9.8 jackd

PJ leonard

unread,
Dec 7, 2012, 5:56:26 AM12/7/12
to pyo-d...@googlegroups.com
I just tried the same proceedure on my desktop. I got the same error messages but after starting the pyo server I reconnected using qjackctl and managed to get an output.

I think I tried this on the PI last night but it would not let reconnect.  I will try again later.

PJ leonard

unread,
Dec 7, 2012, 12:28:19 PM12/7/12
to pyo-d...@googlegroups.com
Success! I am now listening to a clean sine wave from pyo on my PI.

And it looks like there might be some cpu left for doing some more processing !

$top
%cpu %mem
9041 pi 20 0 21412 15m 15m S 10.2 8.4 0:23.08
alsa_out
9046 pi 20 0 98564 46m 25m S 3.6 25.4 0:14.39
ipython
9037 pi 20 0 26148 21m 15m S 1.3 11.8 0:04.21 jackd

Here is a summary of what I think might be the simplest route to pyo
on the pi (missing out
many redundant paths I explored)

1. Install pyo using ubunutu instructions on pyo web page.

2. Install jackd1.9.8. see
http://sam.aaron.name/2012/11/02/supercollider-on-pi.html

3. Modify your PATH and LD_LIBRARY_PATH see above

4. start up jackd and alsa_out

jackd -m -p 32 -d dummy &
alsa_out -q1 2>&1 > /dev/null &

5. start your pyo app

6. use qjackctl to disconnect then reconnect the connections as they
should be pyo:output--> alsa_out:playback


7. For the record it seems like the alsa config was broken be a recent update
This might have been why my previous attempt failed.

http://alexpb.com/notes/articles/2012/11/14/error-when-playing-audio-on-raspbian-on-a-raspberry-pi/

Olivier Bélanger

unread,
Dec 7, 2012, 12:49:39 PM12/7/12
to pyo-d...@googlegroups.com
Splendid! Thanks for sharing your procedure.

Olivier


2012/12/7 PJ leonard <pauljoh...@gmail.com>

PJ leonard

unread,
Dec 14, 2012, 5:34:35 AM12/14/12
to pyo-d...@googlegroups.com
Interesting. pyo is now working OK with portaudio on my PI. My
guess is that the privileges set for the jackd have fixed it!

Paul.

lucasparis

unread,
Dec 14, 2012, 8:43:54 PM12/14/12
to pyo-d...@googlegroups.com
Excellent. Thanks, I have to try this. I've had my raspberry pis for 4 months but haven't taken the time for this, maybe next year!

PJ leonard

unread,
Dec 15, 2012, 5:49:42 AM12/15/12
to pyo-d...@googlegroups.com
I think that the pi is a bit too weak for anything more than a few oscillators. I have  the new model with 512Mb on order to see if that is any better, Maybe there is clever stuff that could be done with the graphics processor. 

Jean-Michel Dumas

unread,
Dec 17, 2012, 10:19:18 AM12/17/12
to pyo-d...@googlegroups.com
Anyone tried an Odroid? Much more powerful than the Pi, a bit more expensive and just a bit bigger..


?

PJ leonard

unread,
Jan 9, 2013, 4:58:31 AM1/9/13
to pyo-d...@googlegroups.com
Hi,

The Odroid looks very nice. In my experience multiple cores are good if you try to do anything else whilst the audio playing. 
I have just order one and will report back. 

 I have got pyo working on a beagleboard-xm running  ubuntu 11.10 . Worked out the box!  Some glitches if you run top at the same time but I have not tried sorting out real time priority yet.


This is less powerful then the odroid.
"BeagleBoard-xM delivers extra ARM ® Cortex TM -A8 MHz now at 1 GHz and extra memory with 512MB of low-power DDR RAM"

best Paul.

lucasparis

unread,
Jan 9, 2013, 8:21:20 PM1/9/13
to pyo-d...@googlegroups.com
Yes I saw this and thought the same thing when it was announced, I'm also interested in knowing how well it works. Seeing as Pyo is not multicore currently I don't know if you would benefit from more two cores, one for Pyo and one for the system as you said.


Nathanaël Lécaudé

unread,
Jan 10, 2013, 1:55:57 PM1/10/13
to pyo-d...@googlegroups.com
I have both a BeagleBoardXm and PandaBoard (beagle's board biggest brother) and I did some tests last year and if I recall well pyo worked on both boards.

I still think it would be nice to make it work on the raspberri pi as it's still much cheaper and the development community for it is huge.

2013/1/9 lucasparis <lucaspa...@gmail.com>

PJ leonard

unread,
Jan 10, 2013, 2:41:47 PM1/10/13
to pyo-d...@googlegroups.com
  pyo  does *work* on the raspberry PI but the processing power is very limited. I don't see any way to fix this ?    

Bryan Smart

unread,
Jan 10, 2013, 2:58:10 PM1/10/13
to pyo-d...@googlegroups.com
Do you recall anything about the Pyo performance that you experienced on the BeagleBoard or PandaBoard? The reports that even a few oscs are too much for the RP are disappointing. Surely, one of these small/low-cost boards has a CPU capable of running at least a few filters and DSP effects in real-time.

Bryan

Nathanaël Lécaudé

unread,
Jan 10, 2013, 4:19:00 PM1/10/13
to pyo-d...@googlegroups.com
I will try again on the PandaBoard and will report back.

This is a very interesting blog about a synth project for the pi with discussions on performance : http://raspberrypisynthesizer.blogspot.ca/



2013/1/10 Bryan Smart <bryan...@bryansmart.com>

Bryan Smart

unread,
Jan 10, 2013, 5:18:14 PM1/10/13
to pyo-d...@googlegroups.com
That was extremely informative. After reading through some of this, I doubt that Pyo can even be minimally acceptable on the Pi. Even though I knew that ARM CPUs didn't do a lot per clock cycle, I now realize that saying that they didn't do a lot was giving them way too much credit.

Bryan

PJ leonard

unread,
Jan 10, 2013, 6:37:35 PM1/10/13
to pyo-d...@googlegroups.com
I have run a few of the pyo examples on the beagle board with no problems e.g. 02_random_score.py.   That is until I run top then I experience slight
periodic glitches (python is reporting about 55% CPU for 02_random_score). This glitching with top is not an uncommon experience with other audio setups  I think top must hog the CPU for too long and we get buffer under runs. I am hoping that this can be cured by setting up real time priority for the audio thread.

The odroid has got significantly more power (and is quad core) so I am hoping that it will be OK. From what I have read the ARM based boards have similar performance compared with a laptop from about 4/5 years ago.  Note that the odroid-u2  is priced at 89 dollars. I think
bang for buck it easily beats the PI.   

Olivier Bélanger

unread,
Jan 10, 2013, 6:55:38 PM1/10/13
to pyo-d...@googlegroups.com
02_random_score runs in parallel:

1 segmented line
2 Rossler generators
2 SineLoop generators
2 FM generators
1 integer random generator
1 Score object (insignificant)

Not very much, disappointing...

just curious, how many Sine waves at the same time?

Olivier

2013/1/10 PJ leonard <pauljoh...@gmail.com>

Nathanaël Lécaudé

unread,
May 19, 2013, 1:23:29 PM5/19/13
to pyo-d...@googlegroups.com
When using portaudio, do you still need to install Jack ?
I tried using portaudio only and it fails with this message: 

ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_direct.c:877:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
ALSA lib pcm_dmix.c:1030:(snd_pcm_dmix_open) unable to initialize slave

PJ leonard

unread,
May 19, 2013, 2:22:23 PM5/19/13
to pyo-d...@googlegroups.com
Hi

All I can say is that I followed the instructions here for ubuntu 10.04 
 


I might have also changed the sample rate to 48kHz and set the duplex for just playback.  

Paul.


--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nathanaël Lécaudé

unread,
May 19, 2013, 3:00:57 PM5/19/13
to pyo-d...@googlegroups.com
And you were playing through hdmi or lineout ?


2013/5/19 PJ leonard <pauljoh...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "pyo-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyo-discuss/2KLXwVUjYNk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to pyo-discuss...@googlegroups.com.

PJ leonard

unread,
May 19, 2013, 3:17:55 PM5/19/13
to pyo-d...@googlegroups.com

Nathanaël Lécaudé

unread,
May 19, 2013, 3:27:47 PM5/19/13
to pyo-d...@googlegroups.com
Hmm seems to be using pulseaudio in my version, that might explain the errors...


2013/5/19 PJ leonard <pauljoh...@gmail.com>

Nathanaël Lécaudé

unread,
May 19, 2013, 8:28:44 PM5/19/13
to pyo-d...@googlegroups.com
Just wanted to report that on the Raspberry pi using port audio I got around 90 sine waves until it started to click at the high overclock level and around 100 sines at turbo.  

On Sunday, 19 August 2012 12:44:45 UTC-4, lucasparis wrote:
Hi,

I just received two raspberry pis, haven't even plugged them in yet but I was wondering if anyone had tried running pyo on it and would have tips or a stripped down distribution optimized for pyo?
Otherwise I'll go google hunting for more info, and try to get this to run this winter. 

Also I'll want to hook up some sensors to an adc chip connected to the gpio of the pi, have pyo process the acquired data and send it via osc. Anyone know if I can feed the adc's signal coming in via i2c or spy directly into pyo? would I have to create a custom driver for this? 

Ps: olivier si tu veux experimenter avec le pi j'en ai deux je peux t'en prêter un.

alireza zare

unread,
Dec 8, 2013, 1:53:44 PM12/8/13
to pyo-d...@googlegroups.com
Hi Everyone,

I am kind of new in using raspberry pi. I am trying to run Headspace(https://github.com/crabl/HeadSpace) on my raspberry pi, but looks like I have to have PYO install on it.
Can anyone give me a summary that can help me install pyo on my raspberry pi please ?

Olivier Bélanger

unread,
Dec 8, 2013, 2:32:16 PM12/8/13
to pyo-discuss
Hi,

If you activate the repo for trusty (14.04) you should be able to install pyo with the package manager.

In /etc/apt/sources.list, change the repo from your current system (13.10 is saucy) to trusty:

deb http://archive.ubuntu.com/ubuntu trusty main universe
deb-src http://archive.ubuntu.com/ubuntu trusty main universe

Update the sources:

sudo apt-get update

Then, install pyo:

sudo apt-get install python-pyo

After the installation, you can revert back to the current system version in sources.list if you don't want to update every packages!

Olivier



2013/12/8 alireza zare <alirez...@gmail.com>
--

Tiago Bortoletto Vaz

unread,
Dec 8, 2013, 2:58:12 PM12/8/13
to pyo-d...@googlegroups.com
Hey,

On Sun, Dec 08, 2013 at 02:32:16PM -0500, Olivier Bélanger wrote:
> Hi,
>
> If you activate the repo for trusty (14.04) you should be able to install
> pyo with the package manager.
>
> In /etc/apt/sources.list, change the repo from your current system (13.10
> is saucy) to trusty:
>
> deb http://archive.ubuntu.com/ubuntu trusty main universe
> deb-src http://archive.ubuntu.com/ubuntu trusty main universe
>
> Update the sources:
>
> sudo apt-get update
>
> Then, install pyo:
>
> sudo apt-get install python-pyo

Hmm, I don't think Ubuntu is providing packages for Raspberry architecture
(ARMv6) nor compatible ARMv4/v5. So if you're using the oficial Raspberry
distribution (raspbian) you can just use the default raspbian repository rather
than Ubuntu's. I'm curious know if their pyo build is working, so please share
your results!

Regards,

--
--------------------------------------------------------------------------------
.''`. Tiago Bortoletto Vaz GPG : 4096R/E4B6813D
: :' : http://acaia.ca/~tiago XMPP : tiago at jabber.org
`. `' tiago _at_ {acaia.ca, debian.org} IRC : tiago at OFTC
`- Debian GNU/Linux - The Universal OS http://www.debian.org
--------------------------------------------------------------------------------

Bryan Smart

unread,
Dec 8, 2013, 6:23:46 PM12/8/13
to pyo-d...@googlegroups.com

Alireza,

 

Headspace uses Convolution, which is computationally expensive. The Pi won’t be able to play many Headspace objects. However, for some small applications, just a few 3D audio sources would be enough. I hope that you will report back with info about how many Headspace objects you are able to successfully play at once on your Pi.

 

Bryan

--

kimitrio

unread,
Jan 10, 2014, 4:09:03 PM1/10/14
to pyo-d...@googlegroups.com
using "sudo apt-get install python-pyo" I have PYO installed on my raspberry pi now, however the rest didn't make sense to me, how to activate the repo from trusty.
now when I run my command to play a sound in Headspace I receive the following error : Can you help me with that please ?



pi@cispi01 ~/Desktop/HeadSpace-master $ python hs-test_template.py 
pyo version 0.6.1 (uses single precision)
PortMidi warning: Something wrong with midi device!
Portmidi closed
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1438
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2742
portaudio error in Pa_OpenStream: Invalid number of channels
Portaudio error: Invalid number of channels
Server not booted.
The Server must be booted!

PYO Error: The Server must be booted before creating any audio object.

Exception AttributeError: "'SfPlayer' object has no attribute '_trig_objs'" in <bound method SfPlayer.__del__ of < Instance of SfPlayer class >> ignored

Olivier Bélanger

unread,
Jan 10, 2014, 5:18:59 PM1/10/14
to pyo-discuss
Hi,

My first guess is that the soundcard is already used by an other application because portaudio is unable to open an audio stream. Usually, this is because the soundcard is unavailable...

Olivier



2014/1/10 kimitrio <alirez...@gmail.com>

PJ leonard

unread,
Jan 10, 2014, 5:44:05 PM1/10/14
to pyo-d...@googlegroups.com
"ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports
only playback stream"

What is the duplex in the Server? If it's 1 you could try 0.

Paul.

alireza zare

unread,
Feb 7, 2014, 10:44:31 AM2/7/14
to pyo-d...@googlegroups.com
Hi,

It doesn't appear to be able to find alsa support. Running "apt-cache search alsa" I don't see anything matching or similar to alsa-devel. There doesn't appear to be anything related to alsa in /usr/include, "ls -R /usr/include | grep alsa" returns nothing.

How can I update the portaudio or even check if its installed on my system?

Thanks
Regards,
Reply all
Reply to author
Forward
0 new messages