#include "translator.icc"
+using std::string;
+
/**
MIDI control function performer. Announces "set property" events on MIDI
context properties.
{
public:
TRANSLATOR_DECLARATIONS (Midi_control_function_performer);
- DECLARE_LISTENER (announce_function_value_change);
+ void announce_function_value_change (SCM);
~Midi_control_function_performer ();
void connect_to_context (Context *c);
Midi_control_function_performer::connect_to_context (Context *c)
{
c->events_below ()->
- add_listener (GET_LISTENER (announce_function_value_change),
+ add_listener (GET_LISTENER (Midi_control_function_performer, announce_function_value_change),
ly_symbol2scm ("SetProperty"));
}
Midi_control_function_performer::disconnect_from_context (Context *c)
{
c->events_below ()->
- remove_listener (GET_LISTENER (announce_function_value_change),
+ remove_listener (GET_LISTENER (Midi_control_function_performer, announce_function_value_change),
ly_symbol2scm ("SetProperty"));
}
-IMPLEMENT_LISTENER (Midi_control_function_performer,
- announce_function_value_change)
void
Midi_control_function_performer::announce_function_value_change (SCM sev)
{
- Stream_event *ev = Stream_event::unsmob (sev);
+ Stream_event *ev = unsmob<Stream_event> (sev);
SCM sym = ev->get_property ("symbol");
if (!scm_is_symbol (sym))
return;