[Csnd] f-table sample load and playback latency?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] f-table sample load and playback latency?

fauveboy
https://www.dropbox.com/s/ok0u0fhonb2x3k2/Csoundsampleplayback.zip?dl=0


I've uploaded a zip file to the dropbox link here with 5 audio tracks and
three csound files. "MyPerform.csd" is the file that executes the program.

When I launch the program its takes a long time to load the samples into the
f-tables and playback is also slower from the original sound. The sample
rates are correct. I'm not sure why this is happing, perhaps something to do
with ram? Something inefficient with the way I'm loading the samples  maybe?

I've tested the program on OSX and also on raspbian lite which doesn't
manage to play back at all?

Many thanks



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

Victor Lazzarini-2
I see this

 WARNING: Compos0002atrack5.wav sr = 48000, orch sr = 44100.0

etc

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 24 May 2018, at 11:04, fauveboy <[hidden email]> wrote:
>
> https://www.dropbox.com/s/ok0u0fhonb2x3k2/Csoundsampleplayback.zip?dl=0
>
>
> I've uploaded a zip file to the dropbox link here with 5 audio tracks and
> three csound files. "MyPerform.csd" is the file that executes the program.
>
> When I launch the program its takes a long time to load the samples into the
> f-tables and playback is also slower from the original sound. The sample
> rates are correct. I'm not sure why this is happing, perhaps something to do
> with ram? Something inefficient with the way I'm loading the samples  maybe?
>
> I've tested the program on OSX and also on raspbian lite which doesn't
> manage to play back at all?
>
> Many thanks
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

fauveboy
Ah, i didn't get that warning. But even after having just correct it the
performance is the same?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

Victor Lazzarini-2
Don’t know, but changing to 48000 plays everything at the right pitch here.

There is a small load time lapse to get the
data in the tables, but playback seems ok
otherwise.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 24 May 2018, at 12:49, fauveboy <[hidden email]> wrote:
>
> Ah, i didn't get that warning. But even after having just correct it the
> performance is the same?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

fauveboy
I think my error is more specific to the raspberry pi? The terminal is
saying:

memory allocate failure for 134371680

Early return from csoundPerform()



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

Victor Lazzarini-2
Looks like you might have memory issues then.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 24 May 2018, at 13:10, fauveboy <[hidden email]> wrote:
>
> I think my error is more specific to the raspberry pi? The terminal is
> saying:
>
> memory allocate failure for 134371680
>
> Early return from csoundPerform()
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

jpff
Is that attempting to allocate over a
100Mb?

Sent from Blue
On 24 May 2018, at 13:40, Victor Lazzarini <[hidden email]> wrote:
Looks like you might have memory issues then.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 24 May 2018, at 13:10, fauveboy <[hidden email]> wrote:

I think my error is more specific to the raspberry pi? The terminal is
saying:

memory allocate failure for 134371680

Early return from csoundPerform()



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

jpff
In reply to this post by fauveboy
How much memory does yout rPi have?  The samples are 16Msamples each and
as doubles that is 16*8M each.  Not very suprised if a small machine
struggle.  It runs OK on my Linux machine

==John ff

On Thu, 24 May 2018, fauveboy wrote:

> https://www.dropbox.com/s/ok0u0fhonb2x3k2/Csoundsampleplayback.zip?dl=0
>
>
> I've uploaded a zip file to the dropbox link here with 5 audio tracks and
> three csound files. "MyPerform.csd" is the file that executes the program.
>
> When I launch the program its takes a long time to load the samples into the
> f-tables and playback is also slower from the original sound. The sample
> rates are correct. I'm not sure why this is happing, perhaps something to do
> with ram? Something inefficient with the way I'm loading the samples  maybe?
>
> I've tested the program on OSX and also on raspbian lite which doesn't
> manage to play back at all?
>
> Many thanks
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

fauveboy
It's the raspberry pi 3 which has 1GB RAM i believe.

Interestingly i ran this script for ecasound to playback the same tracks
which did playback. If you have the audio files you may want to try the
following:

Ecasound -c
-a1:1 -f:16,2,48000 -I Compos0002atrack1.wav
-a2:1 -f:16,2,48000 -I Compos0002atrack2.wav
-a3:1 -f:16,2,48000 -I Compos0002atrack3.wav
-a4:1 -f:16,2,48000 -I Compos0002atrack4.wav
-a5:1 -f:16,2,48000 -I Compos0002atrack5.wav
-a:all -o alsa

