Csound Csound-dev Csound-tekno Search About

[Cs-dev] widgets and OSX

Date2005-10-11 15:14
FromVictor Lazzarini
Subject[Cs-dev] widgets and OSX
I have been trying to debug the threading version of libwidgets and
so far no luck.  The problem as far as I can tell is with FL:wait and
the calls it makes to OSX-specific functions. So it seems to be
a problem with FLTK.  I'm not confident of it being thread-safe.

As far as I can see, they are no longer developing versions 1.1.x,
so I am not sure what the chances are
for bug fixes, but we can try and ask them. Migrating to 2.0 means
lots of code changes.

The non-threading version works, but it can cause
glitches on use (when moving from one window to another), which
while not completely objectionable, is problematic.

If I can remember well, problems started when widgets etc were
moved out of the program to a loadable module. My question is,
and perhaps David Akbari can answer it, does the old code
work well (ie. with threads) on OSX 10.4 or does it have the
same problems?

In any case, responding to John ffitch's suggestion, perhaps we
might think that in order to release csound5, the best way to go
is to offer FLTK statically linked. At the moment it can be statically
linked to libwidgets, but perhaps if we move the FLTK back into
csound, it will work on all platforms, if that's indeed where the
problem lies. Again, this sounds counter-intuitive, as it should
not matter whether the code is statically-linked or whether it
lies in a dynamic lib.

Victor


Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-11 15:33
FromDavid Akbari
SubjectRe: [Cs-dev] widgets and OSX
On Oct 11, 2005, at 10:14 AM, Victor Lazzarini wrote:

> My question is,
> and perhaps David Akbari can answer it, does the old code
> work well (ie. with threads) on OSX 10.4 or does it have the
> same problems?
>

When Dr. B and I were in Los Angeles (this was in late June) I copied 
all of the files (executables, opcode .dylibs, etc) from a "stable 
build" of canonical Csound5 from May 16 2005 to his 10.4 machine.

This version was built with FLTK threading ENABLED and was from when 
Csound5 still compiled with a statically linked FLTK module. I remember 
that it worked "perfectly" or at least as expected. We were running the 
Hammond B3 patch, some of Art Hunkins CsoundAV pieces, ImproSculpt and 
Density (an old version that I retrofitted, so not the last release 
which had some snapshot loading issues...)

I've found the 'glitching' you describe has always happened with 
Csound5 when the computer receives interrupt commands (onMouseDown 
etc). I think this is because the shell is run inside the Terminal.app 
because when I log out (Apple + Shift + Q) and type ">console" as the 
User Name in the login window (going to full console mode) and run 
Csound5, I do not get the glitches onMouseDown 

