Csound Csound-dev Csound-tekno Search About

[Csnd] New beta release of the Csound for Android app

Date2019-05-11 01:37
FromMichael Gogins
Subject[Csnd] New beta release of the Csound for Android app
I have prepared a new beta release of the Csound for Android app here:

https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta2

Further improvements as compared with beta1 involve a fairly thorough
review and improvement of the CsoundOboe class that interfaces Csound
with the Android audio layer. The result appears to be an improvement
in performance and a significant decrease in audio glitches. Please
note, it is sometimes necessary to shut down other processes or enable
Airplane Mode to achieve optimal audio performance.

Feedback would be most appreciated!

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot 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

Date2019-05-11 23:58
FromPete Goodeve
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
AttachmentsNone  

Date2019-05-12 01:22
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
Thanks for your feedback. I have the same problem with your test file.

Oddly enough, I was testing the app with much more complex examples,
and this problem did not happen.

I believe what's happening is the Oboe stream can't be reliably ended
from the audio callback thread, which is what my app does. I will
change the code to spawn a stop call from a different thread.

Thanks! I will post a new beta very soon.

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

On Sat, May 11, 2019 at 6:58 PM Pete Goodeve  wrote:
>
> On Fri, May 10, 2019 at 08:37:08PM -0400, Michael Gogins wrote:
> > I have prepared a new beta release of the Csound for Android app here:
> >
> > https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta2
> >
> >
> > Feedback would be most appreciated!
> >
> Hi,
>
> I installed the above in my Gemini PDA, and it seems mostly to run.
> However, I hit one basic snag.  The first thing I did was to load my
> standard (very short) basic test/demo file. It plays its 5 notes, but
> then the app freezes!  'RUN' changes to 'STOP', but clicking on that
> (after playing ends) has no effect.  And the editor is frozen as well.
> The only recourse is to kill the app.  If I click 'STOP' before playing
> ends, though, it works.
>
> I tried saving  the MESSAGES screen but that failed too (and froze things).
> The last thing printed on termination is:
>
>    "resetting Csound instance"
>
> I haven't yet let any of the examples run to completion.
>
>
> Here's the file (as loaded, with all the extraneous stuff):
>
> 
>
> 
>
> =====================================
>    *** "Close Encounters" ***
> Original public-domain MIDI borrowed
> from the MIDIcsv Distribution
> =====================================
>
> 
>
> 
> # These options select audio output
> # and suppress displays
> -odac -d
> 
>
> 
>
> ; Initialize the global variables.
> sr = 44100      ; Sample Rate
> kr = 4410       ; Control Rate
> ksmps = 10      ; Samples/Buffer (sr/kr) -- optional
> nchnls = 1      ; Mono output
>
>
> ; Sine table here rather than in Score
> giSine0  ftgen 1, 0, 16384, 10, 1
>
>
> ; Instrument #1 - a basic oscillator.
> instr 1
>
>   ; convert pitch input (score param 5) to frequency
>   icps = cpspch(p5)
>
>   ; create an envelope from amplitude param 4
>   kamp linen p4, 0.01, p3, 0.05
>
>   ; run the oscillator
>   a1 oscil kamp, icps, giSine0
>   ; and send the wave out
>   out a1
>
> endin
>
> 
>
> 
> ; The notes to be played:
> ;Instr Start    Duration Amplitude  Pitch (octave.pitchclass)
>  i1    0.000    1.000    8100.00    9.07
>  i1    1.000    1.000    8100.00    9.09
>  i1    2.000    1.000    8100.00    9.05
>  i1    3.000    1.000    8100.00    8.05
>  i1    4.000    1.000    8100.00    9.00
> 
>
> 
>
>

Date2019-05-12 02:27
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
I have posted a new beta 3 for the Csound for Android app, in which
the audio output stream is stopped from a different thread than the
audio callback.

Please let me know if this helps.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

