Csound Csound-dev Csound-tekno Search About

[Csnd] csound-java-eclipse

Date2024-04-01 12:46
FromRisto Kuusisto
Subject[Csnd] csound-java-eclipse
As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
I suppose most people choose nowadays python and one of the available UI-kits for that purpose.

My background is control systems R&D for an automation system. 
I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
(And Matlab/Octave)
So maybe the decision was quite straightforward.

My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
(by the way, Eclipse could be utilised also for python-development)

1 Eclipse installation - standard, no problems

2 csnd6.jar
 1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
I installed and told Eclipse where this library is located 
Now the java-code looks correct.

3 Run
Trying to run - no success => (something like)
  java.lang.UnsatisfiedLinkError: no native library in java.library.path. 
This was not that easy anymore, because the actual location of the related c-code library is
  /usr/lib/x86_64-linux-gnu/jni/.
I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
Fortunately I found instructions for this at a web-page (by Google)
  https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO

On that page there's a chapter that handles how to set native library location:
  3 Ways to set java.library.path in Eclipse IDE

Now it is possible to run java-code with the embedded csound-code.

4 cmd-line run
There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.

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

Date2024-04-01 13:45
FromSteven Yi
SubjectRe: [Csnd] csound-java-eclipse
I'd recommend using my CsoundJNI for Java:

https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI

I use this in Blue and it's been working well for me. There's some
feature not implemented compared to csnd6.jar, but if you need
something just file an issue on github and can take a look.

On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
>
> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>
> My background is control systems R&D for an automation system.
> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> (And Matlab/Octave)
> So maybe the decision was quite straightforward.
>
> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> (by the way, Eclipse could be utilised also for python-development)
>
> 1 Eclipse installation - standard, no problems
>
> 2 csnd6.jar
>  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> I installed and told Eclipse where this library is located
> Now the java-code looks correct.
>
> 3 Run
> Trying to run - no success => (something like)
>   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> This was not that easy anymore, because the actual location of the related c-code library is
>   /usr/lib/x86_64-linux-gnu/jni/.
> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> Fortunately I found instructions for this at a web-page (by Google)
>   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>
> On that page there's a chapter that handles how to set native library location:
>   3 Ways to set java.library.path in Eclipse IDE
>
> Now it is possible to run java-code with the embedded csound-code.
>
> 4 cmd-line run
> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>
> 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

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

Date2024-04-01 16:53
FromIain Duncan
SubjectRe: [Csnd] csound-java-eclipse
Another option is running Csound from within either Pure Data or Max and doing your UI there. I've wound up going down that route as the UI particulars are not that important to me (as in, I'm fine with what Max gives me) and one gets the benefit of handling MIDI and networking input in the host too. YMMV, but I've become a big fan of only coding what I need to and doing the plumbing quick and dirty in Max. 

iain

On Mon, Apr 1, 2024 at 5:45 AM Steven Yi <stevenyi@gmail.com> wrote:
I'd recommend using my CsoundJNI for Java:

https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI

I use this in Blue and it's been working well for me. There's some
feature not implemented compared to csnd6.jar, but if you need
something just file an issue on github and can take a look.

On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>
> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>
> My background is control systems R&D for an automation system.
> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> (And Matlab/Octave)
> So maybe the decision was quite straightforward.
>
> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> (by the way, Eclipse could be utilised also for python-development)
>
> 1 Eclipse installation - standard, no problems
>
> 2 csnd6.jar
>  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> I installed and told Eclipse where this library is located
> Now the java-code looks correct.
>
> 3 Run
> Trying to run - no success => (something like)
>   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> This was not that easy anymore, because the actual location of the related c-code library is
>   /usr/lib/x86_64-linux-gnu/jni/.
> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> Fortunately I found instructions for this at a web-page (by Google)
>   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>
> On that page there's a chapter that handles how to set native library location:
>   3 Ways to set java.library.path in Eclipse IDE
>
> Now it is possible to run java-code with the embedded csound-code.
>
> 4 cmd-line run
> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>
> 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

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
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

Date2024-04-01 22:01
FromRisto Kuusisto
SubjectRe: [Csnd] csound-java-eclipse
If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
So what are the benefits of using CsoundJNI instead of csnd6 ?
I suppose csnd6 works also properly ?

For Iain Duncan:
Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
by utlilising e.g. numpy in Python or Colt in Java.

I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.

--Risto


ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
I'd recommend using my CsoundJNI for Java:

https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI

I use this in Blue and it's been working well for me. There's some
feature not implemented compared to csnd6.jar, but if you need
something just file an issue on github and can take a look.

On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>
> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>
> My background is control systems R&D for an automation system.
> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> (And Matlab/Octave)
> So maybe the decision was quite straightforward.
>
> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> (by the way, Eclipse could be utilised also for python-development)
>
> 1 Eclipse installation - standard, no problems
>
> 2 csnd6.jar
>  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> I installed and told Eclipse where this library is located
> Now the java-code looks correct.
>
> 3 Run
> Trying to run - no success => (something like)
>   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> This was not that easy anymore, because the actual location of the related c-code library is
>   /usr/lib/x86_64-linux-gnu/jni/.
> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> Fortunately I found instructions for this at a web-page (by Google)
>   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>
> On that page there's a chapter that handles how to set native library location:
>   3 Ways to set java.library.path in Eclipse IDE
>
> Now it is possible to run java-code with the embedded csound-code.
>
> 4 cmd-line run
> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>
> 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

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
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

