| All of this stuff can be done in Python, either in Python opcodes or in
CsoundVST. Python has several very complete GUI toolkits (including FLTK and
wxWidgets). The Python widget callbacks can send events to Csound
instruments. A special instrument can be used to dispatch these events to
global variables or to other instruments.
I originally opposed carrying the FLTK opcodes over into Csound 5 but I
agreed because a number of people who actually use Csound for making music
were using them. I am sure we can find some reasonable way of accommodating
all the various threading issues with FLTK.
In the meantime, feel free to explore Python as a way of using Csound to its
fullest power.
----- Original Message -----
From: "steven yi"
To: "Csound Developers Discussion List"
Sent: Wednesday, January 19, 2005 10:58 PM
Subject: [CSOUND-DEV:5743] Re: FLTK threading changes
> Hi Matt,
>
> Thinking out loud, is this something we can do more simply, perhaps more
> simply?
> Say, maybe add a generic function, like csoundHostMessage(char *
> messageName, char ** values). The host then could do with the messages
> what it wishes. For FLTK, it could be something like:
>
> csoundHostMessage("FLTK_create_widget", ["window", "name of window",
> "etc."])
>
> Hosts would have their own implementations of the csoundHostMessage and
> could then be enabled to respond to those messsages or not.
> Having a generic system where only strings are passed would allow for some
> degree of future-proofing. Also, opcodes could be compiled and
> distributed with different hosts and if the host isn't compiled to use
> those messages things the user can be alerted.
> An extra opcode, csoundhostmessage, might be nice to have as well, as
> users can then manipulate messages they know (a bit dangerous, but
> potentially useful).
>
> Perhaps also there can be host plugins that can add themselves as
> hostMessage handlers, but that might go into the realm of
> over-architcture. =)
>
> Any thoughts?
> steven
>
>
> Matt J. Ingalls wrote:
>
>>
>> i still advocate using a generic control system at the 'csoundlib' level.
>> i think FLTK opcodes could be modified to go through the API and still be
>> backwards compatilble. something like:
>>
>> the API would have to include some FLTK creation functions. Then 'host'
>> applications [including console versions] could create the widgets [FTLK
>> or maybe even something else if certain developers might think they are
>> too ugly or something]. host application would do its own threading.
>>
>> if all this is unclear i would be happy to provide a more detailed
>> example of what things would look like on the user, csoundlib, and
>> hostapp sides.
>>
>>
>> and for the record,
>> what i do in maccsound is run the GUI (carbon not cocoa) stuff in the
>> application thread and all of csoundlib in another [the audio callback
>> for real-time apps]
>>
>>
>> -m
>>
>>
>>
>>
>> On Wed, 19 Jan 2005, John D. Ramsdell wrote:
>>
>>> Victor Lazzarini writes:
>>>
>>>> Wouldn't MacCsound also be one case to consider?
>>>
>>>
>>> Yes, any Mac specific issues will be need to be considered. Let us
>>> figure out the Windows situation, and then we'll get back to you
>>> looking for help with Macs.
>>>
>>> John
>>>
>>>> At 16:34 19/01/2005, you wrote:
>>>>
>>>>> Victor Lazzarini writes:
>>>>>
>>>>>> I think it's important to decide now about the FLTK threading
>>>>>> issues. John Ramsdell can implement the necessary changes
>>>>>> to make it thread-safe. Let's do it!
>>>>>
>>>>>
>>>>> Michael and I are corresponding privately on this topic. We are
>>>>> sorting out the situation with VST plugins, and wrinkle I had not
>>>>> previously considered. We'll get back to you all when the two of us
>>>>> think we have a design that allows libcsound to handle the three cases
>>>>> of console Csound, GUI Csound, and VST plugin Csound.
>>>>>
>>>>> John
>>>>
>>>>
>>>> Victor Lazzarini
>>>> Music Technology Laboratory
>>>> Music Department
>>>> National University of Ireland, Maynooth
>>>
>>>
>>>
>>
>>
>>
>
> |