summaryrefslogtreecommitdiff
path: root/libs/midi++2/channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/midi++2/channel.cc')
-rw-r--r--libs/midi++2/channel.cc50
1 files changed, 18 insertions, 32 deletions
diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc
index 9e339654b4..bf71b0579c 100644
--- a/libs/midi++2/channel.cc
+++ b/libs/midi++2/channel.cc
@@ -35,44 +35,30 @@ Channel::Channel (byte channelnum, Port &p) : _port (p)
void
Channel::connect_input_signals ()
{
- add_connection (_port.input()->channel_pressure[_channel_number].connect
- (boost::bind (&Channel::process_chanpress, this, _1, _2)));
- add_connection (_port.input()->channel_note_on[_channel_number].connect
- (boost::bind (&Channel::process_note_on, this, _1, _2)));
- add_connection (_port.input()->channel_note_off[_channel_number].connect
- (boost::bind (&Channel::process_note_off, this, _1, _2)));
- add_connection (_port.input()->channel_poly_pressure[_channel_number].connect
- (boost::bind (&Channel::process_polypress, this, _1, _2)));
- add_connection (_port.input()->channel_program_change[_channel_number].connect
- (boost::bind (&Channel::process_program_change, this, _1, _2)));
- add_connection (_port.input()->channel_controller[_channel_number].connect
- (boost::bind (&Channel::process_controller, this, _1, _2)));
- add_connection (_port.input()->channel_pitchbend[_channel_number].connect
- (boost::bind (&Channel::process_pitchbend, this, _1, _2)));
-
- add_connection (_port.input()->reset.connect (boost::bind (&Channel::process_reset, this, _1)));
+ _port.input()->channel_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_chanpress, this, _1, _2));
+ _port.input()->channel_note_on[_channel_number].connect (*this, boost::bind (&Channel::process_note_on, this, _1, _2));
+ _port.input()->channel_note_off[_channel_number].connect (*this, boost::bind (&Channel::process_note_off, this, _1, _2));
+ _port.input()->channel_poly_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_polypress, this, _1, _2));
+ _port.input()->channel_program_change[_channel_number].connect (*this, boost::bind (&Channel::process_program_change, this, _1, _2));
+ _port.input()->channel_controller[_channel_number].connect (*this, boost::bind (&Channel::process_controller, this, _1, _2));
+ _port.input()->channel_pitchbend[_channel_number].connect (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2));
+
+ _port.input()->reset.connect (*this, boost::bind (&Channel::process_reset, this, _1));
}
void
Channel::connect_output_signals ()
{
- add_connection (_port.output()->channel_pressure[_channel_number].connect
- (boost::bind (&Channel::process_chanpress, this, _1, _2)));
- add_connection (_port.output()->channel_note_on[_channel_number].connect
- (boost::bind (&Channel::process_note_on, this, _1, _2)));
- add_connection (_port.output()->channel_note_off[_channel_number].connect
- (boost::bind (&Channel::process_note_off, this, _1, _2)));
- add_connection (_port.output()->channel_poly_pressure[_channel_number].connect
- (boost::bind (&Channel::process_polypress, this, _1, _2)));
- add_connection (_port.output()->channel_program_change[_channel_number].connect
- (boost::bind (&Channel::process_program_change, this, _1, _2)));
- add_connection (_port.output()->channel_controller[_channel_number].connect
- (boost::bind (&Channel::process_controller, this, _1, _2)));
- add_connection (_port.output()->channel_pitchbend[_channel_number].connect
- (boost::bind (&Channel::process_pitchbend, this, _1, _2)));
-
- add_connection (_port.output()->reset.connect (boost::bind (&Channel::process_reset, this, _1)));
+ _port.output()->channel_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_chanpress, this, _1, _2));
+ _port.output()->channel_note_on[_channel_number].connect (*this, boost::bind (&Channel::process_note_on, this, _1, _2));
+ _port.output()->channel_note_off[_channel_number].connect (*this, boost::bind (&Channel::process_note_off, this, _1, _2));
+ _port.output()->channel_poly_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_polypress, this, _1, _2));
+ _port.output()->channel_program_change[_channel_number].connect (*this, boost::bind (&Channel::process_program_change, this, _1, _2));
+ _port.output()->channel_controller[_channel_number].connect (*this, boost::bind (&Channel::process_controller, this, _1, _2));
+ _port.output()->channel_pitchbend[_channel_number].connect (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2));
+
+ _port.output()->reset.connect (*this, boost::bind (&Channel::process_reset, this, _1));
}
void