Csound Csound-dev Csound-tekno Search About

Re: [Csnd] fout on Android?

Date2012-09-13 18:17
From"Art Hunkins"
SubjectRe: [Csnd] fout on Android?
Thanks for all the replies regarding Android latency. All very helpful and definitive.
 
With regard to my current project (a .csd for performance with Victor's CSD Player app), I've found the following:
1) SR = 8000 is the highest rate it will play without dropouts (on Samsung Tab 2 7.0). I know this is a CPU limitation.
2) CsOptions, in addition to -odac, *must* include: -b128 -B2048
Without these, latency goes up to approx. 1 second! (Also, -b64 gives stuttering, so that's apparently the lower end for me.)
 
So, whatever the defaults are for -b and -B, they are surely not applicable for realtime on Android.
 
Art Hunkins
----- Original Message -----
Sent: Thursday, September 13, 2012 11:08 AM
Subject: Re: [Csnd] fout on Android?

It probably is device dependent.  The big thing to note about Android is that it is an OS. It is unlike Apple which is a single hardware/OS base.  Android devices vary greatly by CPU strength, thus some of the challenges of app development.

Csound lib itself way outperforms what Google gave the Java developer to work with (AudioTrack,SoundPool). 

On Thu, Sep 13, 2012 at 10:59 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
I think also that latency might be device-dependent.

On 13 Sep 2012, at 15:30, Roger Kelly wrote:

I don't think I have any real tips on latency.  I am using this below in my header.  I am not really sure how much latency is being talked about.  I know there is some but don't see it much.  I don't think it is anywhere near the 200ms stated earlier.  You should grab my app and give me your opinion on how much latency you notice.  

I am using my own custom designed controls in Android, but basically it uses the standard Android touch framework underneath.  Most of what I used to learn how to build it was from the MultiTouchExample in the CsoundAndroid package.

-o dac -+rtmidi=null -+rtaudio=null -d -+msg_color=0 -M0 -m0

</CsOptions>

<CsInstruments>

nchnls=2

;0dbfs=1

ksmps=64

sr = 44100


On Thu, Sep 13, 2012 at 10:09 AM, Art Hunkins <abhunkin@uncg.edu> wrote:
Roger (or anyone else),
 
Do you have any tricks to improve latency on Android?
 
Any special CsOptions?
I've been using:
-odac -m0d --expression-opt -b128 -B2048
 
Art Hunkins

----- Original Message -----
Sent: Wednesday, September 12, 2012 7:19 PM
Subject: Re: [Csnd] fout on Android?

I played it.  The latency was not really a problem.  fluid would be nice to see.  loscil works great also!

On Wed, Sep 12, 2012 at 7:13 PM, <Victor.Lazzarini@nuim.ie> wrote:
I see, did you play it, or somehow managed to sequence the tracks? I am asking just because of the famous android latency issue.


It will be nice to see the Jambar use Csound. We'll be working on getting plugins to work on Android, so it might be possible to get the fluid opcodes into it. (off the top of my head, the soundfont ones are there as built-in, so they can be used)



Victor
----- Original Message -----
From: Roger Kelly <loraxman@gmail.com>
Date: Thursday, September 13, 2012 12:06 am
Subject: Re: [Csnd] fout on Android?
To: csound@lists.bath.ac.uk

> The sample tracks you see at http://acousticorchard.com/microsynth/market were made with my "first" version of Monodot (1 osc, delays and filter/LFO).  It was made on an HTC glacier phone recorded using a Zoom R8 portable recorder.  The only other sound that is not my Monodot app are the drum tracks that come with the Zoom R8.


> My Jambar product is my first app and is sample based.  It is an attempt at a phrase loop type product.  I used Android's SoundPool.  SoundPool is a bit buggy and I was porting it to AudioTrack.  I had an experimental version running Csoundlib and will probably move it to csoundlib at some point.  
>
> On Wed, Sep 12, 2012 at 6:49 PM, <Victor.Lazzarini@nuim.ie> wrote:
> Definitely. By the way, how did you make the example tracks? 
> I saw the JamBar, what is that based on for synthesis? 

>
> ----- Original Message -----
> From: Roger Kelly <loraxman+csound@gmail.com>
> Date: Wednesday, September 12, 2012 11:46 pm
> Subject: Re: [Csnd] fout on Android?
> To: csound@lists.bath.ac.uk
>
> > Would you guys give me some feedback on the Google Play? 
> >
> > On Wed, Sep 12, 2012 at 6:42 PM, Roger Kelly <loraxman+csound@gmail.com> wrote:
> > I am using a moogvcf2.  Which is the nicer sound? 


> >
> > On Wed, Sep 12, 2012 at 6:35 PM, <Victor.Lazzarini@nuim.ie> wrote:
> > Are you using moogvcf or moogladder? The sound is nice.
> > Btw, I have a pleasure of having a minimoog voyager OS in my office, which looks quite similar to the original. Always wanted to be able to play one of those since I was about 12.
> >
> > Victor

>
>
> > ----- Original Message -----
> > From: Roger Kelly <loraxman@gmail.com>
> > Date: Wednesday, September 12, 2012 11:29 pm
> > Subject: Re: [Csnd] fout on Android?
> > To: csound@lists.bath.ac.uk
> >
> > > Yes it is Csoundlib.  It is a very basic vco2 monophonic synth emulation of something closish to a MiniMoog.  I have been waiting for Csound to be ported to Android for some time and was really excited to see it this year!
> >
> >
> > > Btw, I just went on a tour of the Moog factory in Asheville, NC this morning.  Amazing place! Bob Moog's legacy.  Tiny place, but see great to see if you are ever there.
> >
> >
> > >
> > >
> > > On Wed, Sep 12, 2012 at 6:20 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > And is it using CsoundLib? I must have missed this when you announced
> > > it. I was away for a good bit over the summer and had to simply purge
> > > a load of Csound mails.
>
>
> > >
> > > On 12 September 2012 23:16, Roger Kelly <loraxman+csound@gmail.com> wrote:
> > > > Thanks much!  It is pretty small for phone-type devices.  The knobs take
> > > > some holding down and just spinning your fingers.  They are "sticky" knobs
> > > > so you can turn them outside of their image area so to speak.  Much easier
> > > > on a tablet.
> > > >
> > > >
> > > >
> > > > On Wed, Sep 12, 2012 at 6:12 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > >>
> > > >> Works great on my little nexus S. I guess it's not really designed for
> > > >> such a small device; I feel like Gulliver in Lilliput each time I try
> > > >> to tweak the GUI! Still, the sound is great and the latency between
> > > >> the keys and the audio is pretty good. Nice work.
> > > >>
> > > >> On 12 September 2012 23:04, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > >> > Still downloading...slow internet! But also, it's quite a large
> > > >> > download? 26mb's?
> > > >> >
> > > >> > On 12 September 2012 23:00,  <Victor.Lazzarini@nuim.ie> wrote:
> > > >> >> Looks great, Roger. Good job.
> > > >> >>
> > > >> >>
> > > >> >> ----- Original Message -----
> > > >> >> From: Roger Kelly <loraxman+csound@gmail.com>
> > > >> >> Date: Wednesday, September 12, 2012 10:30 pm
> > > >> >> Subject: Re: [Csnd] fout on Android?
> > > >> >> To: csound@lists.bath.ac.uk
> > > >> >>
> > > >> >>> Yes like this
> > > >> >>> https://play.google.com/store/apps/details?id=aorch.monodotlite&hl=en
> > > >> >>> ;)
> > > >> >>
> > > >> >>
> > > >> >>> My app on Google Play.
> > > >> >>>
> > > >> >>> On Wed, Sep 12, 2012 at 5:16 PM, Toby <toby@tobiah.org> wrote:
> > > >> >>>
> > > >> >>> > On 09/12/2012 02:10 PM, Roger Kelly wrote:
> > > >> >>>>
> > > >> >>>> > The real fun is in building real-time touch apps.  Basically your
> > > >> >>>> > tablet or phone is a touch controller and what you can do with
> > > >> >>>> > Csound, Java, and Android is only limited to your imagination.
> > > >> >>>
> > > >> >>> >
> > > >> >>> > So can you embed csound into an app, or does it normally stand
> > > >> >>> > alone?
> > > >> >>> >
> > > >> >>> > Toby
> > > >> >>>
> > > >> >>> >
> > > >> >>> >
> > > >> >>> > Send bugs reports to the Sourceforge bug tracker
> > > >> >>> >
> > > >> >>> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > >> >>> > Discussions of bugs and features can be posted here
> > > >> >>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> > > >> >>> > "unsubscribe
> > > >> >>> > csound"
> > > >> >>> >
> > > >> >>
> > > >> >>>
> > > >> >>
> > > >> >>
> > > >> >> Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> > > >> >> National University of Ireland, Maynooth
> > > >>
> > > >>
> > > >> Send bugs reports to the Sourceforge bug tracker
> > > >>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > >> Discussions of bugs and features can be posted here
> > > >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> > > >> csound"
> > > >>
> > > >
> > >
> > >
> > > Send bugs reports to the Sourceforge bug tracker
> > >             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > Discussions of bugs and features can be posted here
> > > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> > >
> >
> > >
> >
> >
> > Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> > National University of Ireland, Maynooth
> >
> >
>
>
> Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> National University of Ireland, Maynooth
>


Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie





Date2012-09-13 18:42
FromVictor.Lazzarini@nuim.ie
SubjectRe: [Csnd] fout on Android?
AttachmentsNone  None  

Date2012-09-13 19:20
FromRoger Kelly
SubjectRe: [Csnd] fout on Android?
What is a good way to measure latency?

On Thu, Sep 13, 2012 at 1:42 PM, <Victor.Lazzarini@nuim.ie> wrote:
That is also device dependent. The defaults on the Galaxy 10.1 give me about 300 ms latency.
Bringing -b to 512 (the smallest size without drops) reduces it to about 200 ms.


----- Original Message -----
From: Art Hunkins <abhunkin@uncg.edu>
Date: Thursday, September 13, 2012 6:18 pm
Subject: Re: [Csnd] fout on Android?
To: csound@lists.bath.ac.uk


> Thanks for all the replies regarding Android latency. All very helpful and definitive.
>  
> With regard to my current project (a .csd for performance with Victor's CSD Player app), I've found the following:
> 1) SR = 8000 is the highest rate it will play without dropouts (on Samsung Tab 2 7.0). I know this is a CPU limitation.
> 2) CsOptions, in addition to -odac, *must* include: -b128 -B2048
> Without these, latency goes up to approx. 1 second! (Also, -b64 gives stuttering, so that's apparently the lower end for me.)

>  
> So, whatever the defaults are for -b and -B, they are surely not applicable for realtime on Android.
>  
> Art Hunkins
> ----- Original Message -----
> From: Roger Kelly
> Sent: Thursday, September 13, 2012 11:08 AM
> Subject: Re: [Csnd] fout on Android?

>
> It probably is device dependent.  The big thing to note about Android is that it is an OS. It is unlike Apple which is a single hardware/OS base.  Android devices vary greatly by CPU strength, thus some of the challenges of app development.


> Csound lib itself way outperforms what Google gave the Java developer to work with (AudioTrack,SoundPool). 
>
> On Thu, Sep 13, 2012 at 10:59 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> I think also that latency might be device-dependent.



> On 13 Sep 2012, at 15:30, Roger Kelly wrote:
>
> I don't think I have any real tips on latency.  I am using this below in my header.  I am not really sure how much latency is being talked about.  I know there is some but don't see it much.  I don't think it is anywhere near the 200ms stated earlier.  You should grab my app and give me your opinion on how much latency you notice.  


> I am using my own custom designed controls in Android, but basically it uses the standard Android touch framework underneath.  Most of what I used to learn how to build it was from the MultiTouchExample in the CsoundAndroid package.

> -o dac -+rtmidi=null -+rtaudio=null -d -+msg_color=0 -M0 -m0

> </CsOptions>

> <CsInstruments>

> nchnls=2

> ;0dbfs=1

> ksmps=64

> sr = 44100


> On Thu, Sep 13, 2012 at 10:09 AM, Art Hunkins <abhunkin@uncg.edu> wrote:

> Roger (or anyone else),

>  

> Do you have any tricks to improve latency on Android?

>  
> Any special CsOptions?
> I've been using:

> -odac -m0d --expression-opt -b128 -B2048
>  
> Art Hunkins
>

> ----- Original Message -----
> From: Roger Kelly

> Sent: Wednesday, September 12, 2012 7:19 PM


> Subject: Re: [Csnd] fout on Android?

>
> I played it.  The latency was not really a problem.  fluid would be nice to see.  loscil works great also!
>
> On Wed, Sep 12, 2012 at 7:13 PM, <Victor.Lazzarini@nuim.ie> wrote:
> I see, did you play it, or somehow managed to sequence the tracks? I am asking just because of the famous android latency issue.
>
>
> It will be nice to see the Jambar use Csound. We'll be working on getting plugins to work on Android, so it might be possible to get the fluid opcodes into it. (off the top of my head, the soundfont ones are there as built-in, so they can be used)

>
>
> Victor
> ----- Original Message -----
> From: Roger Kelly <loraxman@gmail.com>


> Date: Thursday, September 13, 2012 12:06 am
> Subject: Re: [Csnd] fout on Android?
> To: csound@lists.bath.ac.uk
>
> > The sample tracks you see at http://acousticorchard.com/microsynth/market were made with my "first" version of Monodot (1 osc, delays and filter/LFO).  It was made on an HTC glacier phone recorded using a Zoom R8 portable recorder.  The only other sound that is not my Monodot app are the drum tracks that come with the Zoom R8.
>
>
> > My Jambar product is my first app and is sample based.  It is an attempt at a phrase loop type product.  I used Android's SoundPool.  SoundPool is a bit buggy and I was porting it to AudioTrack.  I had an experimental version running Csoundlib and will probably move it to csoundlib at some point.  
> >
> > On Wed, Sep 12, 2012 at 6:49 PM, <Victor.Lazzarini@nuim.ie> wrote:
> > Definitely. By the way, how did you make the example tracks? 
> > I saw the JamBar, what is that based on for synthesis? 

> >
> > ----- Original Message -----
> > From: Roger Kelly <loraxman+csound@gmail.com>


> > Date: Wednesday, September 12, 2012 11:46 pm
> > Subject: Re: [Csnd] fout on Android?
> > To: csound@lists.bath.ac.uk
> >
> > > Would you guys give me some feedback on the Google Play? 
> > >
> > > On Wed, Sep 12, 2012 at 6:42 PM, Roger Kelly <loraxman+csound@gmail.com> wrote:
> > > I am using a moogvcf2.  Which is the nicer sound? 
>
>
> > >
> > > On Wed, Sep 12, 2012 at 6:35 PM, <Victor.Lazzarini@nuim.ie> wrote:
> > > Are you using moogvcf or moogladder? The sound is nice.
> > > Btw, I have a pleasure of having a minimoog voyager OS in my office, which looks quite similar to the original. Always wanted to be able to play one of those since I was about 12.
> > >
> > > Victor

> >
> >
> > > ----- Original Message -----
> > > From: Roger Kelly <loraxman@gmail.com>
> > > Date: Wednesday, September 12, 2012 11:29 pm
> > > Subject: Re: [Csnd] fout on Android?
> > > To: csound@lists.bath.ac.uk
> > >
> > > > Yes it is Csoundlib.  It is a very basic vco2 monophonic synth emulation of something closish to a MiniMoog.  I have been waiting for Csound to be ported to Android for some time and was really excited to see it this year!
> > >
> > >
> > > > Btw, I just went on a tour of the Moog factory in Asheville, NC this morning.  Amazing place! Bob Moog's legacy.  Tiny place, but see great to see if you are ever there.
> > >
> > >
> > > >
> > > >
> > > > On Wed, Sep 12, 2012 at 6:20 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > > And is it using CsoundLib? I must have missed this when you announced
> > > > it. I was away for a good bit over the summer and had to simply purge
> > > > a load of Csound mails.
> >
> >
> > > >
> > > > On 12 September 2012 23:16, Roger Kelly <loraxman+csound@gmail.com> wrote:
> > > > > Thanks much!  It is pretty small for phone-type devices.  The knobs take
> > > > > some holding down and just spinning your fingers.  They are "sticky" knobs
> > > > > so you can turn them outside of their image area so to speak.  Much easier
> > > > > on a tablet.
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Sep 12, 2012 at 6:12 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > > >>
> > > > >> Works great on my little nexus S. I guess it's not really designed for
> > > > >> such a small device; I feel like Gulliver in Lilliput each time I try
> > > > >> to tweak the GUI! Still, the sound is great and the latency between
> > > > >> the keys and the audio is pretty good. Nice work.
> > > > >>
> > > > >> On 12 September 2012 23:04, Rory Walsh <rorywalsh@ear.ie> wrote:
> > > > >> > Still downloading...slow internet! But also, it's quite a large
> > > > >> > download? 26mb's?
> > > > >> >
> > > > >> > On 12 September 2012 23:00,  <Victor.Lazzarini@nuim.ie> wrote:
> > > > >> >> Looks great, Roger. Good job.
> > > > >> >>
> > > > >> >>
> > > > >> >> ----- Original Message -----
> > > > >> >> From: Roger Kelly <loraxman+csound@gmail.com>
> > > > >> >> Date: Wednesday, September 12, 2012 10:30 pm
> > > > >> >> Subject: Re: [Csnd] fout on Android?
> > > > >> >> To: csound@lists.bath.ac.uk
> > > > >> >>
> > > > >> >>> Yes like this
> > > > >> >>> https://play.google.com/store/apps/details?id=aorch.monodotlite&hl=en
> > > > >> >>> ;)
> > > > >> >>
> > > > >> >>
> > > > >> >>> My app on Google Play.
> > > > >> >>>
> > > > >> >>> On Wed, Sep 12, 2012 at 5:16 PM, Toby <toby@tobiah.org> wrote:
> > > > >> >>>
> > > > >> >>> > On 09/12/2012 02:10 PM, Roger Kelly wrote:
> > > > >> >>>>
> > > > >> >>>> > The real fun is in building real-time touch apps.  Basically your
> > > > >> >>>> > tablet or phone is a touch controller and what you can do with
> > > > >> >>>> > Csound, Java, and Android is only limited to your imagination.
> > > > >> >>>
> > > > >> >>> >
> > > > >> >>> > So can you embed csound into an app, or does it normally stand
> > > > >> >>> > alone?
> > > > >> >>> >
> > > > >> >>> > Toby
> > > > >> >>>
> > > > >> >>> >
> > > > >> >>> >
> > > > >> >>> > Send bugs reports to the Sourceforge bug tracker
> > > > >> >>> >
> > > > >> >>> > https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > > >> >>> > Discussions of bugs and features can be posted here
> > > > >> >>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
> > > > >> >>> > "unsubscribe
> > > > >> >>> > csound"
> > > > >> >>> >
> > > > >> >>
> > > > >> >>>
> > > > >> >>
> > > > >> >>
> > > > >> >> Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> > > > >> >> National University of Ireland, Maynooth
> > > > >>
> > > > >>
> > > > >> Send bugs reports to the Sourceforge bug tracker
> > > > >>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > > >> Discussions of bugs and features can be posted here
> > > > >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> > > > >> csound"
> > > > >>
> > > > >
> > > >
> > > >
> > > > Send bugs reports to the Sourceforge bug tracker
> > > >             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > > > Discussions of bugs and features can be posted here
> > > > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> > > >
> > >
> > > >
> > >
> > >
> > > Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> > > National University of Ireland, Maynooth
> > >
> > >
> >
> >
> > Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> > National University of Ireland, Maynooth
> >
>
>
> Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
> National University of Ireland, Maynooth
>
>
>


> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>



Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth