Csound Csound-dev Csound-tekno Search About

[Csnd] Csound for Android Problem

Date2025-07-10 22:21
FromArthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] Csound for Android Problem
The simple .csd below for Android Csound runs fine on recent versions, but fails with an orchestra compile error on versions below Csound6.02 - including CSD Player and three versions of my own (@ arthunkins.com) based on Csound 6.01.

Why? (ChatGPT had several suggestions, based on dubious data, and unfortunately did not illuminate the issue.)
--------------------------------------------------
<CsoundSynthesizer>
<CsOptions>

-odac -m0d

</CsOptions>
<CsInstruments>

ksmps = 32
nchnls = 2
0dbfs  = 1

      instr 1

ktrig chnget "butt1"
      if ktrig == 1 then
      event "i", 2, 0, -1
      endif

      endin

      instr 2

a1    diskin "/storage/emulated/0/Music/fox.wav"
      outs a1, a1

      endin

</CsInstruments>
<CsScore>

i1 0 10

e

</CsScore>
</CsoundSynthesizer>

------------------------------------------------
abhunkin@uncg.edu
http://www.arthunkins.com

Date2025-07-10 22:31
Fromvlz
SubjectRe: [Csnd] Csound for Android Problem
I think diskin needs more parameters for earlier versions (they were made optional at some point). I think the minimum used to be

a1    diskin "/storage/emulated/0/Music/fox.wav”,1


> On 10 Jul 2025, at 22:21, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> wrote:
> 
> The simple .csd below for Android Csound runs fine on recent versions, but fails with an orchestra compile error on versions below Csound6.02 - including CSD Player and three versions of my own (@ arthunkins.com) based on Csound 6.01.
> 
> Why? (ChatGPT had several suggestions, based on dubious data, and unfortunately did not illuminate the issue.)
> --------------------------------------------------
> 
> 
> 
> -odac -m0d
> 
> 
> 
> 
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
> 
>       instr 1
> 
> ktrig chnget "butt1"
>       if ktrig == 1 then
>       event "i", 2, 0, -1
>       endif
> 
>       endin
> 
>       instr 2
> 
> a1    diskin "/storage/emulated/0/Music/fox.wav"
>       outs a1, a1
> 
>       endin
> 
> 
> 
> 
> i1 0 10
> 
> e
> 
> 
> 
> 
> ------------------------------------------------
> abhunkin@uncg.edu
> http://www.arthunkins.com
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports tohttps://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

Date2025-07-11 02:45
FromArthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Csound for Android Problem
Thanks, Victor. You solved my problem in short order! An additional set of (knowledgeable) eyes and ears are so helpful so often.

The manual's page for diskin has a comment at the bottom about the pitch parameter becoming optional with v6.06. I hadn't noticed that, as the main entry clearly shows it as optional. All my other .csd's have a transpose (= pitch) parameter so I hadn't run into the issue previously.

Finally, I just decided to use soundin in this instance. Again, thanks so much -

Art H.

abhunkin@uncg.edu
http://www.arthunkins.com

From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of vlz <viclazzarini@GMAIL.COM>
Sent: Thursday, July 10, 2025 5:31 PM
To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE>
Subject: Re: [Csnd] Csound for Android Problem
 
I think diskin needs more parameters for earlier versions (they were made optional at some point). I think the minimum used to be

a1    diskin "/storage/emulated/0/Music/fox.wav”,1


> On 10 Jul 2025, at 22:21, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> wrote:
>
> The simple .csd below for Android Csound runs fine on recent versions, but fails with an orchestra compile error on versions below Csound6.02 - including CSD Player and three versions of my own (@ arthunkins.com) based on Csound 6.01.
>
> Why? (ChatGPT had several suggestions, based on dubious data, and unfortunately did not illuminate the issue.)
> --------------------------------------------------
> <CsoundSynthesizer>
> <CsOptions>
>
> -odac -m0d
>
> </CsOptions>
> <CsInstruments>
>
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
>       instr 1
>
> ktrig chnget "butt1"
>       if ktrig == 1 then
>       event "i", 2, 0, -1
>       endif
>
>       endin
>
>       instr 2
>
> a1    diskin "/storage/emulated/0/Music/fox.wav"
>       outs a1, a1
>
>       endin
>
> </CsInstruments>
> <CsScore>
>
> i1 0 10
>
> e
>
> </CsScore>
> </CsoundSynthesizer>
>
> ------------------------------------------------
> abhunkin@uncg.edu
> http://www.arthunkins.com
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports tohttps://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