Csound Csound-dev Csound-tekno Search About

Re: [Csnd] CSound6 Fluidsynth opcode

Date2013-08-08 09:54
FromJacques Leplat
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hello Steven,

I found that playing a CSD works first time. The second run crashes the app. This happens in CSD player as well as my app.

All the best,

Jacques

Steven Yi  wrote:

>Hi Jacques,
>
>I'm following up with older emails, did this issue with fluidsynth and
>Android get resolved?  I'm curious as I got a crash with CS5 using the
>API from Java yesterday that pointed to fluidsynth (intermittent, and
>had to do with multiple API renders at the same time, haven't looked
>into it).
>
>Thanks!
>steven
>
>On Thu, Jul 25, 2013 at 5:42 PM, Jacques Leplat  wrote:
>> Thanks Mike,
>>
>> Your changes certainly have a few interesting tweaks I did not know about.
>>
>> The first run in CSound6 CSD Player works fine (LG Nexus 4, Android 4.2.2).
>> I wait for the label on the button to turn from stop to start, then try to
>> play it again, at this point csd player crashes out.
>>
>> I tried the csd on a mac running CSound 5.19, no problems there.
>>
>> All the best,
>>
>> Jacques
>>
>>
>> On 24 Jul 2013, at 18:15, Michael Gogins  wrote:
>>
>> I modified your example so it works on my Samsung Galaxy s4.
>>
>> Thanks for testing this, you saved me some work.
>>
>> Best,
>> Mike
>>
>> 
>> 
>> -odac -d -m3
>> 
>> 
>> sr = 44100
>> ksmps = 100
>> nchnls = 2
>> 0dbfs = 1
>>
>> alwayson "fluidoutput", 7
>>
>> ;-- Definition for instrument [8] Piano 1, fluidEngine, Sound Font
>> synthesizer
>> giEngine fluidEngine
>> giSFnum fluidLoad "/mnt/extSdCard/sf_GMbank.sf2", giEngine, 1
>> fluidProgramSelect giEngine, 1, giSFnum, 0, 0
>>
>> ;-- Instrument [8] Piano 1, fluidEngine, Sound Font synthesizer
>> instr 8
>> print p1, p2, p3, p4
>> fluidNote giEngine, 1, p4, p5
>> endin
>>
>> ;-- Instrument [1099] SF Capture
>> instr fluidoutput
>> asigL, asigR fluidOut giEngine
>> asigL = asigL * p4
>> asigR = asigR * p4
>> outs asigL, asigR
>>
>> endin
>> 
>> 
>> ;inst start dur amplitude noteNumber; midiNote
>> i8 0.321 0.479 72 70
>> i8 0.321 0.239 48 70
>> i8 0.561 0.239 43 40
>> i8 0.801 0.239 36 40
>> s 5
>> e 5
>>
>> 
>> 
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot comHello,
>>
>>
>
>
>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"
>
>

Date2013-08-08 10:25
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hi Jacques,

Thanks for confirming.  I'll see if I can find some time to look into
this today.

steven

