Mixer: Display realtime parameter changes (initiated via automation or GUI) in Module_Parameter_Editor
This commit is contained in:
parent
b852f977ae
commit
9ff41fe8fa
|
@ -191,13 +191,22 @@ Module::paste_before ( void )
|
|||
m->copy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
Module::handle_control_changed ( Port *p )
|
||||
{
|
||||
if ( _editor )
|
||||
_editor->handle_control_changed ( p );
|
||||
}
|
||||
|
||||
char *
|
||||
Module::Port::generate_osc_path ()
|
||||
{
|
||||
const Port *p = this;
|
||||
|
||||
char *path;
|
||||
char *path = NULL;
|
||||
|
||||
// /mixer/strip/STRIPNAME/control/MODULENAME/CONTROLNAME
|
||||
|
||||
|
@ -237,11 +246,9 @@ Module::Port::change_osc_path ( char *path )
|
|||
|
||||
if ( path )
|
||||
{
|
||||
_osc_path_cv = (char*)malloc( strlen( path ) + 4 );
|
||||
_osc_path_cv[0] = 0;
|
||||
_osc_path_cv = NULL;
|
||||
|
||||
strcpy( _osc_path_cv, path );
|
||||
strcat( _osc_path_cv, "/unscaled" );
|
||||
asprintf( &_osc_path_cv, "%s/unscaled", path );
|
||||
|
||||
mixer->osc_endpoint->add_method( path, "f", &Module::Port::osc_control_change_cv, this, "value" );
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ public:
|
|||
|
||||
/* called whenever the value of a control port is changed.
|
||||
This can be used to take appropriate action from the GUI thread */
|
||||
virtual void handle_control_changed ( Port * ) { }
|
||||
virtual void handle_control_changed ( Port * );
|
||||
|
||||
/* called whenever the name of the chain changes (usually because
|
||||
* the name of the mixer strip changed). */
|
||||
|
|
|
@ -168,7 +168,6 @@ Module_Parameter_Editor::make_controls ( void )
|
|||
o->selection_color( FL_GREEN );
|
||||
o->type( FL_TOGGLE_BUTTON );
|
||||
o->value( p->control_value() );
|
||||
|
||||
}
|
||||
else if ( p->hints.type == Module::Port::Hints::INTEGER )
|
||||
{
|
||||
|
@ -370,6 +369,19 @@ Module_Parameter_Editor::bind_control ( int i )
|
|||
_module->redraw();
|
||||
}
|
||||
|
||||
/* Display changes initiated via automation or from other parts of the GUI */
|
||||
void
|
||||
Module_Parameter_Editor::handle_control_changed ( Module::Port *p )
|
||||
{
|
||||
int i = _module->control_input_port_index( p );
|
||||
|
||||
Fl_Group *g = (Fl_Group*)control_pack->child( i );
|
||||
Fl_Group *g2 = (Fl_Group*)g->child( 0 );
|
||||
Fl_Valuator *v = (Fl_Valuator*)g2->child( 0 );
|
||||
|
||||
v->value( p->control_value() );
|
||||
}
|
||||
|
||||
void
|
||||
Module_Parameter_Editor::set_value (int i, float value )
|
||||
{
|
||||
|
|
|
@ -67,6 +67,8 @@ class Module_Parameter_Editor : public Fl_Double_Window
|
|||
|
||||
public:
|
||||
|
||||
void handle_control_changed ( Module::Port *p );
|
||||
|
||||
Module_Parameter_Editor ( Module *module );
|
||||
virtual ~Module_Parameter_Editor ( );
|
||||
};
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace OSC
|
|||
|
||||
lo_server_add_method( _server, path, typespec, handler, user_data );
|
||||
|
||||
char *stored_path;
|
||||
char *stored_path = NULL;
|
||||
|
||||
asprintf( &stored_path, "%s (%s); %s", path, typespec, argument_description );
|
||||
|
||||
|
|
Loading…
Reference in New Issue