Csound Csound-dev Csound-tekno Search About

[Csnd] CSound Android questions

Date2014-01-14 15:44
FromJacques Leplat
Subject[Csnd] CSound Android questions
Hello,

I have been grappling with the latest Android release (Csound6.apk and Csound-android-6.02.0.zip).

I think the apk is different to the CSD Player project in the zip. 

The alwayson opcode is not recognised in the apk file, but is recognised in the zip release of the Android Csound SDK.

I am also having problems using alwayson on Android.  On the mac release  of CSound, the csd (see below) produces sound, but on Android it is silent. If I uncomment the line “i2 0 1”, sound is produced. So it looks to me like alwayson behaves differently on Android and Mac. 

In terms of correct CSound syntax, do I not know if an alwayson instrument has to have a score event sent to it for the duration of the score. Does it?

All the best,

Jacques



-odac


sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

;-- Definitions for instrument [1] id [1009] outInstr
alwayson "outInstr"
gaoutL init 0
gaoutR init 0
gkPan init 50
gkVolume init 80
gklevelL init 0
gklevelR init 0

;-- Definitions for instrument [1] id [1007] pulse
gkPan1 init 50
gkVolume1 init 80


;-- Instrument [1] id [1007] pulse
instr 1
ifreq = cpspch(p5)
iamp = p4
idur = p3
iwave = 2001
idetune = 0.3
kenv linseg 0, .01, iamp, idur-.1, iamp*.8, .05, 0
aoutL oscili kenv, ifreq - idetune, iwave
aoutR oscili kenv, ifreq + idetune, iwave
kfactorL = 1
kfactorR = 1
gaoutL = gaoutL + aoutL * kfactorL
gaoutR = gaoutR + aoutR * kfactorR

endin

;-- Output Instrument
instr outInstr
kfactorL = 0.5
kfactorR = 0.5
gaoutL = gaoutL * kfactorL
gaoutR = gaoutR * kfactorR
outs gaoutL,gaoutR
gaoutL = 0
gaoutR = 0

endin



;-- Functions for instrument [1] id [1007] pulse
f 2001 0 513 10 .8 .9 .95 .96 1 .91 .8 .75 .6 .42 .5 .4 .33 .28 .2 .15

;inst start dur amplitude noteNumber; midiNote
;i2 0 1
i1 0 0.152 0.62 9.04 ;76 v:80
i1 0 0.505 0.62 7.00 ;48 v:80
i1 0 0.505 0.62 7.04 ;52 v:80
i1 0.145 0.128 0.55 9.00 ;72 v:70
i1 0.267 0.126 0.55 9.07 ;79 v:70
i1 0.386 0.126 0.55 9.04 ;76 v:70
i1 0.505 0.129 0.55 10.00 ;84 v:70
i1 0.627 0.129 0.55 9.07 ;79 v:70
e 1







Date2014-01-14 16:13
FromTarmo Johannes
SubjectRe: [Csnd] CSound Android questions
Hi,

as I found out working with some google crome native client csound examples,

alwayson is built as a plugin. Can easily be that it is bundled to some 
csound-android version and to some not ( cs-android does not include most of 
the "normal" plugins, I guess).

A safe workaround could be to substitute it with

schedule "outInstr",0,-1

best!
tarmo