On Thu, Aug 8, 2013 at 10:54 AM, Jacques Leplat  wrote:
> Hello Steven,
>
> I found that playing a CSD works first time. The second run crashes the app. This happens in CSD player as well as my app.
>
> All the best,
>
> Jacques
>
> Steven Yi  wrote:
>
>>Hi Jacques,
>>
>>I'm following up with older emails, did this issue with fluidsynth and
>>Android get resolved?  I'm curious as I got a crash with CS5 using the
>>API from Java yesterday that pointed to fluidsynth (intermittent, and
>>had to do with multiple API renders at the same time, haven't looked
>>into it).
>>
>>Thanks!
>>steven
>>
>>On Thu, Jul 25, 2013 at 5:42 PM, Jacques Leplat  wrote:
>>> Thanks Mike,
>>>
>>> Your changes certainly have a few interesting tweaks I did not know about.
>>>
>>> The first run in CSound6 CSD Player works fine (LG Nexus 4, Android 4.2.2).
>>> I wait for the label on the button to turn from stop to start, then try to
>>> play it again, at this point csd player crashes out.
>>>
>>> I tried the csd on a mac running CSound 5.19, no problems there.
>>>
>>> All the best,
>>>
>>> Jacques
>>>
>>>
>>> On 24 Jul 2013, at 18:15, Michael Gogins  wrote:
>>>
>>> I modified your example so it works on my Samsung Galaxy s4.
>>>
>>> Thanks for testing this, you saved me some work.
>>>
>>> Best,
>>> Mike
>>>
>>> 
>>> 
>>> -odac -d -m3
>>> 
>>> 
>>> sr = 44100
>>> ksmps = 100
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>> alwayson "fluidoutput", 7
>>>
>>> ;-- Definition for instrument [8] Piano 1, fluidEngine, Sound Font
>>> synthesizer
>>> giEngine fluidEngine
>>> giSFnum fluidLoad "/mnt/extSdCard/sf_GMbank.sf2", giEngine, 1
>>> fluidProgramSelect giEngine, 1, giSFnum, 0, 0
>>>
>>> ;-- Instrument [8] Piano 1, fluidEngine, Sound Font synthesizer
>>> instr 8
>>> print p1, p2, p3, p4
>>> fluidNote giEngine, 1, p4, p5
>>> endin
>>>
>>> ;-- Instrument [1099] SF Capture
>>> instr fluidoutput
>>> asigL, asigR fluidOut giEngine
>>> asigL = asigL * p4
>>> asigR = asigR * p4
>>> outs asigL, asigR
>>>
>>> endin
>>> 
>>> 
>>> ;inst start dur amplitude noteNumber; midiNote
>>> i8 0.321 0.479 72 70
>>> i8 0.321 0.239 48 70
>>> i8 0.561 0.239 43 40
>>> i8 0.801 0.239 36 40
>>> s 5
>>> e 5
>>>
>>> 
>>> 
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot comHello,
>>>
>>>
>>
>>
>>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"
>
>

Date2013-08-12 15:21
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hi Jacques,

I think I've found the problem.  I saw some code that was deleting all
fluid engine instances when csound destroyed modules at end of run.
However, the way it was coded, it looked like it didn't take into
account if there was another Csound instance loaded.  I think it's a
condition that would depend on timing of loading. I think if an API
app, not just on Android, had two instances of Csound using fluid
opcodes, stopped one instance, it would cause the other to crash.

I've rewritten the module cleanup code and at least here on my Nexus 4
I am now able to load/run/stop/re-run/stop/etc. multiple times without
crash. I zipped up a compiled version of the fluidsynth plugin here:

https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip

If you could try that out that'd be great.

Michael: If you have chance, could you review the code change?

Thanks!
steven

On Thu, Aug 8, 2013 at 10:54 AM, Jacques Leplat  wrote:
> Hello Steven,
>
> I found that playing a CSD works first time. The second run crashes the app. This happens in CSD player as well as my app.
>
> All the best,
>
> Jacques
>
> Steven Yi  wrote:
>
>>Hi Jacques,
>>
>>I'm following up with older emails, did this issue with fluidsynth and
>>Android get resolved?  I'm curious as I got a crash with CS5 using the
>>API from Java yesterday that pointed to fluidsynth (intermittent, and
>>had to do with multiple API renders at the same time, haven't looked
>>into it).
>>
>>Thanks!
>>steven
>>
>>On Thu, Jul 25, 2013 at 5:42 PM, Jacques Leplat  wrote:
>>> Thanks Mike,
>>>
>>> Your changes certainly have a few interesting tweaks I did not know about.
>>>
>>> The first run in CSound6 CSD Player works fine (LG Nexus 4, Android 4.2.2).
>>> I wait for the label on the button to turn from stop to start, then try to
>>> play it again, at this point csd player crashes out.
>>>
>>> I tried the csd on a mac running CSound 5.19, no problems there.
>>>
>>> All the best,
>>>
>>> Jacques
>>>
>>>
>>> On 24 Jul 2013, at 18:15, Michael Gogins  wrote:
>>>
>>> I modified your example so it works on my Samsung Galaxy s4.
>>>
>>> Thanks for testing this, you saved me some work.
>>>
>>> Best,
>>> Mike
>>>
>>> 
>>> 
>>> -odac -d -m3
>>> 
>>> 
>>> sr = 44100
>>> ksmps = 100
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>> alwayson "fluidoutput", 7
>>>
>>> ;-- Definition for instrument [8] Piano 1, fluidEngine, Sound Font
>>> synthesizer
>>> giEngine fluidEngine
>>> giSFnum fluidLoad "/mnt/extSdCard/sf_GMbank.sf2", giEngine, 1
>>> fluidProgramSelect giEngine, 1, giSFnum, 0, 0
>>>
>>> ;-- Instrument [8] Piano 1, fluidEngine, Sound Font synthesizer
>>> instr 8
>>> print p1, p2, p3, p4
>>> fluidNote giEngine, 1, p4, p5
>>> endin
>>>
>>> ;-- Instrument [1099] SF Capture
>>> instr fluidoutput
>>> asigL, asigR fluidOut giEngine
>>> asigL = asigL * p4
>>> asigR = asigR * p4
>>> outs asigL, asigR
>>>
>>> endin
>>> 
>>> 
>>> ;inst start dur amplitude noteNumber; midiNote
>>> i8 0.321 0.479 72 70
>>> i8 0.321 0.239 48 70
>>> i8 0.561 0.239 43 40
>>> i8 0.801 0.239 36 40
>>> s 5
>>> e 5
>>>
>>> 
>>> 
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot comHello,
>>>
>>>
>>
>>
>>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"
>
>

