Re: [linux-audio-dev] ladspa plugin GUI proposal

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] ladspa plugin GUI proposal
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Wed May 24 2000 - 21:03:45 EEST


In message <Pine.LNX.4.10.10005241026130.22194-100000_AT_luca.pas.lab>you write:
>> This is the wrong way around, I think, for LADSPA. The ports are
>> simple, indivisible data types (e.g. float), for efficiency's
>> sake. There is no way to connect anything to them and expect any kind
>> of notification that they've changed. This is why your point about
>> having the host construct and run the GUI is well-taken: it can both
>> drive the port values when relevant GUI events happen, and drive both
>> the GUI and the port values in the case of automated playback of
>> events.
>
>I don't see a way around it.
>What other mechanisms are there but:
>
>1. the LADSPA format specifies "control changed hooks" (a way to add
> a function pointer to connect_port)
>2. the sound-data reader (read host) observes when the controls change
> and does something standardized with them (emits a signal or whatever)
>3. the ui polls the port. (polling sucks)

4. a: when the (G)UI generates an event that leads to a port value change,
      the host (G)UI thread does something to cause the value to
      change, and sends a notification to any interested parties that this
      happened (think GTK+, or better yet, libsigc++).

   b: when data arrives from elsewhere that can lead to a port value
      change, the data source is already hooked into the main event
      loop of the (G)UI thread, and so this is handled just like in
      case (a). This is how Quasimodo and Ardour handle incoming
      MIDI data, for example. This avoids cross-thread issues with
      the (G)UI library. For some programs (e.g. SoftWerk) this leads
      to too much latency in the MIDI data flow, and so something
      a bit more sophisticated has to be done. (Actually, SoftWerk
      uses parameters with "two sides": the actual data value and
      a "touched" flag. The GUI polls the touched flags, and updates
      screen values as appropriate).

   c: when using automation data, the host (G)UI thread sends notifications
      about the changes, and does something to cause the value to
      change. Possibly with some automation playback schemes, this
      might look somewhat like (b).

Whats the problem ?


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed May 24 2000 - 22:05:33 EEST