On Tuesday 14 January 2014 15:44:16 Jacques Leplat wrote:
> Hello,
> 
> I have been grappling with the latest Android release (Csound6.apk and
> Csound-android-6.02.0.zip).
> 
> I think the apk is different to the CSD Player project in the zip.
> 
> The alwayson opcode is not recognised in the apk file, but is recognised in
> the zip release of the Android Csound SDK.
> 
> I am also having problems using alwayson on Android.  On the mac release  of
> CSound, the csd (see below) produces sound, but on Android it is silent. If
> I uncomment the line “i2 0 1”, sound is produced. So it looks to me like
> alwayson behaves differently on Android and Mac.
> 
> In terms of correct CSound syntax, do I not know if an alwayson instrument
> has to have a score event sent to it for the duration of the score. Does
> it?
> 
> All the best,
> 
> Jacques
> 
> 
> 
> -odac
> 
> 
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs = 1
> 
> ;-- Definitions for instrument [1] id [1009] outInstr
> alwayson "outInstr"
> gaoutL init 0
> gaoutR init 0
> gkPan init 50
> gkVolume init 80
> gklevelL init 0
> gklevelR init 0
> 
> ;-- Definitions for instrument [1] id [1007] pulse
> gkPan1 init 50
> gkVolume1 init 80
> 
> 
> ;-- Instrument [1] id [1007] pulse
> instr 1
> ifreq = cpspch(p5)
> iamp = p4
> idur = p3
> iwave = 2001
> idetune = 0.3
> kenv linseg 0, .01, iamp, idur-.1, iamp*.8, .05, 0
> aoutL oscili kenv, ifreq - idetune, iwave
> aoutR oscili kenv, ifreq + idetune, iwave
> kfactorL = 1
> kfactorR = 1
> gaoutL = gaoutL + aoutL * kfactorL
> gaoutR = gaoutR + aoutR * kfactorR
> 
> endin
> 
> ;-- Output Instrument
> instr outInstr
> kfactorL = 0.5
> kfactorR = 0.5
> gaoutL = gaoutL * kfactorL
> gaoutR = gaoutR * kfactorR
> outs gaoutL,gaoutR
> gaoutL = 0
> gaoutR = 0
> 
> endin
> 
> 
> 
> ;-- Functions for instrument [1] id [1007] pulse
> f 2001 0 513 10 .8 .9 .95 .96 1 .91 .8 .75 .6 .42 .5 .4 .33 .28 .2 .15
> 
> ;inst start dur amplitude noteNumber; midiNote
> ;i2 0 1
> i1 0 0.152 0.62 9.04 ;76 v:80
> i1 0 0.505 0.62 7.00 ;48 v:80
> i1 0 0.505 0.62 7.04 ;52 v:80
> i1 0.145 0.128 0.55 9.00 ;72 v:70
> i1 0.267 0.126 0.55 9.07 ;79 v:70
> i1 0.386 0.126 0.55 9.04 ;76 v:70
> i1 0.505 0.129 0.55 10.00 ;84 v:70
> i1 0.627 0.129 0.55 9.07 ;79 v:70
> e 1
> 
> 
> 
> 
> 
> 
> 
> 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-14 16:20
FromJacques Leplat
SubjectRe: [Csnd] CSound Android questions
Thanks, I'll try that.

Jacques Leplat

http://www.j3ltd.com
http://www.drumbox.co.uk

> On 14 Jan 2014, at 16:13, Tarmo Johannes  wrote:
> 
> Hi,
> 
> as I found out working with some google crome native client csound examples,
> 
> alwayson is built as a plugin. Can easily be that it is bundled to some 
> csound-android version and to some not ( cs-android does not include most of 
> the "normal" plugins, I guess).
> 
> A safe workaround could be to substitute it with
> 
> schedule "outInstr",0,-1
> 
> best!
> tarmo
> 
> 
>> On Tuesday 14 January 2014 15:44:16 Jacques Leplat wrote:
>> Hello,
>> 
>> I have been grappling with the latest Android release (Csound6.apk and
>> Csound-android-6.02.0.zip).
>> 
>> I think the apk is different to the CSD Player project in the zip.
>> 
>> The alwayson opcode is not recognised in the apk file, but is recognised in
>> the zip release of the Android Csound SDK.
>> 
>> I am also having problems using alwayson on Android.  On the mac release  of
>> CSound, the csd (see below) produces sound, but on Android it is silent. If
>> I uncomment the line “i2 0 1”, sound is produced. So it looks to me like
>> alwayson behaves differently on Android and Mac.
>> 
>> In terms of correct CSound syntax, do I not know if an alwayson instrument
>> has to have a score event sent to it for the duration of the score. Does
>> it?
>> 
>> All the best,
>> 
>> Jacques
>> 
>> 
>> 
>> -odac
>> 
>> 
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs = 1
>> 
>> ;-- Definitions for instrument [1] id [1009] outInstr
>> alwayson "outInstr"
>> gaoutL init 0
>> gaoutR init 0
>> gkPan init 50
>> gkVolume init 80
>> gklevelL init 0
>> gklevelR init 0
>> 
>> ;-- Definitions for instrument [1] id [1007] pulse
>> gkPan1 init 50
>> gkVolume1 init 80
>> 
>> 
>> ;-- Instrument [1] id [1007] pulse
>> instr 1
>> ifreq = cpspch(p5)
>> iamp = p4
>> idur = p3
>> iwave = 2001
>> idetune = 0.3
>> kenv linseg 0, .01, iamp, idur-.1, iamp*.8, .05, 0
>> aoutL oscili kenv, ifreq - idetune, iwave
>> aoutR oscili kenv, ifreq + idetune, iwave
>> kfactorL = 1
>> kfactorR = 1
>> gaoutL = gaoutL + aoutL * kfactorL
>> gaoutR = gaoutR + aoutR * kfactorR
>> 
>> endin
>> 
>> ;-- Output Instrument
>> instr outInstr
>> kfactorL = 0.5
>> kfactorR = 0.5
>> gaoutL = gaoutL * kfactorL
>> gaoutR = gaoutR * kfactorR
>> outs gaoutL,gaoutR
>> gaoutL = 0
>> gaoutR = 0
>> 
>> endin
>> 
>> 
>> 
>> ;-- Functions for instrument [1] id [1007] pulse
>> f 2001 0 513 10 .8 .9 .95 .96 1 .91 .8 .75 .6 .42 .5 .4 .33 .28 .2 .15
>> 
>> ;inst start dur amplitude noteNumber; midiNote
>> ;i2 0 1
>> i1 0 0.152 0.62 9.04 ;76 v:80
>> i1 0 0.505 0.62 7.00 ;48 v:80
>> i1 0 0.505 0.62 7.04 ;52 v:80
>> i1 0.145 0.128 0.55 9.00 ;72 v:70
>> i1 0.267 0.126 0.55 9.07 ;79 v:70
>> i1 0.386 0.126 0.55 9.04 ;76 v:70
>> i1 0.505 0.129 0.55 10.00 ;84 v:70
>> i1 0.627 0.129 0.55 9.07 ;79 v:70
>> e 1
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 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"
> 
> 