Date2013-08-12 16:17
FromMichael Gogins
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Thanks. Yes, I will look at this tonight.

BTW, I looked at the Java loading problem and am completely baffled. I will take another look at that tonight also. All the parts appear to be in place for this to work...


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


On Mon, Aug 12, 2013 at 10:21 AM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Jacques,

I think I've found the problem.  I saw some code that was deleting all
fluid engine instances when csound destroyed modules at end of run.
However, the way it was coded, it looked like it didn't take into
account if there was another Csound instance loaded.  I think it's a
condition that would depend on timing of loading. I think if an API
app, not just on Android, had two instances of Csound using fluid
opcodes, stopped one instance, it would cause the other to crash.

I've rewritten the module cleanup code and at least here on my Nexus 4
I am now able to load/run/stop/re-run/stop/etc. multiple times without
crash. I zipped up a compiled version of the fluidsynth plugin here:

https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip

If you could try that out that'd be great.

Michael: If you have chance, could you review the code change?

Thanks!
steven

On Thu, Aug 8, 2013 at 10:54 AM, Jacques Leplat <jleplat@j3ltd.com> wrote:
> Hello Steven,
>
> I found that playing a CSD works first time. The second run crashes the app. This happens in CSD player as well as my app.
>
> All the best,
>
> Jacques
>
> Steven Yi <stevenyi@gmail.com> wrote:
>
>>Hi Jacques,
>>
>>I'm following up with older emails, did this issue with fluidsynth and
>>Android get resolved?  I'm curious as I got a crash with CS5 using the
>>API from Java yesterday that pointed to fluidsynth (intermittent, and
>>had to do with multiple API renders at the same time, haven't looked
>>into it).
>>
>>Thanks!
>>steven
>>
>>On Thu, Jul 25, 2013 at 5:42 PM, Jacques Leplat <jleplat@j3ltd.com> wrote:
>>> Thanks Mike,
>>>
>>> Your changes certainly have a few interesting tweaks I did not know about.
>>>
>>> The first run in CSound6 CSD Player works fine (LG Nexus 4, Android 4.2.2).
>>> I wait for the label on the button to turn from stop to start, then try to
>>> play it again, at this point csd player crashes out.
>>>
>>> I tried the csd on a mac running CSound 5.19, no problems there.
>>>
>>> All the best,
>>>
>>> Jacques
>>>
>>>
>>> On 24 Jul 2013, at 18:15, Michael Gogins <michael.gogins@gmail.com> wrote:
>>>
>>> I modified your example so it works on my Samsung Galaxy s4.
>>>
>>> Thanks for testing this, you saved me some work.
>>>
>>> Best,
>>> Mike
>>>
>>> <CsoundSynthesizer>
>>> <CsOptions>
>>> -odac -d -m3
>>> </CsOptions>
>>> <CsInstruments>
>>> sr = 44100
>>> ksmps = 100
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>> alwayson "fluidoutput", 7
>>>
>>> ;-- Definition for instrument [8] Piano 1, fluidEngine, Sound Font
>>> synthesizer
>>> giEngine fluidEngine
>>> giSFnum fluidLoad "/mnt/extSdCard/sf_GMbank.sf2", giEngine, 1
>>> fluidProgramSelect giEngine, 1, giSFnum, 0, 0
>>>
>>> ;-- Instrument [8] Piano 1, fluidEngine, Sound Font synthesizer
>>> instr 8
>>> print p1, p2, p3, p4
>>> fluidNote giEngine, 1, p4, p5
>>> endin
>>>
>>> ;-- Instrument [1099] SF Capture
>>> instr fluidoutput
>>> asigL, asigR fluidOut giEngine
>>> asigL = asigL * p4
>>> asigR = asigR * p4
>>> outs asigL, asigR
>>>
>>> endin
>>> </CsInstruments>
>>> <CsScore>
>>> ;inst start dur amplitude noteNumber; midiNote
>>> i8 0.321 0.479 72 70
>>> i8 0.321 0.239 48 70
>>> i8 0.561 0.239 43 40
>>> i8 0.801 0.239 36 40
>>> s 5
>>> e 5
>>>
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot comHello,
>>>
>>>
>>
>>
>>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"
>
>


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"




