Csound Csound-dev Csound-tekno Search About

Re: RPI + pvs opcode buffer underrun issue

Date2016-03-29 15:30
FromPaul Batchelor
SubjectRe: RPI + pvs opcode buffer underrun issue

A few things to try...

Make sure you are using alsa and not portaudio or pulse with the rtaudio flag

Change the hardware/software buffer sizes

Make your signal mono.

Make you samplerate 20khz?

Ksmps should be larger.

I recently figures out how to get JACK running on the pi, and it has been a dramatic improvement. You can set your samplerates to be lower than ALSA. I was able to get mincer to run in real-time on the *original* model B at 16khz. You lose fidelity, but with the crummy 11-bit DAC it's less of a sacrifice than you think.

Happy hacking,

-P

On Mar 28, 2016 01:39, "Richard" <richard@rwdobson.com> wrote:
If you have the original V1 R-Pi, I would not expect it to support real-time pvs. One of the first things I did when I got mine was to build and run command-line pvoc, and it didn't ~quite~ have enough speed for real-time. I would expect R-Pi 2 to be better. I have just taken delivery of the new v3 which should be better still, but have yet to set it up.

At a pinch it might just be Ok at a lower sample rate (and the lowest analysis rate you can get away with).

Richard Dobson

On 28/03/2016 04:42, Emmett Palaima wrote:
Hi, I am working on a live audio processor with the raspberry pi, and
was hoping to use some of the pvs opcodes in my patches, as they make
some of my favorite sounds. I am running into the issue that I can't
seem to use them on the pi without causing buffer underrun issues in the
output. I have tried making the patch as streamlined as possible, as
well as using a variety of k-rates, sample rates, buffer sizes and
window sizes. Even when I got into very low sample and k rates with very
high buffer and window sizes I can't get it to run correctly.

Is there anything else I can do to make it run more smoothly, or am I
just running up against the limitations of the technology, since pvs is
very cpu intensive. Here is my code, please let me know if you see
anything.

..

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2016-03-29 19:22
From"Dr. Richard Boulanger"
SubjectRe: RPI + pvs opcode buffer underrun issue
Thanks for the great suggestions Paul.  

-dB

On Tue, Mar 29, 2016 at 10:30 AM, Paul Batchelor <ralphbluecoat@gmail.com> wrote:

A few things to try...

Make sure you are using alsa and not portaudio or pulse with the rtaudio flag

Change the hardware/software buffer sizes

Make your signal mono.

Make you samplerate 20khz?

Ksmps should be larger.

I recently figures out how to get JACK running on the pi, and it has been a dramatic improvement. You can set your samplerates to be lower than ALSA. I was able to get mincer to run in real-time on the *original* model B at 16khz. You lose fidelity, but with the crummy 11-bit DAC it's less of a sacrifice than you think.

Happy hacking,

-P

On Mar 28, 2016 01:39, "Richard" <richard@rwdobson.com> wrote:
If you have the original V1 R-Pi, I would not expect it to support real-time pvs. One of the first things I did when I got mine was to build and run command-line pvoc, and it didn't ~quite~ have enough speed for real-time. I would expect R-Pi 2 to be better. I have just taken delivery of the new v3 which should be better still, but have yet to set it up.

At a pinch it might just be Ok at a lower sample rate (and the lowest analysis rate you can get away with).

Richard Dobson

On 28/03/2016 04:42, Emmett Palaima wrote:
Hi, I am working on a live audio processor with the raspberry pi, and
was hoping to use some of the pvs opcodes in my patches, as they make
some of my favorite sounds. I am running into the issue that I can't
seem to use them on the pi without causing buffer underrun issues in the
output. I have tried making the patch as streamlined as possible, as
well as using a variety of k-rates, sample rates, buffer sizes and
window sizes. Even when I got into very low sample and k rates with very
high buffer and window sizes I can't get it to run correctly.

Is there anything else I can do to make it run more smoothly, or am I
just running up against the limitations of the technology, since pvs is
very cpu intensive. Here is my code, please let me know if you see
anything.

..

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here



--
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
President of Boulanger Labs - http://boulangerlabs.com
Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book
Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book
______________________________________________
about: http://www.boulangerlabs.com/about/richardboulanger/
about: http://www.csounds.com/community/developers/dr-richard-boulanger/
music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/

______________________________________________
email: rboulanger@berklee.edu
facebook: https://www.facebook.com/richard.boulanger.58
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here