How to read external files on android with csound?
Date | 2016-05-12 11:34 |
From | Anton Kholomiov |
Subject | How to read external files on android with csound? |
I'd like to read soundfont or wave-file from my csound code on Android.
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 place both resources (csd-file and wav or sf2 file) in the raw folder. But the problem is that I can not reference the sample from the csound code since the android changes the file name. Is there some workaround for this? I can read/parse the path in the Java code and send it with message if I'm going to read the audio samples. But with sf2 I have to declare the path in the init instr (at the header). So is it possible to get the filename for a soundfont? Anton |
Date | 2016-05-12 11:45 |
From | Anton Kholomiov |
Subject | Re: How to read external files on android with csound? |
Maybe it's possible to preprocess the file. To parse the external source Uri the substitute the string in the right place after reading the csound file. But maybe there is a better solution.. 2016-05-12 13:34 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-05-12 14:59 |
From | John |
Subject | Re: How to read external files on android with csound? |
I read wav files on android without problems. In what way is the name changed? On 12 May 2016, at 11:35, Anton Kholomiov <anton.kholomiov@GMAIL.COM> wrote:
|
Date | 2016-05-12 15:14 |
From | Anton Kholomiov |
Subject | Re: How to read external files on android with csound? |
I'm trying to load soundfont file with sfload. But it says sfload: cannot open SoundFont file "synth1.sf2" (error No such file or directory) I place the synth1.sf2 with csd in the android directory res/raw 2016-05-12 16:59 GMT+03:00 John <jpff@codemist.co.uk>:
|
Date | 2016-05-13 10:26 |
From | Jacques Leplat |
Subject | Re: How to read external files on android with csound? |
You’ll have to extract the soundfont resource file as a stream and write it out as a file, byte by byte. Then use that path in your csd. It was mentioned a couple of years ago in this forum. All the best, Jacques
|