Date2013-08-12 17:27
FromJacques Leplat
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hello Steven,

Thanks for the fix!

I built csd player with it, and it runs csd's that use fluidsynth fine, more than once. 

Tried it on a Nexus 4 and a tablet running Android 4.0.4.

All the best,

Jacques


On 12 Aug 2013, at 15:21, Steven Yi  wrote:

> Hi Jacques,
> 
> I think I've found the problem.  I saw some code that was deleting all
> fluid engine instances when csound destroyed modules at end of run.
> However, the way it was coded, it looked like it didn't take into
> account if there was another Csound instance loaded.  I think it's a
> condition that would depend on timing of loading. I think if an API
> app, not just on Android, had two instances of Csound using fluid
> opcodes, stopped one instance, it would cause the other to crash.
> 
> I've rewritten the module cleanup code and at least here on my Nexus 4
> I am now able to load/run/stop/re-run/stop/etc. multiple times without
> crash. I zipped up a compiled version of the fluidsynth plugin here:
> 
> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
> 
> If you could try that out that'd be great.
> 
> Michael: If you have chance, could you review the code change?
> 
> Thanks!
> steven
> 



Date2013-08-12 17:27
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hi Michael,

Thanks on both accounts.  Just FYI, for the Java issue, I tried
running nm on both Csound5's library and Csound6's.  CS5 oddly gave no
symbols, and CS6's looks very different than what I expected.  I don't
know if that's useful information or not.  I'm unable to compile
Csound on Windows at the moment (still looking into this one) so am
not sure what other info I can help with.  Otherwise, if there's
anything you want me to test, I'll be happy to do so.

Thanks!
steven

On Mon, Aug 12, 2013 at 5:17 PM, Michael Gogins
 wrote:
