1 //=============================================================================
2 //  MuseScore
3 //  Linux Music Score Editor
4 //
5 //  Copyright (C) 2002-2016 Werner Schweer and others
6 //
7 //  This program is free software; you can redistribute it and/or modify
8 //  it under the terms of the GNU General Public License version 2.
9 //
10 //  This program is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //  GNU General Public License for more details.
14 //
15 //  You should have received a copy of the GNU General Public License
16 //  along with this program; if not, write to the Free Software
17 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __MIXERTRACKITEM_H__
21 #define __MIXERTRACKITEM_H__
22 
23 #include "libmscore/instrument.h"
24 #include <memory>
25 
26 namespace Ms {
27 
28 class Part;
29 class Instrument;
30 class Channel;
31 class MidiMapping;
32 class MixerTrackItem;
33 
34 typedef std::shared_ptr<MixerTrackItem> MixerTrackItemPtr;
35 //typedef MixerTrackItem* MixerTrackItemPtr;
36 
37 //---------------------------------------------------------
38 //   MixerTrackItem
39 //---------------------------------------------------------
40 
41 class MixerTrackItem
42       {
43 public:
44       enum class TrackType { PART, CHANNEL };
45 
46 private:
47       TrackType _trackType;
48       Part* _part;
49 
50       Instrument* _instr;
51       Channel* _chan;
52 
53       Channel* playbackChannel(const Channel* channel);
54 
55 public:
56       MixerTrackItem(TrackType tt, Part* part, Instrument* _instr, Channel* _chan);
57 
trackType()58       TrackType trackType() { return _trackType; }
part()59       Part* part() { return _part; }
instrument()60       Instrument* instrument() { return _instr; }
chan()61       Channel* chan() { return _chan; }
62       Channel* focusedChan();
63       MidiMapping *midiMap();
64       int color();
65 
66       void setColor(int valueRgb);
67       void setVolume(char value);
68       void setPan(char value);
69       void setChorus(char value);
70       void setReverb(char value);
71 
72       void setMute(bool value);
73       void setSolo(bool value);
74       };
75 }
76 
77 #endif // __MIXERTRACKITEM_H__
78