Csound Csound-dev Csound-tekno Search About

[Csnd] Retrieve table contents in an Android App

Date2014-01-23 23:01
Fromhcenteno
Subject[Csnd] Retrieve table contents in an Android App
Hello,

I remember reading somewhere that using the API it's possible to read the
contents of Csound tables but I was wondering if this can be achieved from
an Android app as part of the Java API. I'm thinking of possibly using
Csound to analyze an audio file using the PVS opcodes, store the Freq/Amp
information in a table using pvsftw and retrieve that from the Android app
running the Csound instance. 

What I'm trying to do, as part of an app I'm working on, is to use Csound to
draw a spectrum visualization of an audio file. I could use a Java FFT
library for doing this in the app itself but I was wondering if I could
achieve the same using Csound instead.

Thanks!

Hector



--
View this message in context: http://csound.1045644.n5.nabble.com/Retrieve-table-contents-in-an-Android-App-tp5731891.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-23 23:42
FromRory Walsh
SubjectRe: [Csnd] Retrieve table contents in an Android App
Yes it's possible. You can see how it's done in Csoundo here:
https://github.com/rorywalsh/Csoundo/blob/master/csoundo/src/csoundo/Csoundo.java
It's pretty basic, I think Steve has developed some nicer ways of doing it.

On 23 January 2014 23:01, hcenteno  wrote:
> Hello,
>
> I remember reading somewhere that using the API it's possible to read the
> contents of Csound tables but I was wondering if this can be achieved from
> an Android app as part of the Java API. I'm thinking of possibly using
> Csound to analyze an audio file using the PVS opcodes, store the Freq/Amp
> information in a table using pvsftw and retrieve that from the Android app
> running the Csound instance.
>
> What I'm trying to do, as part of an app I'm working on, is to use Csound to
> draw a spectrum visualization of an audio file. I could use a Java FFT
> library for doing this in the app itself but I was wondering if I could
> achieve the same using Csound instead.
>
> Thanks!
>
> Hector
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Retrieve-table-contents-in-an-Android-App-tp5731891.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2014-01-24 14:49
FromSteven Yi
SubjectRe: [Csnd] Retrieve table contents in an Android App
I don't think I've really looked into this much. I'd probably use
TableGet, TableSet, and TableLength methods on the Csound object,
pretty much as Rory has done. I just saw that there is a TableCopyOut
function that looks like it might write values into a double[].  If
so, I'd assume that to be faster to do the single call to get the
values into the array, rather than doing many JNI calls for each value
of the table.

On Thu, Jan 23, 2014 at 11:42 PM, Rory Walsh  wrote:
> Yes it's possible. You can see how it's done in Csoundo here:
> https://github.com/rorywalsh/Csoundo/blob/master/csoundo/src/csoundo/Csoundo.java
> It's pretty basic, I think Steve has developed some nicer ways of doing it.
>
> On 23 January 2014 23:01, hcenteno  wrote:
>> Hello,
>>
>> I remember reading somewhere that using the API it's possible to read the
>> contents of Csound tables but I was wondering if this can be achieved from
>> an Android app as part of the Java API. I'm thinking of possibly using
>> Csound to analyze an audio file using the PVS opcodes, store the Freq/Amp
>> information in a table using pvsftw and retrieve that from the Android app
>> running the Csound instance.
>>
>> What I'm trying to do, as part of an app I'm working on, is to use Csound to
>> draw a spectrum visualization of an audio file. I could use a Java FFT
>> library for doing this in the app itself but I was wondering if I could
>> achieve the same using Csound instead.
>>
>> Thanks!
>>
>> Hector
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Retrieve-table-contents-in-an-Android-App-tp5731891.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to the Sourceforge bug trackers
>> csound6:
>>             https://sourceforge.net/p/csound/tickets/
>> csound5:
>>             https://sourceforge.net/p/csound/bugs/
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>