Csound Csound-dev Csound-tekno Search About

could this be a bug in androidCS?

Date2016-03-09 16:55
Fromjpff
Subjectcould this be a bug in androidCS?
I have a csd that in its original state records a mono input from the
microphone, tweaks it and plays it back.  This works on my laptop and
on android give or take a minor oddity.  I though I might change the
output to stereo and play with panning, but I have a problem.

On the laptop it works OK as I expect.

On android tablet/phone the sound is half speed -- ie lower pitch and
lower speed, unlike the laptop.

I have code
....
nchnls = 2
nchnls_i = 1
....
   asig        in
   kstart      tablewa 2, asig, 0
....
   al, ar      pan2     asig, kpan
               outs     al, ar

Surely that is correct?

Do i have to use a stereo input and throwaway the right?  But
the systems are not the same

==John ffitch

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-09 17:06
FromVictor Lazzarini
SubjectRe: could this be a bug in androidCS?
did you try setting nchnls_i to 1. It could be that the mono input is being split in two channels, effectively running at half sr.
Note that nchnls_i was not working correctly until recently, so if the lib binary is old, this will not work.

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

> On 9 Mar 2016, at 16:55, jpff  wrote:
> 
> I have a csd that in its original state records a mono input from the
> microphone, tweaks it and plays it back.  This works on my laptop and
> on android give or take a minor oddity.  I though I might change the
> output to stereo and play with panning, but I have a problem.
> 
> On the laptop it works OK as I expect.
> 
> On android tablet/phone the sound is half speed -- ie lower pitch and
> lower speed, unlike the laptop.
> 
> I have code
> ....
> nchnls = 2
> nchnls_i = 1
> ....
>   asig        in
>   kstart      tablewa 2, asig, 0
> ....
>   al, ar      pan2     asig, kpan
>               outs     al, ar
> 
> Surely that is correct?
> 
> Do i have to use a stereo input and throwaway the right?  But
> the systems are not the same
> 
> ==John ffitch
> 
> 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-09 19:05
Fromjpff
SubjectRe: could this be a bug in androidCS?
I set nchnls_i to  1.  No idea what is in the binary -- says 6.07 ec 
2015 but that is not finished yet.  This is the system downloaded fron 
playstore.

Tried making it all stereo and that works well.

==John

On Wed, 9 Mar 2016, Victor Lazzarini wrote:

> did you try setting nchnls_i to 1. It could be that the mono input is being split in two channels, effectively running at half sr.
> Note that nchnls_i was not working correctly until recently, so if the lib binary is old, this will not work.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 9 Mar 2016, at 16:55, jpff  wrote:
>>
>> I have a csd that in its original state records a mono input from the
>> microphone, tweaks it and plays it back.  This works on my laptop and
>> on android give or take a minor oddity.  I though I might change the
>> output to stereo and play with panning, but I have a problem.
>>
>> On the laptop it works OK as I expect.
>>
>> On android tablet/phone the sound is half speed -- ie lower pitch and
>> lower speed, unlike the laptop.
>>
>> I have code
>> ....
>> nchnls = 2
>> nchnls_i = 1
>> ....
>>   asig        in
>>   kstart      tablewa 2, asig, 0
>> ....
>>   al, ar      pan2     asig, kpan
>>               outs     al, ar
>>
>> Surely that is correct?
>>
>> Do i have to use a stereo input and throwaway the right?  But
>> the systems are not the same
>>
>> ==John ffitch
>>
>> 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
>

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-09 19:08
FromVictor Lazzarini
SubjectRe: could this be a bug in androidCS?
Ah, then it's because on android input and output channels must be stereo always. I think it rings a bell.

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