I'm still running 10.3.9 though, and related to this discussion, I 
currently build _with_ FLTK threads on 10.3.9 and everything works as 
expected (from today's CVS sources at least) which has the dynamically 
linked FLTK module.


-David



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-11 15:38
FromDavid Akbari
SubjectRe: [Cs-dev] widgets and OSX
...and actually here's the suite of test Csound files we were using to 
test FLTK widgest on Mac OSX Tiger ... for you Victor and anyone else 
who is interested!

http://www.csounds.com/akbari/Cs5-diagnostics.zip

Note: These all worked smoothly on Mac OS 10.4 with the static FLTK.

-David



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-12 13:02
FromIstvan Varga
SubjectRe: [Cs-dev] widgets and OSX
Victor Lazzarini wrote:

> As far as I can see, they are no longer developing versions 1.1.x,
> so I am not sure what the chances are
> for bug fixes, but we can try and ask them. Migrating to 2.0 means
> lots of code changes.

Still, it is probably the right way to fix the problems if
1.1.x is deprecated and no longer maintained. Moving all the FLTK
related code back into the main library to fix Mac specific
issues should work in the case of the simple command line
frontend, even though I do not really like this idea, but it
should be noted that libcsound itself may also be compiled as
a shared library (one possible example is csoundapi~), and then
the FLTK problems are expected to appear again. However, if
the widget opcodes do work correctly in csoundapi~, despite the
fact that it is also a dynamic library, then either it is building
as a bundle instead of a dylib that makes the difference (I am not
familiar with Mac platforms, so only guessing), or there are some
bugs in SConstruct related to Mac specific flags for the widgets
library.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-12 14:35
FromVictor Lazzarini
SubjectRe: [Cs-dev] widgets and OSX
As far as I have tested the widget opcodes do not work from
csoundapi~ or, as I have been testing now, from a wish frontend.
This appears to be a unconnected problem, but it might not be
so. The widgets are operational, ie. they take input, but they don't
give any visual feedback (buttons don't light up, knobs don' turn).
This looks like a windowing system issue (with Acqua).

I can't really see how the static versus dynamic linking can
affect the working of the library, but it could be a bundle versus
dylib issue. I have to look at the Mac-specific flags to see if
anything can be done.

Perhaps a solution is to try an X-version of the widgets, but
again, it's a little imposing on the user.

Victor

At 13:02 12/10/2005, you wrote:
>Still, it is probably the right way to fix the problems if
>1.1.x is deprecated and no longer maintained. Moving all the FLTK
>related code back into the main library to fix Mac specific
>issues should work in the case of the simple command line
>frontend, even though I do not really like this idea, but it
>should be noted that libcsound itself may also be compiled as
>a shared library (one possible example is csoundapi~), and then
>the FLTK problems are expected to appear again. However, if
>the widget opcodes do work correctly in csoundapi~, despite the
>fact that it is also a dynamic library, then either it is building
>as a bundle instead of a dylib that makes the difference (I am not
>familiar with Mac platforms, so only guessing), or there are some
>bugs in SConstruct related to Mac specific flags for the widgets
>library.

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-12 15:25
FromDavid Akbari
SubjectRe: [Cs-dev] widgets and OSX
On Oct 12, 2005, at 9:35 AM, Victor Lazzarini wrote:

> Perhaps a solution is to try an X-version of the widgets, but
> again, it's a little imposing on the user.
>
> Victor
>
>

Actually it's increasingly less so with programs like XDarwin

http://www.xdarwin.org/

Which can be run in "Rootless" mode and really doesn't seem to impose 
too much on the user as the background is the Aqua interface so 
integration between both window systems is much smoother than with just 
vanilla X11 (which ships with OSX).

In any event, I'm certainly not opposed to the X-window widgets...


-David



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-12 17:18
FromDavid Akbari
SubjectRe: [Cs-dev] widgets and OSX
On Oct 12, 2005, at 8:02 AM, Istvan Varga wrote:

> However, if
> the widget opcodes do work correctly in csoundapi~, despite the
> fact that it is also a dynamic library,

Perhaps the way in which I worded things was the source of some 
confusion. To clarify:

I meant that the FLTK widget opcodes were compiled into the static 
Csound lib (libcsound.a). Perhaps it was mistaken to have compiled it 
as a dynamic library using compiler flags.

For pedagogical reference I have put the build in question (May 16 2005 
CVS) with the FLTK that works on Mac OS 10.4.x at the following 
hyperlink

http://www.csounds.com/akbari/csound5-staticFLTK.zip

Victor, possibly you can check and see if the behavior is as expected 
or differs from that of your current CVS builds...? In any event I 
posted that .zip file for any curious developer who is interested. I 
have included in that archive all the libs (FLTK static libs, 
libportmidi etc). Hopefully this will help be of some use and/or answer 
some questions.


-David



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-13 10:22
FromIstvan Varga
SubjectRe: [Cs-dev] widgets and OSX
David Akbari wrote:

> I meant that the FLTK widget opcodes were compiled into the static 
> Csound lib (libcsound.a). Perhaps it was mistaken to have compiled it as 
> a dynamic library using compiler flags.

The Csound library can be dynamic, even if it is static by default.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-13 10:37
FromVictor Lazzarini
SubjectRe: [Cs-dev] widgets and OSX
I'll have a look at it in terms of OSX performance, thanks, but it might not
be until next week.

Perhaps someone else (Istvan?) can also diff it with the new version
to see what is different in the widget source codes (apart from
the code that allows it to be dynamically loaded).

Victor

At 17:18 12/10/2005, you wrote:

>On Oct 12, 2005, at 8:02 AM, Istvan Varga wrote:
>
>>However, if
>>the widget opcodes do work correctly in csoundapi~, despite the
>>fact that it is also a dynamic library,
>
>Perhaps the way in which I worded things was the source of some confusion. 
>To clarify:
>
>I meant that the FLTK widget opcodes were compiled into the static Csound 
>lib (libcsound.a). Perhaps it was mistaken to have compiled it as a 
>dynamic library using compiler flags.
>
>For pedagogical reference I have put the build in question (May 16 2005 
>CVS) with the FLTK that works on Mac OS 10.4.x at the following hyperlink
>
>http://www.csounds.com/akbari/csound5-staticFLTK.zip
>
>Victor, possibly you can check and see if the behavior is as expected or 
>differs from that of your current CVS builds...? In any event I posted 
>that .zip file for any curious developer who is interested. I have 
>included in that archive all the libs (FLTK static libs, libportmidi etc). 
>Hopefully this will help be of some use and/or answer some questions.
>
>
>-David
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by:
>Power Architecture Resource Center: Free content, downloads, discussions,
>and more. http://solutions.newsforge.com/ibmarch.tmpl
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-13 14:54
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] widgets and OSX
I spent a little time last time attempting to find out what has
changed in FLTK 2 but there seem not to be such information
available.  The web pages also suggested that 1.1.6 is the stable
version and 2 is still in nightly snapshots.
==John ffitch


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net