summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/muse/mstrip.h
blob: 058884dbcbf18005582acff1dc1e64930e42bf8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
//=============================================================================
//  MusE
//  Linux Music Editor
//  $Id:$
//
//  Copyright (C) 2002-2006 by Werner Schweer and others
//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License version 2.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================

#ifndef __MSTRIP_H__
#define __MSTRIP_H__

#include "strip.h"

namespace Awl {
      class MidiMeterSlider;
      class MidiMeter;
      class FloatEntry;
      class MidiVolEntry;
      class Knob;
      };

class MidiTrack;
class MidiOutPort;
class MidiInPort;
class MidiChannel;
class MidiSynti;

//---------------------------------------------------------
//   MidiStrip
//---------------------------------------------------------

class MidiStrip : public Strip {
      Q_OBJECT

      Awl::MidiMeterSlider* slider;
      Awl::MidiVolEntry* sl;
      QToolButton* iR;
      QToolButton* oR;

      struct KNOB {
            Awl::Knob* knob;
            Awl::FloatEntry* dl;
            QLabel* lb;
            } controller[4];    // pan variation reverb chorus

      bool volumeTouched;
      bool panTouched;
      bool reverbSendTouched;
      bool variSendTouched;
      bool chorusSendTouched;

      void addKnob(int ctrl, int idx, const QString&, const QString&, const char*, bool, int row);

   private slots:
      virtual void controllerChanged(int id);
      void ctrlChanged(double val, int num);
      void muteToggled(bool);
      void soloToggled(bool);
      void autoChanged();
      void sliderPressed(int);
      void sliderReleased(int);
      void autoReadToggled(bool);
      void autoWriteToggled(bool);
      void iRouteShow();
      void oRouteShow();
      void recordToggled(bool);
      void monitorToggled(bool);
      QMenu* sendMenu() const { return static_cast<QMenu*>(sender()); }

   public slots:
      virtual void songChanged(int);

   public:
      MidiStrip(Mixer*, MidiTrack*, bool align = true);
      virtual void heartBeat();
      };

//---------------------------------------------------------
//   MidiOutPortStrip
//---------------------------------------------------------

class MidiOutPortStrip : public Strip {
      Q_OBJECT

      Awl::MidiMeterSlider* slider;
      Awl::MidiVolEntry* sl;
      QToolButton* oR;
      QToolButton* iR;
      SimpleButton* sync;

      bool volumeTouched;

   private slots:
      virtual void controllerChanged(int id);
      void ctrlChanged(double val, int num);
      void muteToggled(bool);
      void soloToggled(bool);
      void autoChanged();
      void sliderPressed(int);
      void sliderReleased(int);
      void autoReadToggled(bool);
      void autoWriteToggled(bool);
      void iRouteShow();
      void oRouteShow();
      void syncToggled(bool) const;

   public slots:
      virtual void songChanged(int);

   public:
      MidiOutPortStrip(Mixer*, MidiOutPort*, bool align = true);
      virtual void heartBeat();
      };

//---------------------------------------------------------
//   MidiSyntiStrip
//---------------------------------------------------------

class MidiSyntiStrip : public Strip {
      Q_OBJECT

      Awl::MidiMeterSlider* slider;
      Awl::MidiVolEntry* sl;
      QToolButton* iR;
      QToolButton* oR;

      bool volumeTouched;

   private slots:
      virtual void controllerChanged(int id);
      void ctrlChanged(double val, int num);
      void muteToggled(bool);
      void soloToggled(bool);
      void autoChanged();
      void sliderPressed(int);
      void sliderReleased(int);
      void autoReadToggled(bool);
      void autoWriteToggled(bool);
      void iRouteShow();
      void oRouteShow();

   public slots:
      virtual void songChanged(int);

   public:
      MidiSyntiStrip(Mixer*, MidiSynti*, bool align = true);
      virtual void heartBeat();
      };

//---------------------------------------------------------
//   MidiInPortStrip
//---------------------------------------------------------

class MidiInPortStrip : public Strip {
      Q_OBJECT

      bool activity[MIDI_CHANNELS];
      QPixmap* activityOn;
      QPixmap* activityOff;
      QLabel* channelActivity[MIDI_CHANNELS];
      QToolButton* iR;
      QToolButton* oR;
      MidiInPort* inport() const { return (MidiInPort*)track; }

   private slots:
      void muteToggled(bool);
      void soloToggled(bool);
      void iRouteShow();
      void oRouteShow();

   public slots:
      virtual void songChanged(int);

   public:
      MidiInPortStrip(Mixer*, MidiInPort*, bool align = true);
      virtual void heartBeat();
      };

#endif