Csound Csound-dev Csound-tekno Search About

[Cs-dev] Android - different sound results and 6.06 update

Date2015-09-15 13:14
Fromdobislaw
Subject[Cs-dev] Android - different sound results and 6.06 update
Hello,
after unsuccessful attempt to get Android Studio work with csound 6.05, I am
working in eclipse IDE.
I have noticed a difference in a sound being played from two applications on
my Nexus 7:
1) the CSDPlayer (Csound6)
2) my custom app.

The case is that my application generates a 'distorted' metronome sound
while the CSDPlayer plays it smooth. 
The .csd file used for both apps is the same. A simple metronome:


-odac -d -m3 -b1024 -B1024


sr = 44100
kr  = 4410
0dbfs = 1
nchnls = 2

instr 1
; variables passed from the java code:
ksec chnget "sec"
kmin chnget "min"
khour chnget "hour"
ktempo chnget "tempo"

gisine    ftgen    0,0,4096,10,1
;kmetro    metro    ktempo/30 OFFLINE:
kmetro    metro    2
schedkwhen    kmetro,0,0,2,0,0.03
endin

instr    2
acps    transeg    2000,p3,-15,200
aamp    transeg    0.5,p3,-6,0
asig    poscil    aamp,acps,gisine
outs    asig,asig
endin 



i 1 0 200

 

It is not the case of SW and HW buffers legth.
I am using BaseCsoundActivity class as a backbone in my app.
My csound initialization:
String csd = getResourceFileAsString(R.raw.score);
File f = createTempFile(csd);
csoundObj.startCsound(f);

In my manifest file I use
" "

How should I configure my app to make it play the sound properly?
And there goes my another question - would you post a documentation of java
functions operating on csound object?
I have not found any sufficient documentation on that.

Regards,
Michał Dobrzański






--
View this message in context: http://csound.1045644.n5.nabble.com/Android-different-sound-results-and-6-06-update-tp5743646.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.

Date2015-09-15 17:02
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android - different sound results and 6.06 update
Buffer sizes: try -b 256 -B 1024. What you describe sounds like dropouts.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 15 Sep 2015, at 13:14, dobislaw  wrote:
> 
> Hello,
> after unsuccessful attempt to get Android Studio work with csound 6.05, I am
> working in eclipse IDE.
> I have noticed a difference in a sound being played from two applications on
> my Nexus 7:
> 1) the CSDPlayer (Csound6)
> 2) my custom app.
> 
> The case is that my application generates a 'distorted' metronome sound
> while the CSDPlayer plays it smooth. 
> The .csd file used for both apps is the same. A simple metronome:
> 
> 
> -odac -d -m3 -b1024 -B1024
> 
> 
> sr = 44100
> kr  = 4410
> 0dbfs = 1
> nchnls = 2
> 
> instr 1
> ; variables passed from the java code:
> ksec chnget "sec"
> kmin chnget "min"
> khour chnget "hour"
> ktempo chnget "tempo"
> 
> gisine    ftgen    0,0,4096,10,1
> ;kmetro    metro    ktempo/30 OFFLINE:
> kmetro    metro    2
> schedkwhen    kmetro,0,0,2,0,0.03
> endin
> 
> instr    2
> acps    transeg    2000,p3,-15,200
> aamp    transeg    0.5,p3,-6,0
> asig    poscil    aamp,acps,gisine
> outs    asig,asig
> endin 
> 
> 
> 
> i 1 0 200
> 
>  
> 
> It is not the case of SW and HW buffers legth.
> I am using BaseCsoundActivity class as a backbone in my app.
> My csound initialization:
> String csd = getResourceFileAsString(R.raw.score);
> File f = createTempFile(csd);
> csoundObj.startCsound(f);
> 
> In my manifest file I use
> " android:required="false"/> "
> 
> How should I configure my app to make it play the sound properly?
> And there goes my another question - would you post a documentation of java
> functions operating on csound object?
> I have not found any sufficient documentation on that.
> 
> Regards,
> Michał Dobrzański
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Android-different-sound-results-and-6-06-update-tp5743646.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csou

Date2015-09-15 17:38
FromSteven Yi
SubjectRe: [Cs-dev] Android - different sound results and 6.06 update
As a sidenote, I've been research Csound with Android Studio yesterday
and today.  I've just gotten CsoundAndroid to build as a library
module project and generate an AAR file.  I'm experimenting now to see
about making sure that works from the Examples project.

I still have to investigate a number of things, but at least it's
moving forward.  I hope to have something to test with in the next
couple of days.

On Tue, Sep 15, 2015 at 8:14 AM, dobislaw  wrote:
> Hello,
> after unsuccessful attempt to get Android Studio work with csound 6.05, I am
> working in eclipse IDE.
> I have noticed a difference in a sound being played from two applications on
> my Nexus 7:
> 1) the CSDPlayer (Csound6)
> 2) my custom app.
>
> The case is that my application generates a 'distorted' metronome sound
> while the CSDPlayer plays it smooth.
> The .csd file used for both apps is the same. A simple metronome:
> 
> 
> -odac -d -m3 -b1024 -B1024
> 
> 
> sr = 44100
> kr  = 4410
> 0dbfs = 1
> nchnls = 2
>
> instr 1
> ; variables passed from the java code:
> ksec chnget "sec"
> kmin chnget "min"
> khour chnget "hour"
> ktempo chnget "tempo"
>
> gisine    ftgen    0,0,4096,10,1
> ;kmetro    metro    ktempo/30 OFFLINE:
> kmetro    metro    2
> schedkwhen    kmetro,0,0,2,0,0.03
> endin
>
> instr    2
> acps    transeg    2000,p3,-15,200
> aamp    transeg    0.5,p3,-6,0
> asig    poscil    aamp,acps,gisine
> outs    asig,asig
> endin
>
> 
> 
> i 1 0 200
> 
> 
>
> It is not the case of SW and HW buffers legth.
> I am using BaseCsoundActivity class as a backbone in my app.
> My csound initialization:
> String csd = getResourceFileAsString(R.raw.score);
> File f = createTempFile(csd);
> csoundObj.startCsound(f);
>
> In my manifest file I use
> " android:required="false"/> "
>
> How should I configure my app to make it play the sound properly?
> And there goes my another question - would you post a documentation of java
> functions operating on csound object?
> I have not found any sufficient documentation on that.
>
> Regards,
> Michał Dobrzański
>
>
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Android-different-sound-results-and-6-06-update-tp5743646.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/c

Date2015-09-16 14:12
Fromdobislaw
SubjectRe: [Cs-dev] Android - different sound results and 6.06 update
Unfortunately, it did not help. I guess I should configure csound object in
my app somehow, but I have no clue where and what should I check.

Michał



--
View this message in context: http://csound.1045644.n5.nabble.com/Android-different-sound-results-and-6-06-update-tp5743646p5743672.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/li