Date2014-01-14 18:00
FromMichael Gogins
SubjectRe: [Csnd] CSound Android questions
I believe there has been a break in the alwayson opcode in the current release of Csound. This applies to all versions I have tested: command line Csound, CsoundVST, and CsoundQt.

There is no need for a score statement to be sent to an alwayson instrument. The pfields the follow the instrument name of the alwayson opcode represent pfields 4 and up of a score statement.
 
I have some urgent work in the next few days, but then I will try to fix this bug if nobody else has fixed it in the meantime.

Thanks for the information,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Jan 14, 2014 at 10:44 AM, Jacques Leplat <jleplat@j3ltd.com> wrote:
Hello,

I have been grappling with the latest Android release (Csound6.apk and Csound-android-6.02.0.zip).

I think the apk is different to the CSD Player project in the zip.

The alwayson opcode is not recognised in the apk file, but is recognised in the zip release of the Android Csound SDK.

I am also having problems using alwayson on Android.  On the mac release  of CSound, the csd (see below) produces sound, but on Android it is silent. If I uncomment the line “i2 0 1”, sound is produced. So it looks to me like alwayson behaves differently on Android and Mac.

In terms of correct CSound syntax, do I not know if an alwayson instrument has to have a score event sent to it for the duration of the score. Does it?

All the best,

Jacques

<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

;-- Definitions for instrument [1] id [1009] outInstr
alwayson "outInstr"
gaoutL init 0
gaoutR init 0
gkPan init 50
gkVolume init 80
gklevelL init 0
gklevelR init 0

;-- Definitions for instrument [1] id [1007] pulse
gkPan1 init 50
gkVolume1 init 80


;-- Instrument [1] id [1007] pulse
instr 1
ifreq = cpspch(p5)
iamp = p4
idur = p3
iwave = 2001
idetune = 0.3
kenv linseg 0, .01, iamp, idur-.1, iamp*.8, .05, 0
aoutL oscili kenv, ifreq - idetune, iwave
aoutR oscili kenv, ifreq + idetune, iwave
kfactorL = 1
kfactorR = 1
gaoutL = gaoutL + aoutL * kfactorL
gaoutR = gaoutR + aoutR * kfactorR

endin

;-- Output Instrument
instr outInstr
kfactorL = 0.5
kfactorR = 0.5
gaoutL = gaoutL * kfactorL
gaoutR = gaoutR * kfactorR
outs gaoutL,gaoutR
gaoutL = 0
gaoutR = 0

endin
</CsInstruments>
<CsScore>