> Thanks. Yes, I will look at this tonight.
>
> BTW, I looked at the Java loading problem and am completely baffled. I will
> take another look at that tonight also. All the parts appear to be in place
> for this to work...
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Mon, Aug 12, 2013 at 10:21 AM, Steven Yi  wrote:
>>
>> Hi Jacques,
>>
>> I think I've found the problem.  I saw some code that was deleting all
>> fluid engine instances when csound destroyed modules at end of run.
>> However, the way it was coded, it looked like it didn't take into
>> account if there was another Csound instance loaded.  I think it's a
>> condition that would depend on timing of loading. I think if an API
>> app, not just on Android, had two instances of Csound using fluid
>> opcodes, stopped one instance, it would cause the other to crash.
>>
>> I've rewritten the module cleanup code and at least here on my Nexus 4
>> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>
>> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>
>> If you could try that out that'd be great.
>>
>> Michael: If you have chance, could you review the code change?
>>
>> Thanks!
>> steven
>>
>> On Thu, Aug 8, 2013 at 10:54 AM, Jacques Leplat  wrote:
>> > Hello Steven,
>> >
>> > I found that playing a CSD works first time. The second run crashes the
>> > app. This happens in CSD player as well as my app.
>> >
>> > All the best,
>> >
>> > Jacques
>> >
>> > Steven Yi  wrote:
>> >
>> >>Hi Jacques,
>> >>
>> >>I'm following up with older emails, did this issue with fluidsynth and
>> >>Android get resolved?  I'm curious as I got a crash with CS5 using the
>> >>API from Java yesterday that pointed to fluidsynth (intermittent, and
>> >>had to do with multiple API renders at the same time, haven't looked
>> >>into it).
>> >>
>> >>Thanks!
>> >>steven
>> >>
>> >>On Thu, Jul 25, 2013 at 5:42 PM, Jacques Leplat 
>> >> wrote:
>> >>> Thanks Mike,
>> >>>
>> >>> Your changes certainly have a few interesting tweaks I did not know
>> >>> about.
>> >>>
>> >>> The first run in CSound6 CSD Player works fine (LG Nexus 4, Android
>> >>> 4.2.2).
>> >>> I wait for the label on the button to turn from stop to start, then
>> >>> try to
>> >>> play it again, at this point csd player crashes out.
>> >>>
>> >>> I tried the csd on a mac running CSound 5.19, no problems there.
>> >>>
>> >>> All the best,
>> >>>
>> >>> Jacques
>> >>>
>> >>>
>> >>> On 24 Jul 2013, at 18:15, Michael Gogins 
>> >>> wrote:
>> >>>
>> >>> I modified your example so it works on my Samsung Galaxy s4.
>> >>>
>> >>> Thanks for testing this, you saved me some work.
>> >>>
>> >>> Best,
>> >>> Mike
>> >>>
>> >>> 
>> >>> 
>> >>> -odac -d -m3
>> >>> 
>> >>> 
>> >>> sr = 44100
>> >>> ksmps = 100
>> >>> nchnls = 2
>> >>> 0dbfs = 1
>> >>>
>> >>> alwayson "fluidoutput", 7
>> >>>
>> >>> ;-- Definition for instrument [8] Piano 1, fluidEngine, Sound Font
>> >>> synthesizer
>> >>> giEngine fluidEngine
>> >>> giSFnum fluidLoad "/mnt/extSdCard/sf_GMbank.sf2", giEngine, 1
>> >>> fluidProgramSelect giEngine, 1, giSFnum, 0, 0
>> >>>
>> >>> ;-- Instrument [8] Piano 1, fluidEngine, Sound Font synthesizer
>> >>> instr 8
>> >>> print p1, p2, p3, p4
>> >>> fluidNote giEngine, 1, p4, p5
>> >>> endin
>> >>>
>> >>> ;-- Instrument [1099] SF Capture
>> >>> instr fluidoutput
>> >>> asigL, asigR fluidOut giEngine
>> >>> asigL = asigL * p4
>> >>> asigR = asigR * p4
>> >>> outs asigL, asigR
>> >>>
>> >>> endin
>> >>> 
>> >>> 
>> >>> ;inst start dur amplitude noteNumber; midiNote
>> >>> i8 0.321 0.479 72 70
>> >>> i8 0.321 0.239 48 70
>> >>> i8 0.561 0.239 43 40
>> >>> i8 0.801 0.239 36 40
>> >>> s 5
>> >>> e 5
>> >>>
>> >>> 
>> >>> 
>> >>>
>> >>> ===========================
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://michaelgogins.tumblr.com
>> >>> Michael dot Gogins at gmail dot comHello,
>> >>>
>> >>>
>> >>
>> >>
>> >>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"
>> >
>> >
>>
>>
>> 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"
>>
>>
>

Date2013-08-12 17:33
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hi Jacques,

Thanks for confirming!  Assuming Michael's review goes well, sounds
like we'll have this fixed for future releases.

Thanks!
steven

On Mon, Aug 12, 2013 at 6:27 PM, Jacques Leplat  wrote:
> Hello Steven,
>
> Thanks for the fix!
>
> I built csd player with it, and it runs csd's that use fluidsynth fine, more than once.
>
> Tried it on a Nexus 4 and a tablet running Android 4.0.4.
>
> All the best,
>
> Jacques
>
>
> On 12 Aug 2013, at 15:21, Steven Yi  wrote:
>
>> Hi Jacques,
>>
>> I think I've found the problem.  I saw some code that was deleting all
>> fluid engine instances when csound destroyed modules at end of run.
>> However, the way it was coded, it looked like it didn't take into
>> account if there was another Csound instance loaded.  I think it's a
>> condition that would depend on timing of loading. I think if an API
>> app, not just on Android, had two instances of Csound using fluid
>> opcodes, stopped one instance, it would cause the other to crash.
>>
>> I've rewritten the module cleanup code and at least here on my Nexus 4
>> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>
>> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>
>> If you could try that out that'd be great.
>>
>> Michael: If you have chance, could you review the code change?
>>
>> Thanks!
>> steven
>>
>
>
>
> 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"
>
>

