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
|
//=============================================================================
// 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 __MIDITRANSFORM_H__
#define __MIDITRANSFORM_H__
#include "widgets/transformbase.h"
class MidiTransformation;
class MidiTransformPrivate;
class Event;
class Part;
namespace AL {
class Xml;
};
using AL::Xml;
enum ValOp {
All=0, Ignore=0, Equal=1, Unequal=2, Higher=3, Lower=4,
Inside=5, Outside=6
};
enum TransformFunction {
Select, Quantize, Delete, Transform, Insert, Copy, Extract
};
enum TransformOperator {
Keep, Plus, Minus, Multiply, Divide, Fix, Value, Invert,
ScaleMap, Flip, Dynamic, Random
};
//---------------------------------------------------------
// MidiTransformDialog
//---------------------------------------------------------
class MidiTransformerDialog : public MidiTransformDialogBase {
Q_OBJECT
MidiTransformPrivate* data;
virtual void accept();
// virtual void reject();
void setValOp(QWidget* a, QWidget* b, ValOp op);
void processEvent(Event&, Part*, Part*);
bool isSelected(Event&, Part*);
void transformEvent(Event&, Part*, Part*);
private slots:
void apply();
void presetNew();
void presetDelete();
void selEventOpSel(int);
void selTypeSel(int);
void selVal1OpSel(int);
void selVal2OpSel(int);
void selLenOpSel(int);
void selRangeOpSel(int);
void procEventOpSel(int);
void procEventTypeSel(int);
void procVal1OpSel(int);
void procVal2OpSel(int);
void procLenOpSel(int);
void procPosOpSel(int);
void funcOpSel(int);
void presetChanged(QListWidgetItem*);
void nameChanged(const QString&);
void commentChanged();
void selVal1aChanged(int);
void selVal1bChanged(int);
void selVal2aChanged(int);
void selVal2bChanged(int);
void selLenAChanged(int);
void selLenBChanged(int);
void selBarAChanged(int);
void selBarBChanged(int);
void procVal1aChanged(int);
void procVal1bChanged(int);
void procVal2aChanged(int);
void procVal2bChanged(int);
void procLenAChanged(int);
void procPosAChanged(int);
void funcQuantValSel(int);
void processAllChanged(bool);
void selectedTracksChanged(bool);
void insideLoopChanged(bool);
public:
MidiTransformerDialog(QWidget* parent = 0, const char* name = 0,
bool modal = false, Qt::WFlags fl = 0);
~MidiTransformerDialog();
};
extern void writeMidiTransforms(Xml& xml);
extern void readMidiTransform(QDomNode);
#endif
|