Csound for Android Apps and Sample Rates
Date | 2017-06-27 15:03 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Csound for Android Apps and Sample Rates |
Just checking:
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
Does Csound for Android use the sample rate specified in a .csd, or does it override the specified rate with its own "fixed" rate, e.g., 48000? I assume Android uses the .csd's specified rate, but wanted to ask those who know. (I have a GEN05 routine which is specifying a filter cutoff point as a fraction of SR, and it is acting in a somewhat peculiar fashion.) Art Hunkins |
Date | 2017-06-29 14:46 |
From | Steven Yi |
Subject | Re: Csound for Android Apps and Sample Rates |
Attachments | sr_test.csd |
Hi Art, I looked through the code and did not see anything in particular overriding the sample rate. You could always add a "print sr" in the instr 0 space to double check. For example, the attached CSD prints "sr = 48000" by default, but if I use "csound --sample-rate=44100 sr_test.csd" it prints the overridden value of "sr = 44100". steven On Tue, Jun 27, 2017 at 10:03 AM, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote: > Just checking: > > Does Csound for Android use the sample rate specified in a .csd, or does it > override the specified rate with its own "fixed" rate, e.g., 48000? > > I assume Android uses the .csd's specified rate, but wanted to ask those who > know. > > (I have a GEN05 routine which is specifying a filter cutoff point as a > fraction of SR, and it is acting in a somewhat peculiar fashion.) > > Art Hunkins > http://www.arthunkins.com > 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 |
Date | 2017-06-29 22:17 |
From | Brian Redfern |
Subject | Re: Csound for Android Apps and Sample Rates |
I've been setting it to 48khz in my apps, as far as I know opensl uses the orchestra's sr setting however there are all kinds of strange implementations per device. The device itself could resample to whatever it wants. Android itself can in theory handle from 8khz tto 48khz. Some devices downsample from 48khz to 44100khz and some upsample from 44100 to 48000 without any control from the developer. On Thu, Jun 29, 2017 at 6:46 AM Steven Yi <stevenyi@gmail.com> wrote: Hi Art, |
Date | 2017-06-30 03:10 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: Csound for Android Apps and Sample Rates |
Thanks for the feedback, Brian and Steven. I can't quite figure out what *might* be going on with my Nexus 6, but I guess you just have to put up with this possible variation (in sample rate) on Android devices. In any case, my .csd (Android) seems to do somewhat better (more consistently) when I define a filter cutoff point as a given frequency rather than a % of sample rate. Art Hunkins Art Hunkins On Thu, Jun 29, 2017 at 5:17 PM, Brian Redfern <brianwredfern@gmail.com> wrote:
|
Date | 2017-06-30 03:23 |
From | Brian Redfern |
Subject | Re: Csound for Android Apps and Sample Rates |
Yeah that's going to give you more predictable results on android because that frequency will always be the same but the jump from 44100 to 48000 or vice versa could play havoc with your filter. On Thu, Jun 29, 2017 at 7:10 PM Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|