Date2013-08-13 03:17
FromMichael Gogins
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
I think your fix is correct, Steven. I rebuilt both Csound 6 and the Csound 6 android app, and both run (for me) as before. I can let the fluid test on Android run to completion and re-run it, or I can stop it and re-run it.

Thanks,
Mike


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


On Mon, Aug 12, 2013 at 12:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Jacques,

Thanks for confirming!  Assuming Michael's review goes well, sounds
like we'll have this fixed for future releases.

Thanks!
steven

On Mon, Aug 12, 2013 at 6:27 PM, Jacques Leplat <jleplat@j3ltd.com> wrote:
> Hello Steven,
>
> Thanks for the fix!
>
> I built csd player with it, and it runs csd's that use fluidsynth fine, more than once.
>
> Tried it on a Nexus 4 and a tablet running Android 4.0.4.
>
> All the best,
>
> Jacques
>
>
> On 12 Aug 2013, at 15:21, Steven Yi <stevenyi@gmail.com> wrote:
>
>> Hi Jacques,
>>
>> I think I've found the problem.  I saw some code that was deleting all
>> fluid engine instances when csound destroyed modules at end of run.
>> However, the way it was coded, it looked like it didn't take into
>> account if there was another Csound instance loaded.  I think it's a
>> condition that would depend on timing of loading. I think if an API
>> app, not just on Android, had two instances of Csound using fluid
>> opcodes, stopped one instance, it would cause the other to crash.
>>
>> I've rewritten the module cleanup code and at least here on my Nexus 4
>> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>
>> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>
>> If you could try that out that'd be great.
>>
>> Michael: If you have chance, could you review the code change?
>>
>> Thanks!
>> steven
>>
>
>
>
> 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"




Date2013-08-13 08:05
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode

Hi Michael,

Thanks for reviewing and testing this out!

Steven

On Aug 13, 2013 4:18 AM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
I think your fix is correct, Steven. I rebuilt both Csound 6 and the Csound 6 android app, and both run (for me) as before. I can let the fluid test on Android run to completion and re-run it, or I can stop it and re-run it.

Thanks,
Mike


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


On Mon, Aug 12, 2013 at 12:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Jacques,

Thanks for confirming!  Assuming Michael's review goes well, sounds
like we'll have this fixed for future releases.

Thanks!
steven

On Mon, Aug 12, 2013 at 6:27 PM, Jacques Leplat <jleplat@j3ltd.com> wrote:
> Hello Steven,
>
> Thanks for the fix!
>
> I built csd player with it, and it runs csd's that use fluidsynth fine, more than once.
>
> Tried it on a Nexus 4 and a tablet running Android 4.0.4.
>
> All the best,
>
> Jacques
>
>
> On 12 Aug 2013, at 15:21, Steven Yi <stevenyi@gmail.com> wrote:
>
>> Hi Jacques,
>>
>> I think I've found the problem.  I saw some code that was deleting all
>> fluid engine instances when csound destroyed modules at end of run.
>> However, the way it was coded, it looked like it didn't take into
>> account if there was another Csound instance loaded.  I think it's a
>> condition that would depend on timing of loading. I think if an API
>> app, not just on Android, had two instances of Csound using fluid
>> opcodes, stopped one instance, it would cause the other to crash.
>>
>> I've rewritten the module cleanup code and at least here on my Nexus 4
>> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>
>> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>
>> If you could try that out that'd be great.
>>
>> Michael: If you have chance, could you review the code change?
>>
>> Thanks!
>> steven
>>
>
>
>
> 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"




Date2013-08-15 10:30
FromJacques Leplat
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hello,

I have managed to get the fluid synth opcode to run in my own app now, using Steven's shared library. Really happy with this, thanks again guys.

I have noticed that some extra code needs to be added just to load the shared libraries. I am wondering if this could be better placed inside the CSound Android jar file somehow, as this looks like code that all android apps need to have in order to use the shared libraries.

All the best,

Jacques

Below is the initialisation method I have written by pulling the code out of csd player, and placed in a CsoundObj wrapper class that I use:

public void init(Context ctx) {
// We ask for the data directory in case Android changes on
// us without warning.
try {
packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(),
0);
} catch (NameNotFoundException e) {
MyLogger.e(TAG, "Failed to get package info", e);
}


