summaryrefslogtreecommitdiff
path: root/muse2/synti/organ/organ.cpp
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/organ.cpp
parent375d6a53630f364c6560eb40255a8cc4c0496b8c (diff)
parent5367067f7a36dce8a362dcc000d41ac581bffdfe (diff)
merged namespace changes. HOPEFULLY the last one.
Diffstat (limited to 'muse2/synti/organ/organ.cpp')
-rw-r--r--muse2/synti/organ/organ.cpp20
1 files changed, 10 insertions, 10 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;