> On 9 Mar 2016, at 19:05, jpff  wrote:
> 
> I set nchnls_i to  1.  No idea what is in the binary -- says 6.07 ec 2015 but that is not finished yet.  This is the system downloaded fron playstore.
> 
> Tried making it all stereo and that works well.
> 
> ==John
> 
>> On Wed, 9 Mar 2016, Victor Lazzarini wrote:
>> 
>> did you try setting nchnls_i to 1. It could be that the mono input is being split in two channels, effectively running at half sr.
>> Note that nchnls_i was not working correctly until recently, so if the lib binary is old, this will not work.
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 9 Mar 2016, at 16:55, jpff  wrote:
>>> 
>>> I have a csd that in its original state records a mono input from the
>>> microphone, tweaks it and plays it back.  This works on my laptop and
>>> on android give or take a minor oddity.  I though I might change the
>>> output to stereo and play with panning, but I have a problem.
>>> 
>>> On the laptop it works OK as I expect.
>>> 
>>> On android tablet/phone the sound is half speed -- ie lower pitch and
>>> lower speed, unlike the laptop.
>>> 
>>> I have code
>>> ....
>>> nchnls = 2
>>> nchnls_i = 1
>>> ....
>>>  asig        in
>>>  kstart      tablewa 2, asig, 0
>>> ....
>>>  al, ar      pan2     asig, kpan
>>>              outs     al, ar
>>> 
>>> Surely that is correct?
>>> 
>>> Do i have to use a stereo input and throwaway the right?  But
>>> the systems are not the same
>>> 
>>> ==John ffitch
>>> 
>>> 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
> 
> 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-09 20:40
FromSteven Yi
SubjectRe: could this be a bug in androidCS?

Things rings a bell with me too. John, could you try using inch instead of in? I seem to remember in has some hard coded expectation of num channels.


On Wed, Mar 9, 2016, 2:08 PM Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Ah, then it's because on android input and output channels must be stereo always. I think it rings a bell.

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

> On 9 Mar 2016, at 19:05, jpff <jpff@CODEMIST.CO.UK> wrote:
>
> I set nchnls_i to  1.  No idea what is in the binary -- says 6.07 ec 2015 but that is not finished yet.  This is the system downloaded fron playstore.
>
> Tried making it all stereo and that works well.
>
> ==John
>
>> On Wed, 9 Mar 2016, Victor Lazzarini wrote:
>>
>> did you try setting nchnls_i to 1. It could be that the mono input is being split in two channels, effectively running at half sr.
>> Note that nchnls_i was not working correctly until recently, so if the lib binary is old, this will not work.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 9 Mar 2016, at 16:55, jpff <jpff@CODEMIST.CO.UK> wrote:
>>>
>>> I have a csd that in its original state records a mono input from the
>>> microphone, tweaks it and plays it back.  This works on my laptop and
>>> on android give or take a minor oddity.  I though I might change the
>>> output to stereo and play with panning, but I have a problem.
>>>
>>> On the laptop it works OK as I expect.
>>>
>>> On android tablet/phone the sound is half speed -- ie lower pitch and
>>> lower speed, unlike the laptop.
>>>
>>> I have code
>>> ....
>>> nchnls = 2
>>> nchnls_i = 1
>>> ....
>>>  asig        in
>>>  kstart      tablewa 2, asig, 0
>>> ....
>>>  al, ar      pan2     asig, kpan
>>>              outs     al, ar
>>>
>>> Surely that is correct?
>>>
>>> Do i have to use a stereo input and throwaway the right?  But
>>> the systems are not the same
>>>
>>> ==John ffitch
>>>
>>> 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
>
> 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
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-09 21:55
FromJohn ff
SubjectRe: could this be a bug in androidCS?

Perhaps this should be trapped in the code

==John

Sent from TypeApp

On 9 Mar 2016, at 19:09, Victor Lazzarini <Victor.Lazzarini@NUIM.IE> wrote:
Ah, then it's because on android input and output channels must be stereo always. I think it rings a bell.

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

On 9 Mar 2016, at 19:05, jpff <jpff@CODEMIST.CO.UK> wrote:

I set nchnls_i to 1. No idea what is in the binary -- says 6.07 ec 2015 but that is not finished yet. This is the system downloaded fron playstore.

Tried making it all stereo and that works well.

==John

On Wed, 9 Mar 2016 , Victor Lazzarini wrote:

did you try setting nchnls_i to 1. It could be that the mono input is being split in two channels, effectively running at half sr.
Note that nchnls_i was not working correctly until recently, so if the lib binary is old, this will not work.

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

On 9 Mar 2016, at 16:55, jpff <jpff@CODEMIST.CO.UK> wrote:

I have a csd that in its original state records a mono input from the
microphone, tweaks it and plays it back. This works on my laptop and
on android give or take a minor oddity. I though I might change the
output to stereo and play with panning, but I have a problem.

On the laptop it works OK as I expect.

On android tablet/phone the sound is half speed -- ie lower pitch and
lower speed, unlike the laptop.

I have code
....
nchnls = 2
nchnls_i = 1
....
asig in
kstart tablewa 2, asig, 0
....
al, ar pan2 asig, kpan
outs al, ar

Surely that is correct?

Do i have to use a stereo input and throwaway the right? But
the systems are not the same

==John ffitch

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

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