OPCODE6DIR = ctx.getApplicationInfo().nativeLibraryDir;
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx);
OPCODE6DIR = sharedPreferences.getString("OPCODE6DIR", OPCODE6DIR);
SSDIR = packageInfo.applicationInfo.dataDir + "/samples";
SSDIR = sharedPreferences.getString("SSDIR", SSDIR);
SFDIR = sharedPreferences.getString("SFDIR", SFDIR);
SADIR = sharedPreferences.getString("SADIR", SADIR);
INCDIR = sharedPreferences.getString("INCDIR", INCDIR);


File file = new File(OPCODE6DIR);
File[] files = file.listFiles();
MyLogger.d(TAG, "Loading Csound plugins...");
for (int i = 0; i < files.length; i++) {
String pluginPath = files[i].getAbsoluteFile()
.toString();
try {
MyLogger.d(TAG, pluginPath);
System.load(pluginPath);
} catch (Throwable e) {
MyLogger.e(TAG, "Error loading plugin " + pluginPath, e);
}
}
// Evidently, this has to be set before
// the very first Csound object is created.
csnd6.csndJNI.csoundSetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csnd6.csndJNI.csoundSetGlobalEnv("SFDIR", SFDIR);
csnd6.csndJNI.csoundSetGlobalEnv("SSDIR", SSDIR);
csnd6.csndJNI.csoundSetGlobalEnv("SADIR", SADIR);
csnd6.csndJNI.csoundSetGlobalEnv("INCDIR", INCDIR);
}

 
On 13 Aug 2013, at 08:05, Steven Yi <stevenyi@gmail.com> wrote:

Hi Michael,

Thanks for reviewing and testing this out!

Steven

On Aug 13, 2013 4:18 AM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
I think your fix is correct, Steven. I rebuilt both Csound 6 and the Csound 6 android app, and both run (for me) as before. I can let the fluid test on Android run to completion and re-run it, or I can stop it and re-run it.

Thanks,
Mike


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


On Mon, Aug 12, 2013 at 12:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Jacques,

Thanks for confirming!  Assuming Michael's review goes well, sounds
like we'll have this fixed for future releases.

Thanks!
steven

On Mon, Aug 12, 2013 at 6:27 PM, Jacques Leplat <jleplat@j3ltd.com> wrote:
> Hello Steven,
>
> Thanks for the fix!
>
> I built csd player with it, and it runs csd's that use fluidsynth fine, more than once.
>
> Tried it on a Nexus 4 and a tablet running Android 4.0.4.
>
> All the best,
>
> Jacques
>
>
> On 12 Aug 2013, at 15:21, Steven Yi <stevenyi@gmail.com> wrote:
>
>> Hi Jacques,
>>
>> I think I've found the problem.  I saw some code that was deleting all
>> fluid engine instances when csound destroyed modules at end of run.
>> However, the way it was coded, it looked like it didn't take into
>> account if there was another Csound instance loaded.  I think it's a
>> condition that would depend on timing of loading. I think if an API
>> app, not just on Android, had two instances of Csound using fluid
>> opcodes, stopped one instance, it would cause the other to crash.
>>
>> I've rewritten the module cleanup code and at least here on my Nexus 4
>> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>
>> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>
>> If you could try that out that'd be great.
>>
>> Michael: If you have chance, could you review the code change?
>>
>> Thanks!
>> steven
>>
>
>
>
> 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"





Date2013-08-19 03:32
FromSteven Yi
SubjectRe: [Csnd] CSound6 Fluidsynth opcode
Hi Jacques,

Could you put a ticket into the Csound 6 tracker on Sourceforge for
this? (include the information from this email)

Thanks!
steven

