Re: [linux-audio-dev] Midi/OSC help - Continuous controllers

From: Olivier Guilyardi <ml@email-addr-hidden>
Date: Thu Jun 30 2005 - 13:20:06 EEST

Alfons Adriaensen wrote:
> On Wed, Jun 29, 2005 at 10:46:55AM -0400, Paul Coccoli wrote:
>
>
>>On 6/28/05, Olivier Guilyardi <ml@email-addr-hidden> wrote:
>>
>>
>>>I believe there could exist a library with which :
>>>1 - you instantiate a core object (providing the alsa midi port as an arg)
>>>2 - you "attach" to some widgets : sliders, spin buttons, etc.. (note that this
>>>is different from extending (bloating) widgets)
>>>3 - you may call a function to enter the capture-mode
>>>4 - 100 % of this capture-mode is encapsulated by the library : knobs-to-widgets
>>>assignations are handled transparently
>>>5 - there is some way to retrieve these assignations to recall them later
>>>
>>
>>You seem to really like this idea. Why don't you just do it and see
>>if it works well? I have an unfounded hunch that it won't, since you
>>usually want your GUI running in a lower priority thread.

Needs checking indeed... Spawning an additionnal thread may be required. The
reason why I don't "just do it" is because discussing implementations ideas
before coding has been of great benefit to me in the past, especially here in
LAD...

> Yes, and you'd force the widgets to update for each message sent by
> a knob, even if there are 1000 such messages per second, which is absurd
> and could easily freeze the entire application.

Why ? I can cache/compare values before asking the widget to update.

> It's also not a general model. What if you want to link to GUIs, or
> two HW controllers ?

Two controllers (mtk: midi toolkit) :
c1 = midibind_new();
c2 = midibind_new();

That would open two input midi ports (and maybe create two threads).

Then you could attach to whatever widget you like :

mtk_attach_gtk_hscale (c1, gui1->hscale);
mtk_attach_gtk_vscale (c2, gui1->vscale);
mtk_attach_gtk_hscale (c2, gui2->hscale);
...

> The association should be done in the 'server' part of the model, i.e.
> that part which provides the interface to all controllers and viewers.
> In the MVC structure, a GUI is just a controller/viewer as any other.
> It does not play any central role.

I know what you mean. But I tend to keep my distances with such academic
considerations.

Thanks for your input and criticism.

--
   og
Received on Thu Jul 7 16:16:31 2005

This archive was generated by hypermail 2.1.8 : Thu Jul 07 2005 - 16:16:31 EEST