[Csnd] Csound for Android

Hi. Is there a particular way to run soundin and diskin on Csound for Android?
Thanks
Best wishes,
Marcelo

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

I don’t experience any problems, as long as I place my .csd and all the samples in the Music folder and specify the full path to that folder. The path can be specified either as “/storage/emulated/0/Music/” or “/sdcard/Music/”.

Art H.

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

Thank you, the console message is attached.
Best wishes
Marcelo

Hi Marcelo,
I think that the spaces are not allowed, try what Arthur suggested, “/storage/emulated/0/Csound/yourFileWithoutSpaces.wav” or “/sdcard/Csound/yourFileWithoutSpaces.wav”.
Also, be aware that Csound for Android could not have access to your “Csound” folder, because of Android security measures.
So if the above doesn’t work try placing your files under the “Music” folder, and try with “/storage/emulated/0/Music/yourFileWithoutSpaces.wav” or “/sdcard/Music/yourFileWithoutSpaces.wav”.

Hope this helps
Regards

Hi Marcelo. Are you using an Android device or Chromebook?

It also appears you may be using a sample on an SD card which may not work.

Try this example but make sure you first check that the file fox.wav exists on your device. It should, it is generally installed with Csound for Android.

I also attached the file to make it easier. If you download it make sure you copy the csd to the correct folder:
Music/Csound
or a subfolder:
Music/Csound/MyFiles

-odac

sr = 48000
ksmps = 32
nchnls = 1
0dbfs = 1

instr 1
aSig diskin2 “/storage/emulated/0/Music/Samples/fox.wav”, 1, 0, 1
outs aSig
endin

i1 0 8.4

@gb FWIW, spaces are ok in certain cases. For example, if you have a folder named
“Sample folder” or a file like
"fox 1.wav

; aSig diskin2 “/storage/emulated/0/Sample folder/fox 1.wav”, 1, 0, 1

Best,
Scott

diskin_ex.csd (350 Bytes)

P.S. another quick note - if one has a preferred sample directory, in Csound for Android go to Settings > Sample directory and add the path:
/sdcard/Music/Csound/Samples

Then it is easier to load a sample:

aSig diskin2 “fox.wav”, 1, 0, 1

Not sure about Chromebook but this works on all my Android devices

Hey, thank you all. Unfortunately the same problem. I’m far from sure, but in portuguese, Android’s folders structures start with Armazenamento interno, that’s the name of the first folder. No way to change that. Could it be the problem?
Thank you again.
Best wishes,
Marcelo

P.s. I don’t have Fox.wav in my system (Android mobile fone). I changed it for another wav file for Scott’s example. Didn’t work either. :frowning:

Hi again. You will need to look up the exact path to your file using some type of file explorer/manager app (see pic). So perhaps it will be something like
/Armazento interno/emulado/0/Music/samples/teste.wav

But be careful what app you use, they don’t all accurately reflect the actual path. For example, the included app on my Samsung app does not show the proper path.

I use Astro but it may not be available in Portugese.
https://play.google.com/store/apps/details?id=com.metago.astro

Generally, if you find the .wav file in the explorer/manager and select it, there should be an option to view details (or properties or info etc.)

Best,
Scott

Unfortunately the same problem. Well, thank you again.
Best wishes,
Marcelo

You can try escaping the whitespace with a backslash like this

“/Armazenamento\ interno/…”

Prof. Victor Lazzarini
Maynooth University
Ireland

I use the “Explorer” app. It includes Portuguese and 10 other languages. Here it is easy to identify paths.

Art H.

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

No, nothing, sorry. Thanks again.
Best wishes
Marcelo

Hi!

Do you have Android development tools installed on your computer? if yes, adb (found in folder platform-tools) could help:

connect your phone, then
adb shell
and

ls

I am quite sure, the system folder names are not in Portuguese.

My two cents.

Tarmo

Kontakt Marcelo Carneiro de Lima (<marcelo.arcos2@gmail.com>) kirjutas kuupäeval P, 26. november 2023 kell 19:30:

No, nothing, sorry. Thanks again.
Best wishes
Marcelo

I use the “Explorer” app. It includes Portuguese and 10 other languages. Here it is easy to identify paths.

Art H.

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


From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of ST Music <stunes6556@GMAIL.COM>
Sent: Saturday, November 25, 2023 6:26 PM
To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE>
Subject: Re: [Csnd] Csound for Android

Hi again. You will need to look up the exact path to your file using some type of file explorer/manager app (see pic). So perhaps it will be something like
/Armazento interno/emulado/0/Music/samples/teste.wav

But be careful what app you use, they don’t all accurately reflect the actual path. For example, the included app on my Samsung app does not show the proper path.

I use Astro but it may not be available in Portugese.
https://play.google.com/store/apps/details?id=com.metago.astro

Generally, if you find the .wav file in the explorer/manager and select it, there should be an option to view details (or properties or info etc.)

Best,
Scott

Hey, thank you all. Unfortunately the same problem. I’m far from sure, but in portuguese, Android’s folders structures start with Armazenamento interno, that’s the name of the first folder. No way to change that. Could it be the problem?
Thank you again.
Best wishes,
Marcelo

P.s. I don’t have Fox.wav in my system (Android mobile fone). I changed it for another wav file for Scott’s example. Didn’t work either. :frowning:

P.S. another quick note - if one has a preferred sample directory, in Csound for Android go to Settings > Sample directory and add the path:
/sdcard/Music/Csound/Samples

Then it is easier to load a sample:

aSig diskin2 “fox.wav”, 1, 0, 1

Not sure about Chromebook but this works on all my Android devices

Hi Marcelo. Are you using an Android device or Chromebook?

It also appears you may be using a sample on an SD card which may not work.

Try this example but make sure you first check that the file fox.wav exists on your device. It should, it is generally installed with Csound for Android.

I also attached the file to make it easier. If you download it make sure you copy the csd to the correct folder:
Music/Csound
or a subfolder:
Music/Csound/MyFiles

-odac

sr = 48000
ksmps = 32
nchnls = 1
0dbfs = 1

instr 1
aSig diskin2 “/storage/emulated/0/Music/Samples/fox.wav”, 1, 0, 1
outs aSig
endin

i1 0 8.4

@gb FWIW, spaces are ok in certain cases. For example, if you have a folder named
“Sample folder” or a file like
"fox 1.wav

; aSig diskin2 “/storage/emulated/0/Sample folder/fox 1.wav”, 1, 0, 1

Best,
Scott

Thank you, the console message is attached.
Best wishes
Marcelo

I don’t experience any problems, as long as I place my .csd and all the samples in the Music folder and specify the full path to that folder. The path can be specified either as “/storage/emulated/0/Music/” or “/sdcard/Music/”.

Art H.

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


From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Marcelo Carneiro de Lima <marcelo.arcos2@GMAIL.COM>
Sent: Saturday, November 25, 2023 12:39 PM
To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE>
Subject: [Csnd] Csound for Android

Hi. Is there a particular way to run soundin and diskin on Csound for Android?
Thanks
Best wishes,
Marcelo

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

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