Theres, however, a little distortion happening?
Also I'm curious as to why ecasound can playback the audio and not csound
-odac “filename”?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

Victor Lazzarini-2
That’s reading from disk. Not loading to memory.
Use diskin for a comparable approach.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 24 May 2018, at 15:46, fauveboy <[hidden email]> wrote:
>
> It's the raspberry pi 3 which has 1GB RAM i believe.
>
> Interestingly i ran this script for ecasound to playback the same tracks
> which did playback. If you have the audio files you may want to try the
> following:
>
> Ecasound -c
> -a1:1 -f:16,2,48000 -I Compos0002atrack1.wav
> -a2:1 -f:16,2,48000 -I Compos0002atrack2.wav
> -a3:1 -f:16,2,48000 -I Compos0002atrack3.wav
> -a4:1 -f:16,2,48000 -I Compos0002atrack4.wav
> -a5:1 -f:16,2,48000 -I Compos0002atrack5.wav
> -a:all -o alsa
>
> Theres, however, a little distortion happening?
> Also I'm curious as to why ecasound can playback the audio and not csound
> -odac “filename”?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

fauveboy
After looking at the /meminfo of the pi when the program is running it shows
"MemFree: 21884" which is only 20MB of RAM available as rhe audio files are
~64MB each theres not enough memory.

If i use Diskin it means I have to write a different orchestra for each
project.
When I'm using tablei I've written one orch instrument and i can send it
different scores which is a lot more tidy. Also, i can manipulate phase and
pitch nicely as I'm using a phasor, which is again also good for real-time
playback manipulation.

Is there any way have tablei read from disk so I can maintain the workflow i
have?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

Victor Lazzarini-2
No, tablei is just a table reader. For disk access, there is diskin/diskin2 and also
diskgrain (granular synthesis).
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 24 May 2018, at 16:10, fauveboy <[hidden email]> wrote:
>
> After looking at the /meminfo of the pi when the program is running it shows
> "MemFree: 21884" which is only 20MB of RAM available as rhe audio files are
> ~64MB each theres not enough memory.
>
> If i use Diskin it means I have to write a different orchestra for each
> project.
> When I'm using tablei I've written one orch instrument and i can send it
> different scores which is a lot more tidy. Also, i can manipulate phase and
> pitch nicely as I'm using a phasor, which is again also good for real-time
> playback manipulation.
>
> Is there any way have tablei read from disk so I can maintain the workflow i
> have?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

genell
In reply to this post by fauveboy
I don’t have he pi3 but in previous models there was a way to set how system memory is divided between graphics and other use. Maybe there is a similar way to increase available memory?
Do you run any graphics on the Pi? Maybe boot without graphics if that would work for you?
Just my $ 0.02

Regards,
Anders

> 24 maj 2018 kl. 16:46 skrev fauveboy <[hidden email]>:
>
> It's the raspberry pi 3 which has 1GB RAM i believe.
>
> Interestingly i ran this script for ecasound to playback the same tracks
> which did playback. If you have the audio files you may want to try the
> following:
>
> Ecasound -c
> -a1:1 -f:16,2,48000 -I Compos0002atrack1.wav
> -a2:1 -f:16,2,48000 -I Compos0002atrack2.wav
> -a3:1 -f:16,2,48000 -I Compos0002atrack3.wav
> -a4:1 -f:16,2,48000 -I Compos0002atrack4.wav
> -a5:1 -f:16,2,48000 -I Compos0002atrack5.wav
> -a:all -o alsa
>
> Theres, however, a little distortion happening?
> Also I'm curious as to why ecasound can playback the audio and not csound
> -odac “filename”?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

fauveboy
cheers, I am in fact running raspian lite which is without the graphics.
Diskin2 seems to be the solution for now



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

zappfinger
You could also try to increase the swap file. 

2018-05-24 19:55 GMT+02:00 fauveboy <[hidden email]>:
cheers, I am in fact running raspian lite which is without the graphics.
Diskin2 seems to be the solution for now



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] f-table sample load and playback latency?

genell
Here is a link to the setting I was referring to; don't know if it is applicable in you case, but it seems to be independent on whether the x-system is activated or not.

Regards,
Anders

On Fri, May 25, 2018 at 1:49 PM, Richard van Bemmelen <[hidden email]> wrote:
You could also try to increase the swap file. 

2018-05-24 19:55 GMT+02:00 fauveboy <[hidden email]>:
cheers, I am in fact running raspian lite which is without the graphics.
Diskin2 seems to be the solution for now



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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 [hidden email] 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 [hidden email] 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