;-- Functions for instrument [1] id [1007] pulse
f 2001 0 513 10 .8 .9 .95 .96 1 .91 .8 .75 .6 .42 .5 .4 .33 .28 .2 .15

;inst start dur amplitude noteNumber; midiNote
;i2 0 1
i1 0 0.152 0.62 9.04 ;76 v:80
i1 0 0.505 0.62 7.00 ;48 v:80
i1 0 0.505 0.62 7.04 ;52 v:80
i1 0.145 0.128 0.55 9.00 ;72 v:70
i1 0.267 0.126 0.55 9.07 ;79 v:70
i1 0.386 0.126 0.55 9.04 ;76 v:70
i1 0.505 0.129 0.55 10.00 ;84 v:70
i1 0.627 0.129 0.55 9.07 ;79 v:70
e 1
</CsScore>
</CsoundSynthesizer>





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-14 18:02
FromMichael Gogins
SubjectRe: [Csnd] CSound Android questions
My .apk bundles a bunch of examples including your chime pad. I think the person who created the current .apk did not do this.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Jan 14, 2014 at 1:00 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
I believe there has been a break in the alwayson opcode in the current release of Csound. This applies to all versions I have tested: command line Csound, CsoundVST, and CsoundQt.

There is no need for a score statement to be sent to an alwayson instrument. The pfields the follow the instrument name of the alwayson opcode represent pfields 4 and up of a score statement.
 
I have some urgent work in the next few days, but then I will try to fix this bug if nobody else has fixed it in the meantime.

Thanks for the information,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Jan 14, 2014 at 10:44 AM, Jacques Leplat <jleplat@j3ltd.com> wrote:
Hello,

I have been grappling with the latest Android release (Csound6.apk and Csound-android-6.02.0.zip).

I think the apk is different to the CSD Player project in the zip.

The alwayson opcode is not recognised in the apk file, but is recognised in the zip release of the Android Csound SDK.

I am also having problems using alwayson on Android.  On the mac release  of CSound, the csd (see below) produces sound, but on Android it is silent. If I uncomment the line “i2 0 1”, sound is produced. So it looks to me like alwayson behaves differently on Android and Mac.

In terms of correct CSound syntax, do I not know if an alwayson instrument has to have a score event sent to it for the duration of the score. Does it?

All the best,

Jacques

<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

;-- Definitions for instrument [1] id [1009] outInstr
alwayson "outInstr"
gaoutL init 0
gaoutR init 0
gkPan init 50
gkVolume init 80
gklevelL init 0
gklevelR init 0

;-- Definitions for instrument [1] id [1007] pulse
gkPan1 init 50
gkVolume1 init 80


;-- Instrument [1] id [1007] pulse
instr 1
ifreq = cpspch(p5)
iamp = p4
idur = p3
iwave = 2001
idetune = 0.3
kenv linseg 0, .01, iamp, idur-.1, iamp*.8, .05, 0
aoutL oscili kenv, ifreq - idetune, iwave
aoutR oscili kenv, ifreq + idetune, iwave
kfactorL = 1
kfactorR = 1
gaoutL = gaoutL + aoutL * kfactorL
gaoutR = gaoutR + aoutR * kfactorR

endin

;-- Output Instrument
instr outInstr
kfactorL = 0.5
kfactorR = 0.5
gaoutL = gaoutL * kfactorL
gaoutR = gaoutR * kfactorR
outs gaoutL,gaoutR
gaoutL = 0
gaoutR = 0

endin
</CsInstruments>
<CsScore>

;-- Functions for instrument [1] id [1007] pulse
f 2001 0 513 10 .8 .9 .95 .96 1 .91 .8 .75 .6 .42 .5 .4 .33 .28 .2 .15

;inst start dur amplitude noteNumber; midiNote
;i2 0 1
i1 0 0.152 0.62 9.04 ;76 v:80
i1 0 0.505 0.62 7.00 ;48 v:80
i1 0 0.505 0.62 7.04 ;52 v:80
i1 0.145 0.128 0.55 9.00 ;72 v:70
i1 0.267 0.126 0.55 9.07 ;79 v:70
i1 0.386 0.126 0.55 9.04 ;76 v:70
i1 0.505 0.129 0.55 10.00 ;84 v:70
i1 0.627 0.129 0.55 9.07 ;79 v:70
e 1
</CsScore>
</CsoundSynthesizer>





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"