On Sat, May 11, 2019 at 8:22 PM Michael Gogins  wrote:
>
> Thanks for your feedback. I have the same problem with your test file.
>
> Oddly enough, I was testing the app with much more complex examples,
> and this problem did not happen.
>
> I believe what's happening is the Oboe stream can't be reliably ended
> from the audio callback thread, which is what my app does. I will
> change the code to spawn a stop call from a different thread.
>
> Thanks! I will post a new beta very soon.
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
> On Sat, May 11, 2019 at 6:58 PM Pete Goodeve  wrote:
> >
> > On Fri, May 10, 2019 at 08:37:08PM -0400, Michael Gogins wrote:
> > > I have prepared a new beta release of the Csound for Android app here:
> > >
> > > https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta2
> > >
> > >
> > > Feedback would be most appreciated!
> > >
> > Hi,
> >
> > I installed the above in my Gemini PDA, and it seems mostly to run.
> > However, I hit one basic snag.  The first thing I did was to load my
> > standard (very short) basic test/demo file. It plays its 5 notes, but
> > then the app freezes!  'RUN' changes to 'STOP', but clicking on that
> > (after playing ends) has no effect.  And the editor is frozen as well.
> > The only recourse is to kill the app.  If I click 'STOP' before playing
> > ends, though, it works.
> >
> > I tried saving  the MESSAGES screen but that failed too (and froze things).
> > The last thing printed on termination is:
> >
> >    "resetting Csound instance"
> >
> > I haven't yet let any of the examples run to completion.
> >
> >
> > Here's the file (as loaded, with all the extraneous stuff):
> >
> > 
> >
> > 
> >
> > =====================================
> >    *** "Close Encounters" ***
> > Original public-domain MIDI borrowed
> > from the MIDIcsv Distribution
> > =====================================
> >
> > 
> >
> > 
> > # These options select audio output
> > # and suppress displays
> > -odac -d
> > 
> >
> > 
> >
> > ; Initialize the global variables.
> > sr = 44100      ; Sample Rate
> > kr = 4410       ; Control Rate
> > ksmps = 10      ; Samples/Buffer (sr/kr) -- optional
> > nchnls = 1      ; Mono output
> >
> >
> > ; Sine table here rather than in Score
> > giSine0  ftgen 1, 0, 16384, 10, 1
> >
> >
> > ; Instrument #1 - a basic oscillator.
> > instr 1
> >
> >   ; convert pitch input (score param 5) to frequency
> >   icps = cpspch(p5)
> >
> >   ; create an envelope from amplitude param 4
> >   kamp linen p4, 0.01, p3, 0.05
> >
> >   ; run the oscillator
> >   a1 oscil kamp, icps, giSine0
> >   ; and send the wave out
> >   out a1
> >
> > endin
> >
> > 
> >
> > 
> > ; The notes to be played:
> > ;Instr Start    Duration Amplitude  Pitch (octave.pitchclass)
> >  i1    0.000    1.000    8100.00    9.07
> >  i1    1.000    1.000    8100.00    9.09
> >  i1    2.000    1.000    8100.00    9.05
> >  i1    3.000    1.000    8100.00    8.05
> >  i1    4.000    1.000    8100.00    9.00
> > 
> >
> > 
> >
> >

Date2019-05-12 02:45
Frompete.goodeve@COMPUTER.ORG
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
AttachmentsNone  

Date2019-05-12 02:53
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
I deleted it and replaced it with the latest build.

On Sat, May 11, 2019, 21:45 <pete.goodeve@computer.org> wrote:
On Sat, May 11, 2019 at 09:27:13PM -0400, Michael Gogins wrote:
> I have posted a new beta 3 for the Csound for Android app, in which
> the audio output stream is stopped from a different thread than the
> audio callback.
>
> Please let me know if this helps.
>
Glad it was reproducible.

Is there a new apk, though?  I grabbed the previous version from your csound-extended/releases
page on github, but now I only see the sources there.  I have no way of building myself.

Thanks,

        -- Pete --

Date2019-05-12 03:50
FromPete Goodeve
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
AttachmentsNone  

Date2019-05-12 12:40
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
beta3, not beta2.

On Sat, May 11, 2019, 22:50 Pete Goodeve <pete.goodeve@computer.org> wrote:
On Sat, May 11, 2019 at 09:53:53PM -0400, Michael Gogins wrote:
> I deleted it and replaced it with the latest build.
>
Am I looking in the right place?  I previously found it at
 https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta2
where there were 4 "Assets" including the apk.  Now there are only two
-- both source archives.

        -- Pete --

Date2019-05-12 21:56
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
The beta3 of csound-extended release, with improvements to audio
performance and stability for the Csound for Android app, is available
at

https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta3

The Assets thingie will take you to downloadable files.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

On Sun, May 12, 2019 at 7:40 AM Michael Gogins  wrote:
>
> beta3, not beta2.
>
> On Sat, May 11, 2019, 22:50 Pete Goodeve  wrote:
>>
>> On Sat, May 11, 2019 at 09:53:53PM -0400, Michael Gogins wrote:
>> > I deleted it and replaced it with the latest build.
>> >
>> Am I looking in the right place?  I previously found it at
>>  https://github.com/gogins/csound-extended/releases/tag/v1.3.0beta2
>> where there were 4 "Assets" including the apk.  Now there are only two
>> -- both source archives.
>>

Date2019-05-12 23:03
FromPete Goodeve
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
AttachmentsNone  

Date2019-05-12 23:34
FromMichael Gogins
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
Thanks for the update!

Yes, Android changed security and permissions in a way that makes the app harder to use. I am continuing to work on this. 

Regards, 
Mike

On Sun, May 12, 2019, 18:03 Pete Goodeve <pete.goodeve@computer.org> wrote:
On Sun, May 12, 2019 at 07:40:06AM -0400, Michael Gogins wrote:
> beta3, not beta2.
>
Ahh, thanks.  I missed the number change.

Yes, my file plays back properly now.  (Though I notice you still
have to click STOP -- it doesn't return to RUN when playing ends.)

I'm afraid I'm having a lot of trouble with file saving, and navigation
in general.  Not sure if it's Csound's problem or just my lack of comfort
with Android's oddities.

I can only seem to save things in the 'Download' directory where
I initially installed the apk from.  Anywhere else (that I normally have
permission to write to) and I get "failed to save file". And as there
seems to be no way to see the full path, I had a lot of trouble figuring
out where I was!  Also just clicking 'SAVE' on a modified text has no effect.
The file in the directory doesn't get changed.  (I went into my usual Jota
editor and changed it without trouble.)

Thanks,

        -- Pete --

Date2019-05-12 23:50
FromPete Goodeve
SubjectRe: [Csnd-dev] New beta release of the Csound for Android app
AttachmentsNone