Date2024-04-02 00:48
FromIain Duncan
SubjectRe: [Csnd] csound-java-eclipse
Hi Risto, in case it is helpful... what I do is use the csound object in Max (I ported Victor's csound6 Pd object to Max) and handle all MIDI in the Max layer, translating from MIDI to score events and communicating with csound via Max messages of real-time score events. Additionally, all patch controls also come in from Max via the channel system. Personally, I find this much more convenient than using Csounds MIDI layer - it keeps my csound code far more minimal and focused only on DSP, and I really like controlling instruments with score messages. I have (many years ago) done the MIDI and FLTK thing in Csound itself, but it's not an area where I like working in Csound relative to other languages. 

I am also the author of Scheme for Max and Scheme for Pd, which let one use s7 Scheme (lisp) in Max and Pd, with scheduler integration. So I send score messages to csound directly from Scheme code that also runs in the Max host. I've found this to be a very productive triad - csound does only sound, Scheme does sequencing/scoring/algorithms, and Max does the containing plumbing, MIDI input, and GUI widgets (and I can put the whole mess in Ableton Live if want to use commercial tools alongside it.)

I have some videos of it all up here in case you are interested in that approach: 

Happy to answer questions if it's something you want to look at more closely.
iain

On Mon, Apr 1, 2024 at 2:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
So what are the benefits of using CsoundJNI instead of csnd6 ?
I suppose csnd6 works also properly ?

For Iain Duncan:
Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
by utlilising e.g. numpy in Python or Colt in Java.

I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.

--Risto


ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
I'd recommend using my CsoundJNI for Java:

https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI

I use this in Blue and it's been working well for me. There's some
feature not implemented compared to csnd6.jar, but if you need
something just file an issue on github and can take a look.

On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>
> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>
> My background is control systems R&D for an automation system.
> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> (And Matlab/Octave)
> So maybe the decision was quite straightforward.
>
> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> (by the way, Eclipse could be utilised also for python-development)
>
> 1 Eclipse installation - standard, no problems
>
> 2 csnd6.jar
>  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> I installed and told Eclipse where this library is located
> Now the java-code looks correct.
>
> 3 Run
> Trying to run - no success => (something like)
>   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> This was not that easy anymore, because the actual location of the related c-code library is
>   /usr/lib/x86_64-linux-gnu/jni/.
> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> Fortunately I found instructions for this at a web-page (by Google)
>   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>
> On that page there's a chapter that handles how to set native library location:
>   3 Ways to set java.library.path in Eclipse IDE
>
> Now it is possible to run java-code with the embedded csound-code.
>
> 4 cmd-line run
> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>
> 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

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
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
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

Date2024-04-02 08:30
FromPhilipp Neumann
SubjectRe: [Csnd] csound-java-eclipse
Ian, this sounds really great!

At our university we are learning Common Lisp as basis für algorithmic composition. I will dig deeper in your work!
Are you sharing the ported csound object somewhere?

@all:
is there a place in the web where all possible solutions for creating a GUI for csound is listed? i guess there is a ton of possibilities and i’m always surprised what exists out there.
I guess a collection like this with examples on the csound webpage would make csound even more interesting.

Philipp
> Am 02.04.2024 um 01:48 schrieb Iain Duncan :
> 
> Hi Risto, in case it is helpful... what I do is use the csound object in Max (I ported Victor's csound6 Pd object to Max) and handle all MIDI in the Max layer, translating from MIDI to score events and communicating with csound via Max messages of real-time score events. Additionally, all patch controls also come in from Max via the channel system. Personally, I find this much more convenient than using Csounds MIDI layer - it keeps my csound code far more minimal and focused only on DSP, and I really like controlling instruments with score messages. I have (many years ago) done the MIDI and FLTK thing in Csound itself, but it's not an area where I like working in Csound relative to other languages. 
> 
> I am also the author of Scheme for Max and Scheme for Pd, which let one use s7 Scheme (lisp) in Max and Pd, with scheduler integration. So I send score messages to csound directly from Scheme code that also runs in the Max host. I've found this to be a very productive triad - csound does only sound, Scheme does sequencing/scoring/algorithms, and Max does the containing plumbing, MIDI input, and GUI widgets (and I can put the whole mess in Ableton Live if want to use commercial tools alongside it.)
> 
> I have some videos of it all up here in case you are interested in that approach: 
> https://youtube.com/c/musicwithlisp
> 
> Happy to answer questions if it's something you want to look at more closely.
> iain
> 
> On Mon, Apr 1, 2024 at 2:02 PM Risto Kuusisto  wrote:
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
> 
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
> 
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
> 
> --Risto
> 
> 
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> I'd recommend using my CsoundJNI for Java:
> 
> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
> 
> I use this in Blue and it's been working well for me. There's some
> feature not implemented compared to csnd6.jar, but if you need
> something just file an issue on github and can take a look.
> 
> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
> >
> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >
> > My background is control systems R&D for an automation system.
> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> > (And Matlab/Octave)
> > So maybe the decision was quite straightforward.
> >
> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> > (by the way, Eclipse could be utilised also for python-development)
> >
> > 1 Eclipse installation - standard, no problems
> >
> > 2 csnd6.jar
> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> > I installed and told Eclipse where this library is located
> > Now the java-code looks correct.
> >
> > 3 Run
> > Trying to run - no success => (something like)
> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> > This was not that easy anymore, because the actual location of the related c-code library is
> >   /usr/lib/x86_64-linux-gnu/jni/.
> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> > Fortunately I found instructions for this at a web-page (by Google)
> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >
> > On that page there's a chapter that handles how to set native library location:
> >   3 Ways to set java.library.path in Eclipse IDE
> >
> > Now it is possible to run java-code with the embedded csound-code.
> >
> > 4 cmd-line run
> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >
> > 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
> 
> 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
> 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 
> 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

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

Date2024-04-02 12:43
FromDave Seidel
SubjectRe: [Csnd] csound-java-eclipse
When I want a GUI, I use Open Sound Control. Runs in the browser, looks very good, quite powerful. I run the server on the same Raspberry Pi 4 on which I run Csound. https://openstagecontrol.ammd.net/

On Tue, Apr 2, 2024 at 3:30 AM Philipp Neumann <philipp@von-neumann.com> wrote:
Ian, this sounds really great!

At our university we are learning Common Lisp as basis für algorithmic composition. I will dig deeper in your work!
Are you sharing the ported csound object somewhere?

@all:
is there a place in the web where all possible solutions for creating a GUI for csound is listed? i guess there is a ton of possibilities and i’m always surprised what exists out there.
I guess a collection like this with examples on the csound webpage would make csound even more interesting.

Philipp
> Am 02.04.2024 um 01:48 schrieb Iain Duncan <iainduncanlists@GMAIL.COM>:
>
> Hi Risto, in case it is helpful... what I do is use the csound object in Max (I ported Victor's csound6 Pd object to Max) and handle all MIDI in the Max layer, translating from MIDI to score events and communicating with csound via Max messages of real-time score events. Additionally, all patch controls also come in from Max via the channel system. Personally, I find this much more convenient than using Csounds MIDI layer - it keeps my csound code far more minimal and focused only on DSP, and I really like controlling instruments with score messages. I have (many years ago) done the MIDI and FLTK thing in Csound itself, but it's not an area where I like working in Csound relative to other languages.
>
> I am also the author of Scheme for Max and Scheme for Pd, which let one use s7 Scheme (lisp) in Max and Pd, with scheduler integration. So I send score messages to csound directly from Scheme code that also runs in the Max host. I've found this to be a very productive triad - csound does only sound, Scheme does sequencing/scoring/algorithms, and Max does the containing plumbing, MIDI input, and GUI widgets (and I can put the whole mess in Ableton Live if want to use commercial tools alongside it.)
>
> I have some videos of it all up here in case you are interested in that approach:
> https://youtube.com/c/musicwithlisp
>
> Happy to answer questions if it's something you want to look at more closely.
> iain
>
> On Mon, Apr 1, 2024 at 2:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
>
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
>
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>
> --Risto
>
>
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> I'd recommend using my CsoundJNI for Java:
>
> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>
> I use this in Blue and it's been working well for me. There's some
> feature not implemented compared to csnd6.jar, but if you need
> something just file an issue on github and can take a look.
>
> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >
> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >
> > My background is control systems R&D for an automation system.
> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> > (And Matlab/Octave)
> > So maybe the decision was quite straightforward.
> >
> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> > (by the way, Eclipse could be utilised also for python-development)
> >
> > 1 Eclipse installation - standard, no problems
> >
> > 2 csnd6.jar
> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> > I installed and told Eclipse where this library is located
> > Now the java-code looks correct.
> >
> > 3 Run
> > Trying to run - no success => (something like)
> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> > This was not that easy anymore, because the actual location of the related c-code library is
> >   /usr/lib/x86_64-linux-gnu/jni/.
> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> > Fortunately I found instructions for this at a web-page (by Google)
> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >
> > On that page there's a chapter that handles how to set native library location:
> >   3 Ways to set java.library.path in Eclipse IDE
> >
> > Now it is possible to run java-code with the embedded csound-code.
> >
> > 4 cmd-line run
> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >
> > 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
>
> 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
> 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
> 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

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
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

Date2024-04-02 13:21
FromRisto Kuusisto
SubjectRe: [Csnd] csound-java-eclipse
Attachmentskuva.png  
I loaded the CsoundJNI.jar version and if i'm right it doesn't need an external c-library at all because it includes the .so-file (or .dll for Windows) by itself.
I suppose the usage is the same as with the original, at least the basic methods ?
kuva.png


--Risto

ti 2. huhtik. 2024 klo 14.44 Dave Seidel (dave.seidel@gmail.com) kirjoitti:
When I want a GUI, I use Open Sound Control. Runs in the browser, looks very good, quite powerful. I run the server on the same Raspberry Pi 4 on which I run Csound. https://openstagecontrol.ammd.net/

On Tue, Apr 2, 2024 at 3:30 AM Philipp Neumann <philipp@von-neumann.com> wrote:
Ian, this sounds really great!

At our university we are learning Common Lisp as basis für algorithmic composition. I will dig deeper in your work!
Are you sharing the ported csound object somewhere?

@all:
is there a place in the web where all possible solutions for creating a GUI for csound is listed? i guess there is a ton of possibilities and i’m always surprised what exists out there.
I guess a collection like this with examples on the csound webpage would make csound even more interesting.

Philipp
> Am 02.04.2024 um 01:48 schrieb Iain Duncan <iainduncanlists@GMAIL.COM>:
>
> Hi Risto, in case it is helpful... what I do is use the csound object in Max (I ported Victor's csound6 Pd object to Max) and handle all MIDI in the Max layer, translating from MIDI to score events and communicating with csound via Max messages of real-time score events. Additionally, all patch controls also come in from Max via the channel system. Personally, I find this much more convenient than using Csounds MIDI layer - it keeps my csound code far more minimal and focused only on DSP, and I really like controlling instruments with score messages. I have (many years ago) done the MIDI and FLTK thing in Csound itself, but it's not an area where I like working in Csound relative to other languages.
>
> I am also the author of Scheme for Max and Scheme for Pd, which let one use s7 Scheme (lisp) in Max and Pd, with scheduler integration. So I send score messages to csound directly from Scheme code that also runs in the Max host. I've found this to be a very productive triad - csound does only sound, Scheme does sequencing/scoring/algorithms, and Max does the containing plumbing, MIDI input, and GUI widgets (and I can put the whole mess in Ableton Live if want to use commercial tools alongside it.)
>
> I have some videos of it all up here in case you are interested in that approach:
> https://youtube.com/c/musicwithlisp
>
> Happy to answer questions if it's something you want to look at more closely.
> iain
>
> On Mon, Apr 1, 2024 at 2:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
>
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
>
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>
> --Risto
>
>
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> I'd recommend using my CsoundJNI for Java:
>
> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>
> I use this in Blue and it's been working well for me. There's some
> feature not implemented compared to csnd6.jar, but if you need
> something just file an issue on github and can take a look.
>
> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >
> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >
> > My background is control systems R&D for an automation system.
> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> > (And Matlab/Octave)
> > So maybe the decision was quite straightforward.
> >
> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> > (by the way, Eclipse could be utilised also for python-development)
> >
> > 1 Eclipse installation - standard, no problems
> >
> > 2 csnd6.jar
> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> > I installed and told Eclipse where this library is located
> > Now the java-code looks correct.
> >
> > 3 Run
> > Trying to run - no success => (something like)
> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> > This was not that easy anymore, because the actual location of the related c-code library is
> >   /usr/lib/x86_64-linux-gnu/jni/.
> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> > Fortunately I found instructions for this at a web-page (by Google)
> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >
> > On that page there's a chapter that handles how to set native library location:
> >   3 Ways to set java.library.path in Eclipse IDE
> >
> > Now it is possible to run java-code with the embedded csound-code.
> >
> > 4 cmd-line run
> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >
> > 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
>
> 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
> 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
> 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

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
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
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

Date2024-04-02 15:13
FromIain Duncan
SubjectRe: [Csnd] csound-java-eclipse
Attachmentskuva.png  
Hi Phillip, the csound object is here: https://github.com/iainctduncan/csound_max
I have an improvement planned for the next week or so to make using it in Live easier, and will be working on getting this merged with csound's main repo after that.

Scheme for Max lives here: 
It hasn't seen a release in a while (post Masters burn out. lol) but will be seeing releases again this month.

iain

On Tue, Apr 2, 2024 at 5:21 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
I loaded the CsoundJNI.jar version and if i'm right it doesn't need an external c-library at all because it includes the .so-file (or .dll for Windows) by itself.
I suppose the usage is the same as with the original, at least the basic methods ?
kuva.png


--Risto

ti 2. huhtik. 2024 klo 14.44 Dave Seidel (dave.seidel@gmail.com) kirjoitti:
When I want a GUI, I use Open Sound Control. Runs in the browser, looks very good, quite powerful. I run the server on the same Raspberry Pi 4 on which I run Csound. https://openstagecontrol.ammd.net/

On Tue, Apr 2, 2024 at 3:30 AM Philipp Neumann <philipp@von-neumann.com> wrote:
Ian, this sounds really great!

At our university we are learning Common Lisp as basis für algorithmic composition. I will dig deeper in your work!
Are you sharing the ported csound object somewhere?

@all:
is there a place in the web where all possible solutions for creating a GUI for csound is listed? i guess there is a ton of possibilities and i’m always surprised what exists out there.
I guess a collection like this with examples on the csound webpage would make csound even more interesting.

Philipp
> Am 02.04.2024 um 01:48 schrieb Iain Duncan <iainduncanlists@GMAIL.COM>:
>
> Hi Risto, in case it is helpful... what I do is use the csound object in Max (I ported Victor's csound6 Pd object to Max) and handle all MIDI in the Max layer, translating from MIDI to score events and communicating with csound via Max messages of real-time score events. Additionally, all patch controls also come in from Max via the channel system. Personally, I find this much more convenient than using Csounds MIDI layer - it keeps my csound code far more minimal and focused only on DSP, and I really like controlling instruments with score messages. I have (many years ago) done the MIDI and FLTK thing in Csound itself, but it's not an area where I like working in Csound relative to other languages.
>
> I am also the author of Scheme for Max and Scheme for Pd, which let one use s7 Scheme (lisp) in Max and Pd, with scheduler integration. So I send score messages to csound directly from Scheme code that also runs in the Max host. I've found this to be a very productive triad - csound does only sound, Scheme does sequencing/scoring/algorithms, and Max does the containing plumbing, MIDI input, and GUI widgets (and I can put the whole mess in Ableton Live if want to use commercial tools alongside it.)
>
> I have some videos of it all up here in case you are interested in that approach:
> https://youtube.com/c/musicwithlisp
>
> Happy to answer questions if it's something you want to look at more closely.
> iain
>
> On Mon, Apr 1, 2024 at 2:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
>
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
>
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>
> --Risto
>
>
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> I'd recommend using my CsoundJNI for Java:
>
> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>
> I use this in Blue and it's been working well for me. There's some
> feature not implemented compared to csnd6.jar, but if you need
> something just file an issue on github and can take a look.
>
> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >
> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >
> > My background is control systems R&D for an automation system.
> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> > (And Matlab/Octave)
> > So maybe the decision was quite straightforward.
> >
> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> > (by the way, Eclipse could be utilised also for python-development)
> >
> > 1 Eclipse installation - standard, no problems
> >
> > 2 csnd6.jar
> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> > I installed and told Eclipse where this library is located
> > Now the java-code looks correct.
> >
> > 3 Run
> > Trying to run - no success => (something like)
> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> > This was not that easy anymore, because the actual location of the related c-code library is
> >   /usr/lib/x86_64-linux-gnu/jni/.
> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> > Fortunately I found instructions for this at a web-page (by Google)
> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >
> > On that page there's a chapter that handles how to set native library location:
> >   3 Ways to set java.library.path in Eclipse IDE
> >
> > Now it is possible to run java-code with the embedded csound-code.
> >
> > 4 cmd-line run
> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >
> > 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
>
> 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
> 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
> 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

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
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
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
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

Date2024-04-02 16:36
FromSteven Yi
SubjectRe: [Csnd] csound-java-eclipse
We won't be using a csnd7.jar for Csound 7 and moving to either
CsoundJNI or using Java's latest FFI feature (though that would
require Java 22). As for CsoundJNI, it should work out of the box with
installed versions of Csound on Windows, Mac, and Linux, across a
number of different architectures. csnd6.jar requires having
libcsnd.so (I think that's the name?) and libcsound64.so on the
library path and that usually requires some extra configuration to get
right, while CsoundJNI has a list of common paths and just has to find
libcsound64.so (CsoundJNI includes the native lib it needs to call
libcsound64.so).

You can get csnd6.jar to work, it just takes some extra configuration.

(Actually this is a good reminder for me to get working on the Java
FFI version...)

On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto  wrote:
>
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
>
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
>
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>
> --Risto
>
>
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>
>> I'd recommend using my CsoundJNI for Java:
>>
>> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>>
>> I use this in Blue and it's been working well for me. There's some
>> feature not implemented compared to csnd6.jar, but if you need
>> something just file an issue on github and can take a look.
>>
>> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
>> >
>> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>> >
>> > My background is control systems R&D for an automation system.
>> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>> > (And Matlab/Octave)
>> > So maybe the decision was quite straightforward.
>> >
>> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>> > (by the way, Eclipse could be utilised also for python-development)
>> >
>> > 1 Eclipse installation - standard, no problems
>> >
>> > 2 csnd6.jar
>> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>> > I installed and told Eclipse where this library is located
>> > Now the java-code looks correct.
>> >
>> > 3 Run
>> > Trying to run - no success => (something like)
>> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>> > This was not that easy anymore, because the actual location of the related c-code library is
>> >   /usr/lib/x86_64-linux-gnu/jni/.
>> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>> > Fortunately I found instructions for this at a web-page (by Google)
>> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>> >
>> > On that page there's a chapter that handles how to set native library location:
>> >   3 Ways to set java.library.path in Eclipse IDE
>> >
>> > Now it is possible to run java-code with the embedded csound-code.
>> >
>> > 4 cmd-line run
>> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>> >
>> > 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
>>
>> 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
>
> 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

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

Date2024-04-02 18:31
FromRisto Kuusisto
SubjectRe: [Csnd] csound-java-eclipse
So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
I couldn't find a corresponding definition in CsoundJNI:

// Create a new CsoundPerformanceThread, passing in the Csound object

CsoundPerformanceThread t = new CsoundPerformanceThread(c);


Any ideas ?


--Risto



ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
We won't be using a csnd7.jar for Csound 7 and moving to either
CsoundJNI or using Java's latest FFI feature (though that would
require Java 22). As for CsoundJNI, it should work out of the box with
installed versions of Csound on Windows, Mac, and Linux, across a
number of different architectures. csnd6.jar requires having
libcsnd.so (I think that's the name?) and libcsound64.so on the
library path and that usually requires some extra configuration to get
right, while CsoundJNI has a list of common paths and just has to find
libcsound64.so (CsoundJNI includes the native lib it needs to call
libcsound64.so).

You can get csnd6.jar to work, it just takes some extra configuration.

(Actually this is a good reminder for me to get working on the Java
FFI version...)

On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>
> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> So what are the benefits of using CsoundJNI instead of csnd6 ?
> I suppose csnd6 works also properly ?
>
> For Iain Duncan:
> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> by utlilising e.g. numpy in Python or Colt in Java.
>
> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>
> --Risto
>
>
> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>
>> I'd recommend using my CsoundJNI for Java:
>>
>> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>>
>> I use this in Blue and it's been working well for me. There's some
>> feature not implemented compared to csnd6.jar, but if you need
>> something just file an issue on github and can take a look.
>>
>> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>> >
>> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>> >
>> > My background is control systems R&D for an automation system.
>> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>> > (And Matlab/Octave)
>> > So maybe the decision was quite straightforward.
>> >
>> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>> > (by the way, Eclipse could be utilised also for python-development)
>> >
>> > 1 Eclipse installation - standard, no problems
>> >
>> > 2 csnd6.jar
>> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>> > I installed and told Eclipse where this library is located
>> > Now the java-code looks correct.
>> >
>> > 3 Run
>> > Trying to run - no success => (something like)
>> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>> > This was not that easy anymore, because the actual location of the related c-code library is
>> >   /usr/lib/x86_64-linux-gnu/jni/.
>> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>> > Fortunately I found instructions for this at a web-page (by Google)
>> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>> >
>> > On that page there's a chapter that handles how to set native library location:
>> >   3 Ways to set java.library.path in Eclipse IDE
>> >
>> > Now it is possible to run java-code with the embedded csound-code.
>> >
>> > 4 cmd-line run
>> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>> >
>> > 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
>>
>> 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
>
> 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

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
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

Date2024-04-06 16:22
FromSteven Yi
SubjectRe: [Csnd] csound-java-eclipse
Yes, that is something that is not implemented in CsoundJNI at this
time. I implemented the parts of the API that were necessary for Blue
and had not gone further. I use Java Threads with Csound objects
myself. I'll try to schedule some time to review API differences as
well as Java 22 FFI implementation, but until then a Thread that calls
cs.performKsmps() in a while-loop should do the job.

On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto  wrote:
>
> So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
> I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
> I couldn't find a corresponding definition in CsoundJNI:
>
> // Create a new CsoundPerformanceThread, passing in the Csound object
>
> CsoundPerformanceThread t = new CsoundPerformanceThread(c);
>
>
> Any ideas ?
>
>
> --Risto
>
>
>
> ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>
>> We won't be using a csnd7.jar for Csound 7 and moving to either
>> CsoundJNI or using Java's latest FFI feature (though that would
>> require Java 22). As for CsoundJNI, it should work out of the box with
>> installed versions of Csound on Windows, Mac, and Linux, across a
>> number of different architectures. csnd6.jar requires having
>> libcsnd.so (I think that's the name?) and libcsound64.so on the
>> library path and that usually requires some extra configuration to get
>> right, while CsoundJNI has a list of common paths and just has to find
>> libcsound64.so (CsoundJNI includes the native lib it needs to call
>> libcsound64.so).
>>
>> You can get csnd6.jar to work, it just takes some extra configuration.
>>
>> (Actually this is a good reminder for me to get working on the Java
>> FFI version...)
>>
>> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto  wrote:
>> >
>> > If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
>> > So what are the benefits of using CsoundJNI instead of csnd6 ?
>> > I suppose csnd6 works also properly ?
>> >
>> > For Iain Duncan:
>> > Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
>> > by utlilising e.g. numpy in Python or Colt in Java.
>> >
>> > I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
>> > Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>> >
>> > --Risto
>> >
>> >
>> > ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>> >>
>> >> I'd recommend using my CsoundJNI for Java:
>> >>
>> >> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>> >>
>> >> I use this in Blue and it's been working well for me. There's some
>> >> feature not implemented compared to csnd6.jar, but if you need
>> >> something just file an issue on github and can take a look.
>> >>
>> >> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
>> >> >
>> >> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>> >> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>> >> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>> >> >
>> >> > My background is control systems R&D for an automation system.
>> >> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>> >> > (And Matlab/Octave)
>> >> > So maybe the decision was quite straightforward.
>> >> >
>> >> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>> >> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>> >> > (by the way, Eclipse could be utilised also for python-development)
>> >> >
>> >> > 1 Eclipse installation - standard, no problems
>> >> >
>> >> > 2 csnd6.jar
>> >> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>> >> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>> >> > I installed and told Eclipse where this library is located
>> >> > Now the java-code looks correct.
>> >> >
>> >> > 3 Run
>> >> > Trying to run - no success => (something like)
>> >> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>> >> > This was not that easy anymore, because the actual location of the related c-code library is
>> >> >   /usr/lib/x86_64-linux-gnu/jni/.
>> >> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>> >> > Fortunately I found instructions for this at a web-page (by Google)
>> >> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>> >> >
>> >> > On that page there's a chapter that handles how to set native library location:
>> >> >   3 Ways to set java.library.path in Eclipse IDE
>> >> >
>> >> > Now it is possible to run java-code with the embedded csound-code.
>> >> >
>> >> > 4 cmd-line run
>> >> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>> >> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>> >> >
>> >> > 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
>> >>
>> >> 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
>> >
>> > 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
>>
>> 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
>
> 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

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

Date2024-04-07 12:19
FromRisto Kuusisto
SubjectRe: [Csnd] csound-java-eclipse
Thanks Steven,
I noticed that in addition to CsoundPerformanceThread also CsoundMYFLTArray is missing.
Then the generic GetChannelPtr as such is missing but instead of that getAudioChannelPtr and getControlChannelPtr
are available.

As a beginner I can't tell if those are important or not but it seems that the corresponding functions are also
in use in the python-examples.

I would guess that CsoundPerformanceThread is important if the instrument -section is very CPU-hungry.

--Risto

la 6. huhtik. 2024 klo 18.22 Steven Yi (stevenyi@gmail.com) kirjoitti:
Yes, that is something that is not implemented in CsoundJNI at this
time. I implemented the parts of the API that were necessary for Blue
and had not gone further. I use Java Threads with Csound objects
myself. I'll try to schedule some time to review API differences as
well as Java 22 FFI implementation, but until then a Thread that calls
cs.performKsmps() in a while-loop should do the job.

On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>
> So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
> I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
> I couldn't find a corresponding definition in CsoundJNI:
>
> // Create a new CsoundPerformanceThread, passing in the Csound object
>
> CsoundPerformanceThread t = new CsoundPerformanceThread(c);
>
>
> Any ideas ?
>
>
> --Risto
>
>
>
> ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>
>> We won't be using a csnd7.jar for Csound 7 and moving to either
>> CsoundJNI or using Java's latest FFI feature (though that would
>> require Java 22). As for CsoundJNI, it should work out of the box with
>> installed versions of Csound on Windows, Mac, and Linux, across a
>> number of different architectures. csnd6.jar requires having
>> libcsnd.so (I think that's the name?) and libcsound64.so on the
>> library path and that usually requires some extra configuration to get
>> right, while CsoundJNI has a list of common paths and just has to find
>> libcsound64.so (CsoundJNI includes the native lib it needs to call
>> libcsound64.so).
>>
>> You can get csnd6.jar to work, it just takes some extra configuration.
>>
>> (Actually this is a good reminder for me to get working on the Java
>> FFI version...)
>>
>> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>> >
>> > If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
>> > So what are the benefits of using CsoundJNI instead of csnd6 ?
>> > I suppose csnd6 works also properly ?
>> >
>> > For Iain Duncan:
>> > Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
>> > by utlilising e.g. numpy in Python or Colt in Java.
>> >
>> > I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
>> > Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>> >
>> > --Risto
>> >
>> >
>> > ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>> >>
>> >> I'd recommend using my CsoundJNI for Java:
>> >>
>> >> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>> >>
>> >> I use this in Blue and it's been working well for me. There's some
>> >> feature not implemented compared to csnd6.jar, but if you need
>> >> something just file an issue on github and can take a look.
>> >>
>> >> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
>> >> >
>> >> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>> >> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>> >> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>> >> >
>> >> > My background is control systems R&D for an automation system.
>> >> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>> >> > (And Matlab/Octave)
>> >> > So maybe the decision was quite straightforward.
>> >> >
>> >> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>> >> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>> >> > (by the way, Eclipse could be utilised also for python-development)
>> >> >
>> >> > 1 Eclipse installation - standard, no problems
>> >> >
>> >> > 2 csnd6.jar
>> >> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>> >> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>> >> > I installed and told Eclipse where this library is located
>> >> > Now the java-code looks correct.
>> >> >
>> >> > 3 Run
>> >> > Trying to run - no success => (something like)
>> >> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>> >> > This was not that easy anymore, because the actual location of the related c-code library is
>> >> >   /usr/lib/x86_64-linux-gnu/jni/.
>> >> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>> >> > Fortunately I found instructions for this at a web-page (by Google)
>> >> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>> >> >
>> >> > On that page there's a chapter that handles how to set native library location:
>> >> >   3 Ways to set java.library.path in Eclipse IDE
>> >> >
>> >> > Now it is possible to run java-code with the embedded csound-code.
>> >> >
>> >> > 4 cmd-line run
>> >> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>> >> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>> >> >
>> >> > 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
>> >>
>> >> 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
>> >
>> > 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
>>
>> 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
>
> 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

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
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

Date2024-04-07 16:00
FromSteven Yi
SubjectRe: [Csnd] csound-java-eclipse
Thanks for pointing those out, I'll note it for when I audit the code.
CsoundPerformanceThread is handy but it's also not as essential in
languages that have threads (e.g., compared to Python). I'll look at
having some kind of implementation of CsoundPerformanceThread
available.

On Sun, Apr 7, 2024 at 7:19 AM Risto Kuusisto  wrote:
>
> Thanks Steven,
> I noticed that in addition to CsoundPerformanceThread also CsoundMYFLTArray is missing.
> Then the generic GetChannelPtr as such is missing but instead of that getAudioChannelPtr and getControlChannelPtr
> are available.
>
> As a beginner I can't tell if those are important or not but it seems that the corresponding functions are also
> in use in the python-examples.
>
> I would guess that CsoundPerformanceThread is important if the instrument -section is very CPU-hungry.
>
> --Risto
>
> la 6. huhtik. 2024 klo 18.22 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>
>> Yes, that is something that is not implemented in CsoundJNI at this
>> time. I implemented the parts of the API that were necessary for Blue
>> and had not gone further. I use Java Threads with Csound objects
>> myself. I'll try to schedule some time to review API differences as
>> well as Java 22 FFI implementation, but until then a Thread that calls
>> cs.performKsmps() in a while-loop should do the job.
>>
>> On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto  wrote:
>> >
>> > So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
>> > I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
>> > I couldn't find a corresponding definition in CsoundJNI:
>> >
>> > // Create a new CsoundPerformanceThread, passing in the Csound object
>> >
>> > CsoundPerformanceThread t = new CsoundPerformanceThread(c);
>> >
>> >
>> > Any ideas ?
>> >
>> >
>> > --Risto
>> >
>> >
>> >
>> > ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
>> >>
>> >> We won't be using a csnd7.jar for Csound 7 and moving to either
>> >> CsoundJNI or using Java's latest FFI feature (though that would
>> >> require Java 22). As for CsoundJNI, it should work out of the box with
>> >> installed versions of Csound on Windows, Mac, and Linux, across a
>> >> number of different architectures. csnd6.jar requires having
>> >> libcsnd.so (I think that's the name?) and libcsound64.so on the
>> >> library path and that usually requires some extra configuration to get
>> >> right, while CsoundJNI has a list of common paths and just has to find
>> >> libcsound64.so (CsoundJNI includes the native lib it needs to call
>> >> libcsound64.so).
>> >>
>> >> You can get csnd6.jar to work, it just takes some extra configuration.
>> >>
>> >> (Actually this is a good reminder for me to get working on the Java
>> >> FFI version...)
>> >>
>> >> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto  wrote:
>> >> >
>> >> > If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
>> >> > So what are the benefits of using CsoundJNI instead of csnd6 ?
>> >> > I suppose csnd6 works also properly ?
>> >> >
>> >> > For Iain Duncan:
>> >> > Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
>> >> > by utlilising e.g. numpy in Python or Colt in Java.
>> >> >
>> >> > I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
>> >> > Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>> >> >
>> >> > --Risto
>> >> >
>> >> >
>> >> > ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>> >> >>
>> >> >> I'd recommend using my CsoundJNI for Java:
>> >> >>
>> >> >> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>> >> >>
>> >> >> I use this in Blue and it's been working well for me. There's some
>> >> >> feature not implemented compared to csnd6.jar, but if you need
>> >> >> something just file an issue on github and can take a look.
>> >> >>
>> >> >> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
>> >> >> >
>> >> >> > As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>> >> >> > Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>> >> >> > I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>> >> >> >
>> >> >> > My background is control systems R&D for an automation system.
>> >> >> > I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>> >> >> > (And Matlab/Octave)
>> >> >> > So maybe the decision was quite straightforward.
>> >> >> >
>> >> >> > My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>> >> >> > I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>> >> >> > (by the way, Eclipse could be utilised also for python-development)
>> >> >> >
>> >> >> > 1 Eclipse installation - standard, no problems
>> >> >> >
>> >> >> > 2 csnd6.jar
>> >> >> >  1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>> >> >> > It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>> >> >> > I installed and told Eclipse where this library is located
>> >> >> > Now the java-code looks correct.
>> >> >> >
>> >> >> > 3 Run
>> >> >> > Trying to run - no success => (something like)
>> >> >> >   java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>> >> >> > This was not that easy anymore, because the actual location of the related c-code library is
>> >> >> >   /usr/lib/x86_64-linux-gnu/jni/.
>> >> >> > I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>> >> >> > Fortunately I found instructions for this at a web-page (by Google)
>> >> >> >   https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>> >> >> >
>> >> >> > On that page there's a chapter that handles how to set native library location:
>> >> >> >   3 Ways to set java.library.path in Eclipse IDE
>> >> >> >
>> >> >> > Now it is possible to run java-code with the embedded csound-code.
>> >> >> >
>> >> >> > 4 cmd-line run
>> >> >> > There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>> >> >> > The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>> >> >> >
>> >> >> > 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
>> >> >>
>> >> >> 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
>> >> >
>> >> > 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
>> >>
>> >> 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
>> >
>> > 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
>>
>> 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
>
> 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

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

Date2024-04-07 16:50
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] csound-java-eclipse
Just a note of caution: it may not be worth doing a lot of work on this until we have a new API for 7.0.

I expect a lot of consolidation as well as deletions will be on the way.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 7 Apr 2024, at 16:03, Steven Yi  wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Thanks for pointing those out, I'll note it for when I audit the code.
> CsoundPerformanceThread is handy but it's also not as essential in
> languages that have threads (e.g., compared to Python). I'll look at
> having some kind of implementation of CsoundPerformanceThread
> available.
>
>> On Sun, Apr 7, 2024 at 7:19 AM Risto Kuusisto  wrote:
>>
>> Thanks Steven,
>> I noticed that in addition to CsoundPerformanceThread also CsoundMYFLTArray is missing.
>> Then the generic GetChannelPtr as such is missing but instead of that getAudioChannelPtr and getControlChannelPtr
>> are available.
>>
>> As a beginner I can't tell if those are important or not but it seems that the corresponding functions are also
>> in use in the python-examples.
>>
>> I would guess that CsoundPerformanceThread is important if the instrument -section is very CPU-hungry.
>>
>> --Risto
>>
>> la 6. huhtik. 2024 klo 18.22 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>>
>>> Yes, that is something that is not implemented in CsoundJNI at this
>>> time. I implemented the parts of the API that were necessary for Blue
>>> and had not gone further. I use Java Threads with Csound objects
>>> myself. I'll try to schedule some time to review API differences as
>>> well as Java 22 FFI implementation, but until then a Thread that calls
>>> cs.performKsmps() in a while-loop should do the job.
>>>
>>> On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto  wrote:
>>>>
>>>> So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
>>>> I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
>>>> I couldn't find a corresponding definition in CsoundJNI:
>>>>
>>>> // Create a new CsoundPerformanceThread, passing in the Csound object
>>>>
>>>> CsoundPerformanceThread t = new CsoundPerformanceThread(c);
>>>>
>>>>
>>>> Any ideas ?
>>>>
>>>>
>>>> --Risto
>>>>
>>>>
>>>>
>>>> ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>>>>
>>>>> We won't be using a csnd7.jar for Csound 7 and moving to either
>>>>> CsoundJNI or using Java's latest FFI feature (though that would
>>>>> require Java 22). As for CsoundJNI, it should work out of the box with
>>>>> installed versions of Csound on Windows, Mac, and Linux, across a
>>>>> number of different architectures. csnd6.jar requires having
>>>>> libcsnd.so (I think that's the name?) and libcsound64.so on the
>>>>> library path and that usually requires some extra configuration to get
>>>>> right, while CsoundJNI has a list of common paths and just has to find
>>>>> libcsound64.so (CsoundJNI includes the native lib it needs to call
>>>>> libcsound64.so).
>>>>>
>>>>> You can get csnd6.jar to work, it just takes some extra configuration.
>>>>>
>>>>> (Actually this is a good reminder for me to get working on the Java
>>>>> FFI version...)
>>>>>
>>>>> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto  wrote:
>>>>>>
>>>>>> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
>>>>>> So what are the benefits of using CsoundJNI instead of csnd6 ?
>>>>>> I suppose csnd6 works also properly ?
>>>>>>
>>>>>> For Iain Duncan:
>>>>>> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
>>>>>> by utlilising e.g. numpy in Python or Colt in Java.
>>>>>>
>>>>>> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
>>>>>> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
>>>>>>
>>>>>> --Risto
>>>>>>
>>>>>>
>>>>>> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
>>>>>>>
>>>>>>> I'd recommend using my CsoundJNI for Java:
>>>>>>>
>>>>>>> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
>>>>>>>
>>>>>>> I use this in Blue and it's been working well for me. There's some
>>>>>>> feature not implemented compared to csnd6.jar, but if you need
>>>>>>> something just file an issue on github and can take a look.
>>>>>>>
>>>>>>> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
>>>>>>>>
>>>>>>>> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
>>>>>>>> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
>>>>>>>> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
>>>>>>>>
>>>>>>>> My background is control systems R&D for an automation system.
>>>>>>>> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
>>>>>>>> (And Matlab/Octave)
>>>>>>>> So maybe the decision was quite straightforward.
>>>>>>>>
>>>>>>>> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
>>>>>>>> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
>>>>>>>> (by the way, Eclipse could be utilised also for python-development)
>>>>>>>>
>>>>>>>> 1 Eclipse installation - standard, no problems
>>>>>>>>
>>>>>>>> 2 csnd6.jar
>>>>>>>> 1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
>>>>>>>> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
>>>>>>>> I installed and told Eclipse where this library is located
>>>>>>>> Now the java-code looks correct.
>>>>>>>>
>>>>>>>> 3 Run
>>>>>>>> Trying to run - no success => (something like)
>>>>>>>>  java.lang.UnsatisfiedLinkError: no native library in java.library.path.
>>>>>>>> This was not that easy anymore, because the actual location of the related c-code library is
>>>>>>>>  /usr/lib/x86_64-linux-gnu/jni/.
>>>>>>>> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
>>>>>>>> Fortunately I found instructions for this at a web-page (by Google)
>>>>>>>>  https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
>>>>>>>>
>>>>>>>> On that page there's a chapter that handles how to set native library location:
>>>>>>>>  3 Ways to set java.library.path in Eclipse IDE
>>>>>>>>
>>>>>>>> Now it is possible to run java-code with the embedded csound-code.
>>>>>>>>
>>>>>>>> 4 cmd-line run
>>>>>>>> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
>>>>>>>> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
>>>>>>>>
>>>>>>>> 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
>>>>>>>
>>>>>>> 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
>>>>>>
>>>>>> 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
>>>>>
>>>>> 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
>>>>
>>>> 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
>>>
>>> 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
>>
>> 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
>
> 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

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

Date2024-04-07 17:53
FromSteven Yi
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] csound-java-eclipse
Thanks for that, I'll note it for this work. I think that CsoundJNI is
still a csound6 binding at the moment and will treat it as such. The
Java FFI work I'll treat as experimental and targeting Csound7.

On Sun, Apr 7, 2024 at 11:51 AM Victor Lazzarini  wrote:
>
> Just a note of caution: it may not be worth doing a lot of work on this until we have a new API for 7.0.
>
> I expect a lot of consolidation as well as deletions will be on the way.
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> > On 7 Apr 2024, at 16:03, Steven Yi  wrote:
> >
> > *Warning*
> >
> > This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> >
> > Thanks for pointing those out, I'll note it for when I audit the code.
> > CsoundPerformanceThread is handy but it's also not as essential in
> > languages that have threads (e.g., compared to Python). I'll look at
> > having some kind of implementation of CsoundPerformanceThread
> > available.
> >
> >> On Sun, Apr 7, 2024 at 7:19 AM Risto Kuusisto  wrote:
> >>
> >> Thanks Steven,
> >> I noticed that in addition to CsoundPerformanceThread also CsoundMYFLTArray is missing.
> >> Then the generic GetChannelPtr as such is missing but instead of that getAudioChannelPtr and getControlChannelPtr
> >> are available.
> >>
> >> As a beginner I can't tell if those are important or not but it seems that the corresponding functions are also
> >> in use in the python-examples.
> >>
> >> I would guess that CsoundPerformanceThread is important if the instrument -section is very CPU-hungry.
> >>
> >> --Risto
> >>
> >> la 6. huhtik. 2024 klo 18.22 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>
> >>> Yes, that is something that is not implemented in CsoundJNI at this
> >>> time. I implemented the parts of the API that were necessary for Blue
> >>> and had not gone further. I use Java Threads with Csound objects
> >>> myself. I'll try to schedule some time to review API differences as
> >>> well as Java 22 FFI implementation, but until then a Thread that calls
> >>> cs.performKsmps() in a while-loop should do the job.
> >>>
> >>> On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto  wrote:
> >>>>
> >>>> So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
> >>>> I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
> >>>> I couldn't find a corresponding definition in CsoundJNI:
> >>>>
> >>>> // Create a new CsoundPerformanceThread, passing in the Csound object
> >>>>
> >>>> CsoundPerformanceThread t = new CsoundPerformanceThread(c);
> >>>>
> >>>>
> >>>> Any ideas ?
> >>>>
> >>>>
> >>>> --Risto
> >>>>
> >>>>
> >>>>
> >>>> ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>>>
> >>>>> We won't be using a csnd7.jar for Csound 7 and moving to either
> >>>>> CsoundJNI or using Java's latest FFI feature (though that would
> >>>>> require Java 22). As for CsoundJNI, it should work out of the box with
> >>>>> installed versions of Csound on Windows, Mac, and Linux, across a
> >>>>> number of different architectures. csnd6.jar requires having
> >>>>> libcsnd.so (I think that's the name?) and libcsound64.so on the
> >>>>> library path and that usually requires some extra configuration to get
> >>>>> right, while CsoundJNI has a list of common paths and just has to find
> >>>>> libcsound64.so (CsoundJNI includes the native lib it needs to call
> >>>>> libcsound64.so).
> >>>>>
> >>>>> You can get csnd6.jar to work, it just takes some extra configuration.
> >>>>>
> >>>>> (Actually this is a good reminder for me to get working on the Java
> >>>>> FFI version...)
> >>>>>
> >>>>> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto  wrote:
> >>>>>>
> >>>>>> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> >>>>>> So what are the benefits of using CsoundJNI instead of csnd6 ?
> >>>>>> I suppose csnd6 works also properly ?
> >>>>>>
> >>>>>> For Iain Duncan:
> >>>>>> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> >>>>>> by utlilising e.g. numpy in Python or Colt in Java.
> >>>>>>
> >>>>>> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> >>>>>> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
> >>>>>>
> >>>>>> --Risto
> >>>>>>
> >>>>>>
> >>>>>> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>>>>>
> >>>>>>> I'd recommend using my CsoundJNI for Java:
> >>>>>>>
> >>>>>>> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
> >>>>>>>
> >>>>>>> I use this in Blue and it's been working well for me. There's some
> >>>>>>> feature not implemented compared to csnd6.jar, but if you need
> >>>>>>> something just file an issue on github and can take a look.
> >>>>>>>
> >>>>>>> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto  wrote:
> >>>>>>>>
> >>>>>>>> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> >>>>>>>> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> >>>>>>>> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >>>>>>>>
> >>>>>>>> My background is control systems R&D for an automation system.
> >>>>>>>> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> >>>>>>>> (And Matlab/Octave)
> >>>>>>>> So maybe the decision was quite straightforward.
> >>>>>>>>
> >>>>>>>> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> >>>>>>>> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> >>>>>>>> (by the way, Eclipse could be utilised also for python-development)
> >>>>>>>>
> >>>>>>>> 1 Eclipse installation - standard, no problems
> >>>>>>>>
> >>>>>>>> 2 csnd6.jar
> >>>>>>>> 1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> >>>>>>>> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> >>>>>>>> I installed and told Eclipse where this library is located
> >>>>>>>> Now the java-code looks correct.
> >>>>>>>>
> >>>>>>>> 3 Run
> >>>>>>>> Trying to run - no success => (something like)
> >>>>>>>>  java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> >>>>>>>> This was not that easy anymore, because the actual location of the related c-code library is
> >>>>>>>>  /usr/lib/x86_64-linux-gnu/jni/.
> >>>>>>>> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> >>>>>>>> Fortunately I found instructions for this at a web-page (by Google)
> >>>>>>>>  https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >>>>>>>>
> >>>>>>>> On that page there's a chapter that handles how to set native library location:
> >>>>>>>>  3 Ways to set java.library.path in Eclipse IDE
> >>>>>>>>
> >>>>>>>> Now it is possible to run java-code with the embedded csound-code.
> >>>>>>>>
> >>>>>>>> 4 cmd-line run
> >>>>>>>> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> >>>>>>>> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >>>>>>>>
> >>>>>>>> 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
> >>>>>>>
> >>>>>>> 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
> >>>>>>
> >>>>>> 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
> >>>>>
> >>>>> 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
> >>>>
> >>>> 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
> >>>
> >>> 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
> >>
> >> 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
> >
> > 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
>
> 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

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

Date2024-04-08 14:57
FromRisto Kuusisto
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] csound-java-eclipse
The biggest advantage of CsoundJNI v.s. csnd6 is that the c-coded part is included in the .jar-file.
In the case of csnd6 when you know the location of that library-file, then I think there's no problem
to use csnd6. I suppose that feature will be included also in the future official .jar-file.

--Risto

su 7. huhtik. 2024 klo 19.53 Steven Yi (stevenyi@gmail.com) kirjoitti:
Thanks for that, I'll note it for this work. I think that CsoundJNI is
still a csound6 binding at the moment and will treat it as such. The
Java FFI work I'll treat as experimental and targeting Csound7.

On Sun, Apr 7, 2024 at 11:51 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>
> Just a note of caution: it may not be worth doing a lot of work on this until we have a new API for 7.0.
>
> I expect a lot of consolidation as well as deletions will be on the way.
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> > On 7 Apr 2024, at 16:03, Steven Yi <stevenyi@gmail.com> wrote:
> >
> > *Warning*
> >
> > This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> >
> > Thanks for pointing those out, I'll note it for when I audit the code.
> > CsoundPerformanceThread is handy but it's also not as essential in
> > languages that have threads (e.g., compared to Python). I'll look at
> > having some kind of implementation of CsoundPerformanceThread
> > available.
> >
> >> On Sun, Apr 7, 2024 at 7:19 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >>
> >> Thanks Steven,
> >> I noticed that in addition to CsoundPerformanceThread also CsoundMYFLTArray is missing.
> >> Then the generic GetChannelPtr as such is missing but instead of that getAudioChannelPtr and getControlChannelPtr
> >> are available.
> >>
> >> As a beginner I can't tell if those are important or not but it seems that the corresponding functions are also
> >> in use in the python-examples.
> >>
> >> I would guess that CsoundPerformanceThread is important if the instrument -section is very CPU-hungry.
> >>
> >> --Risto
> >>
> >> la 6. huhtik. 2024 klo 18.22 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>
> >>> Yes, that is something that is not implemented in CsoundJNI at this
> >>> time. I implemented the parts of the API that were necessary for Blue
> >>> and had not gone further. I use Java Threads with Csound objects
> >>> myself. I'll try to schedule some time to review API differences as
> >>> well as Java 22 FFI implementation, but until then a Thread that calls
> >>> cs.performKsmps() in a while-loop should do the job.
> >>>
> >>> On Tue, Apr 2, 2024 at 1:32 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >>>>
> >>>> So I started to try out CsoundJNI. The first tested piece of code was example4.java (by Steven Yi 2013.10.28) from the set of simple examples.
> >>>> I could modify the code quite easily to use CsoundJNI instead of csnd6 (some CAPS -> SMALLCAPS etc.) but here is one line where
> >>>> I couldn't find a corresponding definition in CsoundJNI:
> >>>>
> >>>> // Create a new CsoundPerformanceThread, passing in the Csound object
> >>>>
> >>>> CsoundPerformanceThread t = new CsoundPerformanceThread(c);
> >>>>
> >>>>
> >>>> Any ideas ?
> >>>>
> >>>>
> >>>> --Risto
> >>>>
> >>>>
> >>>>
> >>>> ti 2. huhtik. 2024 klo 18.36 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>>>
> >>>>> We won't be using a csnd7.jar for Csound 7 and moving to either
> >>>>> CsoundJNI or using Java's latest FFI feature (though that would
> >>>>> require Java 22). As for CsoundJNI, it should work out of the box with
> >>>>> installed versions of Csound on Windows, Mac, and Linux, across a
> >>>>> number of different architectures. csnd6.jar requires having
> >>>>> libcsnd.so (I think that's the name?) and libcsound64.so on the
> >>>>> library path and that usually requires some extra configuration to get
> >>>>> right, while CsoundJNI has a list of common paths and just has to find
> >>>>> libcsound64.so (CsoundJNI includes the native lib it needs to call
> >>>>> libcsound64.so).
> >>>>>
> >>>>> You can get csnd6.jar to work, it just takes some extra configuration.
> >>>>>
> >>>>> (Actually this is a good reminder for me to get working on the Java
> >>>>> FFI version...)
> >>>>>
> >>>>> On Mon, Apr 1, 2024 at 5:02 PM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >>>>>>
> >>>>>> If I understand correctly csnd6.jar is the "official" package for connecting java-code to csound.
> >>>>>> So what are the benefits of using CsoundJNI instead of csnd6 ?
> >>>>>> I suppose csnd6 works also properly ?
> >>>>>>
> >>>>>> For Iain Duncan:
> >>>>>> Concerning the UI in e.g. Pure Data or Max, both Python and Java can be easily used also for some challenging matrix/vector operations if needed
> >>>>>> by utlilising e.g. numpy in Python or Colt in Java.
> >>>>>>
> >>>>>> I don't know what do you mean by handling MIDI ? I was supposed to use csound for that.
> >>>>>> Actually my first simple test csd-file is reading in events from a MIDI-file to modify the value in an FLslider according to the MidiCC-value.
> >>>>>>
> >>>>>> --Risto
> >>>>>>
> >>>>>>
> >>>>>> ma 1. huhtik. 2024 klo 15.45 Steven Yi (stevenyi@gmail.com) kirjoitti:
> >>>>>>>
> >>>>>>> I'd recommend using my CsoundJNI for Java:
> >>>>>>>
> >>>>>>> https://central.sonatype.com/artifact/com.kunstmusik/CsoundJNI
> >>>>>>>
> >>>>>>> I use this in Blue and it's been working well for me. There's some
> >>>>>>> feature not implemented compared to csnd6.jar, but if you need
> >>>>>>> something just file an issue on github and can take a look.
> >>>>>>>
> >>>>>>> On Mon, Apr 1, 2024 at 7:46 AM Risto Kuusisto <rjzkuusisto@gmail.com> wrote:
> >>>>>>>>
> >>>>>>>> As a new-comer to csound world I was wondering to which direction I should proceed with the UI.
> >>>>>>>> Especially when it has been mentioned that there is not much interest anymore to develop or maintain the csound FL-functions.
> >>>>>>>> I suppose most people choose nowadays python and one of the available UI-kits for that purpose.
> >>>>>>>>
> >>>>>>>> My background is control systems R&D for an automation system.
> >>>>>>>> I have been working there e.g. by utilising both java and Eclipse. Also a very little amount of python.
> >>>>>>>> (And Matlab/Octave)
> >>>>>>>> So maybe the decision was quite straightforward.
> >>>>>>>>
> >>>>>>>> My system is Xubuntu 22.04 with Ubuntu Studio installed. So what happened then ?
> >>>>>>>> I wanted to tell about the required steps for those who choose Eclipse as an IDE for java-csound-coding.
> >>>>>>>> (by the way, Eclipse could be utilised also for python-development)
> >>>>>>>>
> >>>>>>>> 1 Eclipse installation - standard, no problems
> >>>>>>>>
> >>>>>>>> 2 csnd6.jar
> >>>>>>>> 1'st java example (example2) => problems because Eclipse can't find csnd6.jar.
> >>>>>>>> It turned out that this jar does not automatically come with UStudio but there's a separate package for that.
> >>>>>>>> I installed and told Eclipse where this library is located
> >>>>>>>> Now the java-code looks correct.
> >>>>>>>>
> >>>>>>>> 3 Run
> >>>>>>>> Trying to run - no success => (something like)
> >>>>>>>>  java.lang.UnsatisfiedLinkError: no native library in java.library.path.
> >>>>>>>> This was not that easy anymore, because the actual location of the related c-code library is
> >>>>>>>>  /usr/lib/x86_64-linux-gnu/jni/.
> >>>>>>>> I found the correct location, but how to tell about that to Eclipse, because the normal way with the jar-packages doesn't succeed ?
> >>>>>>>> Fortunately I found instructions for this at a web-page (by Google)
> >>>>>>>>  https://javarevisited.blogspot.com/2013/04/what-is-javalibrarypath-how-to-set-in-Eclipse.html#axzz8W5HHEJsO
> >>>>>>>>
> >>>>>>>> On that page there's a chapter that handles how to set native library location:
> >>>>>>>>  3 Ways to set java.library.path in Eclipse IDE
> >>>>>>>>
> >>>>>>>> Now it is possible to run java-code with the embedded csound-code.
> >>>>>>>>
> >>>>>>>> 4 cmd-line run
> >>>>>>>> There's still (at least?) one problem when I try to run the code with the default java-engine from the command-line.
> >>>>>>>> The java-version for that is older that the one in Eclipse, but his should be easy to take to account on the Eclipse-side.
> >>>>>>>>
> >>>>>>>> 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
> >>>>>>>
> >>>>>>> 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
> >>>>>>
> >>>>>> 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
> >>>>>
> >>>>> 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
> >>>>
> >>>> 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
> >>>
> >>> 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
> >>
> >> 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
> >
> > 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
>
> 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

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
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