summaryrefslogtreecommitdiff
path: root/muse2/synti/organ
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-08 13:47:24 +0000
commita347445db32f51562aee5c6a786c312d1f612d2f (patch)
treeba3dc9a6e03eec2edf2c213b7f4d7e5e49903edc /muse2/synti/organ
parent375d6a53630f364c6560eb40255a8cc4c0496b8c (diff)
parent5367067f7a36dce8a362dcc000d41ac581bffdfe (diff)
merged namespace changes. HOPEFULLY the last one.
Diffstat (limited to 'muse2/synti/organ')
-rw-r--r--muse2/synti/organ/organ.cpp20
-rw-r--r--muse2/synti/organ/organ.h36
-rw-r--r--muse2/synti/organ/organgui.cpp6
-rw-r--r--muse2/synti/organ/organgui.h2
4 files changed, 32 insertions, 32 deletions
diff --git a/muse2/synti/organ/organ.cpp b/muse2/synti/organ/organ.cpp
index d9613992..fdcd02aa 100644
--- a/muse2/synti/organ/organ.cpp
+++ b/muse2/synti/organ/organ.cpp
@@ -58,7 +58,7 @@ SynthCtrl Organ::synthCtrl[] = {
{ "reed", REED, 1 },
{ "velocity", VELO, 0 },
// next controller not send as init data
- { "volume", CTRL_VOLUME, 100 },
+ { "volume", MusECore::CTRL_VOLUME, 100 },
};
static int NUM_CONTROLLER = sizeof(Organ::synthCtrl)/sizeof(*(Organ::synthCtrl));
@@ -209,8 +209,8 @@ void Organ::processMessages()
//
while (gui->fifoSize())
{
- MidiPlayEvent ev = gui->readEvent();
- if (ev.type() == ME_CONTROLLER)
+ MusECore::MidiPlayEvent ev = gui->readEvent();
+ if (ev.type() == MusECore::ME_CONTROLLER)
{
// process local?
setController(ev.dataA(), ev.dataB());
@@ -238,8 +238,8 @@ void Organ::process(float** ports, int offset, int sampleCount)
// synthesizer GUI
//
while (gui->fifoSize()) {
- MidiPlayEvent ev = gui->readEvent();
- if (ev.type() == ME_CONTROLLER) {
+ MusECore::MidiPlayEvent ev = gui->readEvent();
+ if (ev.type() == MusECore::ME_CONTROLLER) {
// process local?
setController(ev.dataA(), ev.dataB());
sendEvent(ev);
@@ -537,15 +537,15 @@ void Organ::setController(int ctrl, int data)
case VELO:
velo = data;
break;
- case CTRL_VOLUME:
+ case MusECore::CTRL_VOLUME:
data &= 0x7f;
volume = data == 0 ? 0.0 : cb2amp(int(200 * log10((127.0 * 127)/(data*data))));
break;
- case CTRL_ALL_SOUNDS_OFF:
+ case MusECore::CTRL_ALL_SOUNDS_OFF:
for (int i = 0; i < VOICES; ++i)
voices[i].isOn = false;
break;
- case CTRL_RESET_ALL_CTRL:
+ case MusECore::CTRL_RESET_ALL_CTRL:
for (int i = 0; i < NUM_CONTROLLER; ++i)
setController(0, synthCtrl[i].num, synthCtrl[i].val);
break;
@@ -591,7 +591,7 @@ bool Organ::setController(int channel, int ctrl, int data)
case REED:
case VELO:
{
- MidiPlayEvent ev(0, 0, channel, ME_CONTROLLER, ctrl, data);
+ MusECore::MidiPlayEvent ev(0, 0, channel, MusECore::ME_CONTROLLER, ctrl, data);
#ifdef ORGAN_DEBUG
fprintf(stderr, "OrganGui:setController before gui->writeEvent ctrl:%d data:%d\n", ctrl, data);
#endif
@@ -681,7 +681,7 @@ int Organ::getControllerInfo(int id, const char** name, int* controller,
*name = synthCtrl[id].name;
*initval = synthCtrl[id].val;
- if(synthCtrl[id].num == CTRL_VOLUME)
+ if(synthCtrl[id].num == MusECore::CTRL_VOLUME)
{
*min = 0;
*max = 127;
diff --git a/muse2/synti/organ/organ.h b/muse2/synti/organ/organ.h
index b85f9282..8a7de162 100644
--- a/muse2/synti/organ/organ.h
+++ b/muse2/synti/organ/organ.h
@@ -89,24 +89,24 @@ struct Envelope {
}
};
-static const int HARM0 = 0 + CTRL_RPN14_OFFSET;
-static const int HARM1 = 1 + CTRL_RPN14_OFFSET;
-static const int HARM2 = 2 + CTRL_RPN14_OFFSET;
-static const int HARM3 = 3 + CTRL_RPN14_OFFSET;
-static const int HARM4 = 4 + CTRL_RPN14_OFFSET;
-static const int HARM5 = 5 + CTRL_RPN14_OFFSET;
-static const int ATTACK_LO = 6 + CTRL_RPN14_OFFSET;
-static const int DECAY_LO = 7 + CTRL_RPN14_OFFSET;
-static const int SUSTAIN_LO = 8 + CTRL_RPN14_OFFSET;
-static const int RELEASE_LO = 9 + CTRL_RPN14_OFFSET;
-static const int ATTACK_HI = 10 + CTRL_RPN14_OFFSET;
-static const int DECAY_HI = 11 + CTRL_RPN14_OFFSET;
-static const int SUSTAIN_HI = 12 + CTRL_RPN14_OFFSET;
-static const int RELEASE_HI = 13 + CTRL_RPN14_OFFSET;
-static const int BRASS = 14 + CTRL_RPN14_OFFSET;
-static const int FLUTE = 15 + CTRL_RPN14_OFFSET;
-static const int REED = 16 + CTRL_RPN14_OFFSET;
-static const int VELO = 17 + CTRL_RPN14_OFFSET;
+static const int HARM0 = 0 + MusECore::CTRL_RPN14_OFFSET;
+static const int HARM1 = 1 + MusECore::CTRL_RPN14_OFFSET;
+static const int HARM2 = 2 + MusECore::CTRL_RPN14_OFFSET;
+static const int HARM3 = 3 + MusECore::CTRL_RPN14_OFFSET;
+static const int HARM4 = 4 + MusECore::CTRL_RPN14_OFFSET;
+static const int HARM5 = 5 + MusECore::CTRL_RPN14_OFFSET;
+static const int ATTACK_LO = 6 + MusECore::CTRL_RPN14_OFFSET;
+static const int DECAY_LO = 7 + MusECore::CTRL_RPN14_OFFSET;
+static const int SUSTAIN_LO = 8 + MusECore::CTRL_RPN14_OFFSET;
+static const int RELEASE_LO = 9 + MusECore::CTRL_RPN14_OFFSET;
+static const int ATTACK_HI = 10 + MusECore::CTRL_RPN14_OFFSET;
+static const int DECAY_HI = 11 + MusECore::CTRL_RPN14_OFFSET;
+static const int SUSTAIN_HI = 12 + MusECore::CTRL_RPN14_OFFSET;
+static const int RELEASE_HI = 13 + MusECore::CTRL_RPN14_OFFSET;
+static const int BRASS = 14 + MusECore::CTRL_RPN14_OFFSET;
+static const int FLUTE = 15 + MusECore::CTRL_RPN14_OFFSET;
+static const int REED = 16 + MusECore::CTRL_RPN14_OFFSET;
+static const int VELO = 17 + MusECore::CTRL_RPN14_OFFSET;
//---------------------------------------------------------
// SynthCtrl
diff --git a/muse2/synti/organ/organgui.cpp b/muse2/synti/organ/organgui.cpp
index e648a9e6..21f8e828 100644
--- a/muse2/synti/organ/organgui.cpp
+++ b/muse2/synti/organ/organgui.cpp
@@ -107,7 +107,7 @@ void OrganGui::ctrlChanged(int idx)
else if (ctrl->type == SynthGuiCtrl::SWITCH) {
val = ((QCheckBox*)(ctrl->editor))->isChecked();
}
- sendController(0, idx + CTRL_RPN14_OFFSET, val);
+ sendController(0, idx + MusECore::CTRL_RPN14_OFFSET, val);
}
//---------------------------------------------------------
@@ -185,9 +185,9 @@ void OrganGui::setParam(int param, int val)
// processEvent
//---------------------------------------------------------
-void OrganGui::processEvent(const MidiPlayEvent& ev)
+void OrganGui::processEvent(const MusECore::MidiPlayEvent& ev)
{
- if (ev.type() == ME_CONTROLLER)
+ if (ev.type() == MusECore::ME_CONTROLLER)
setParam(ev.dataA(), ev.dataB());
else
{
diff --git a/muse2/synti/organ/organgui.h b/muse2/synti/organ/organgui.h
index 826ecf09..2af6a959 100644
--- a/muse2/synti/organ/organgui.h
+++ b/muse2/synti/organ/organgui.h
@@ -51,7 +51,7 @@ class OrganGui : public QWidget, public Ui::OrganGuiBase, public MessGui {
void readMessage(int);
public:
- virtual void processEvent(const MidiPlayEvent&);
+ virtual void processEvent(const MusECore::MidiPlayEvent&);
int getControllerMinMax(int id, int* min, int* max) const;
OrganGui();
};