On Thu, Aug 15, 2013 at 5:30 AM, Jacques Leplat  wrote:
> Hello,
>
> I have managed to get the fluid synth opcode to run in my own app now, using
> Steven's shared library. Really happy with this, thanks again guys.
>
> I have noticed that some extra code needs to be added just to load the
> shared libraries. I am wondering if this could be better placed inside the
> CSound Android jar file somehow, as this looks like code that all android
> apps need to have in order to use the shared libraries.
>
> All the best,
>
> Jacques
>
> Below is the initialisation method I have written by pulling the code out of
> csd player, and placed in a CsoundObj wrapper class that I use:
>
> public void init(Context ctx) {
> // We ask for the data directory in case Android changes on
> // us without warning.
> try {
> packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(),
> 0);
> } catch (NameNotFoundException e) {
> MyLogger.e(TAG, "Failed to get package info", e);
> }
>
>
> OPCODE6DIR = ctx.getApplicationInfo().nativeLibraryDir;
> SharedPreferences sharedPreferences =
> PreferenceManager.getDefaultSharedPreferences(ctx);
> OPCODE6DIR = sharedPreferences.getString("OPCODE6DIR", OPCODE6DIR);
> SSDIR = packageInfo.applicationInfo.dataDir + "/samples";
> SSDIR = sharedPreferences.getString("SSDIR", SSDIR);
> SFDIR = sharedPreferences.getString("SFDIR", SFDIR);
> SADIR = sharedPreferences.getString("SADIR", SADIR);
> INCDIR = sharedPreferences.getString("INCDIR", INCDIR);
>
>
> File file = new File(OPCODE6DIR);
> File[] files = file.listFiles();
> MyLogger.d(TAG, "Loading Csound plugins...");
> for (int i = 0; i < files.length; i++) {
> String pluginPath = files[i].getAbsoluteFile()
> .toString();
> try {
> MyLogger.d(TAG, pluginPath);
> System.load(pluginPath);
> } catch (Throwable e) {
> MyLogger.e(TAG, "Error loading plugin " + pluginPath, e);
> }
> }
> // Evidently, this has to be set before
> // the very first Csound object is created.
> csnd6.csndJNI.csoundSetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
> csnd6.csndJNI.csoundSetGlobalEnv("SFDIR", SFDIR);
> csnd6.csndJNI.csoundSetGlobalEnv("SSDIR", SSDIR);
> csnd6.csndJNI.csoundSetGlobalEnv("SADIR", SADIR);
> csnd6.csndJNI.csoundSetGlobalEnv("INCDIR", INCDIR);
> }
>
>
> On 13 Aug 2013, at 08:05, Steven Yi  wrote:
>
> Hi Michael,
>
> Thanks for reviewing and testing this out!
>
> Steven
>
> On Aug 13, 2013 4:18 AM, "Michael Gogins"  wrote:
>>
>> I think your fix is correct, Steven. I rebuilt both Csound 6 and the
>> Csound 6 android app, and both run (for me) as before. I can let the fluid
>> test on Android run to completion and re-run it, or I can stop it and re-run
>> it.
>>
>> Thanks,
>> Mike
>>
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Mon, Aug 12, 2013 at 12:33 PM, Steven Yi  wrote:
>>>
>>> Hi Jacques,
>>>
>>> Thanks for confirming!  Assuming Michael's review goes well, sounds
>>> like we'll have this fixed for future releases.
>>>
>>> Thanks!
>>> steven
>>>
>>> On Mon, Aug 12, 2013 at 6:27 PM, Jacques Leplat 
>>> wrote:
>>> > Hello Steven,
>>> >
>>> > Thanks for the fix!
>>> >
>>> > I built csd player with it, and it runs csd's that use fluidsynth fine,
>>> > more than once.
>>> >
>>> > Tried it on a Nexus 4 and a tablet running Android 4.0.4.
>>> >
>>> > All the best,
>>> >
>>> > Jacques
>>> >
>>> >
>>> > On 12 Aug 2013, at 15:21, Steven Yi  wrote:
>>> >
>>> >> Hi Jacques,
>>> >>
>>> >> I think I've found the problem.  I saw some code that was deleting all
>>> >> fluid engine instances when csound destroyed modules at end of run.
>>> >> However, the way it was coded, it looked like it didn't take into
>>> >> account if there was another Csound instance loaded.  I think it's a
>>> >> condition that would depend on timing of loading. I think if an API
>>> >> app, not just on Android, had two instances of Csound using fluid
>>> >> opcodes, stopped one instance, it would cause the other to crash.
>>> >>
>>> >> I've rewritten the module cleanup code and at least here on my Nexus 4
>>> >> I am now able to load/run/stop/re-run/stop/etc. multiple times without
>>> >> crash. I zipped up a compiled version of the fluidsynth plugin here:
>>> >>
>>> >> https://www.dropbox.com/s/k3uf1nb7z9sth9y/fluid-android.zip
>>> >>
>>> >> If you could try that out that'd be great.
>>> >>
>>> >> Michael: If you have chance, could you review the code change?
>>> >>
>>> >> Thanks!
>>> >> steven
>>> >>
>>> >
>>> >
>>> >
>>> > 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"
>>>
>>>
>>
>