explicitly drop connections from destructor
[ardour.git] / libs / surfaces / launch_control_xl / leds.cc
1 #include <algorithm>
2
3 #include "launch_control_xl.h"
4 #include "pbd/compose.h"
5 #include "pbd/convert.h"
6 #include "pbd/debug.h"
7 #include "pbd/failed_constructor.h"
8 #include "pbd/file_utils.h"
9 #include "pbd/search_path.h"
10 #include "pbd/enumwriter.h"
11
12 #include "midi++/parser.h"
13
14 #include "temporal/time.h"
15 #include "temporal/bbt_time.h"
16
17 #include "ardour/amp.h"
18 #include "ardour/async_midi_port.h"
19 #include "ardour/audioengine.h"
20 #include "ardour/debug.h"
21 #include "ardour/midiport_manager.h"
22 #include "ardour/midi_track.h"
23 #include "ardour/midi_port.h"
24 #include "ardour/session.h"
25 #include "ardour/tempo.h"
26 #include "ardour/types_convert.h"
27 #include "ardour/vca_manager.h"
28
29 #include "gui.h"
30
31 #include "pbd/i18n.h"
32
33 using namespace ArdourSurface;
34 using namespace ARDOUR;
35 using namespace std;
36 using namespace PBD;
37
38 MidiByteArray
39 LaunchControlXL::SelectButton::state_msg(bool light) const {
40   uint8_t velocity = ( color() + flag() ) * light;
41   return MidiByteArray (11, 0xF0, 0x00, 0x20, 0x29, 0x02, 0x11, 0x78, lcxl->template_number(), index(), velocity, 0xF7);
42 }
43
44 MidiByteArray
45 LaunchControlXL::TrackButton::state_msg(bool light) const {
46   uint8_t velocity = ( color() + flag() ) * light;
47   return MidiByteArray (11, 0xF0, 0x00, 0x20, 0x29, 0x02, 0x11, 0x78, lcxl->template_number(), index(), velocity, 0xF7);
48
49 }
50
51 MidiByteArray
52 LaunchControlXL::TrackStateButton::state_msg(bool light) const {
53   uint8_t velocity = ( color() + flag() ) * light;
54   return MidiByteArray (11, 0xF0, 0x00, 0x20, 0x29, 0x02, 0x11, 0x78, lcxl->template_number(), index(), velocity, 0xF7);
55
56 }
57
58 MidiByteArray
59 LaunchControlXL::Knob::state_msg(bool light) const {
60   uint8_t velocity = ( color() + flag() ) * light;
61   return MidiByteArray (11, 0xF0, 0x00, 0x20, 0x29, 0x02, 0x11, 0x78, lcxl->template_number(), index(), velocity, 0xF7);
62 }