summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/synti/libsynti/mono.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-09-27 16:08:57 +0000
committerFlorian Jung <flo@windfisch.org>2011-09-27 16:08:57 +0000
commite9e38901f1b0c8b0d4c11f6de37abf7ff6c7234f (patch)
tree6db56ee33fda6adce28afc456c4fd84b56180453 /attic/muse_qt4_evolution/synti/libsynti/mono.cpp
parent5c2eaaf143f517e1a4d52e243a761e479aeb3e5b (diff)
parentd52fac00567bb85944188f3c946b86b2a420819c (diff)
merged with trunk
Diffstat (limited to 'attic/muse_qt4_evolution/synti/libsynti/mono.cpp')
-rw-r--r--attic/muse_qt4_evolution/synti/libsynti/mono.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/attic/muse_qt4_evolution/synti/libsynti/mono.cpp b/attic/muse_qt4_evolution/synti/libsynti/mono.cpp
deleted file mode 100644
index 14a23aca..00000000
--- a/attic/muse_qt4_evolution/synti/libsynti/mono.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//=========================================================
-// MusE
-// Linux Music Editor
-// software synthesizer helper library
-// $Id: mono.cpp,v 1.2 2004/04/15 13:46:18 wschweer Exp $
-//
-// (C) Copyright 2004 Werner Schweer (ws@seh.de)
-//=========================================================
-
-#include "mono.h"
-
-//---------------------------------------------------------
-// playNote
-//---------------------------------------------------------
-
-bool MessMono::playNote(int channel, int pitch, int velo)
- {
- if (velo == 0) {
- if (pitchStack.empty())
- return false;
- if (pitchStack.back().pitch == pitch) {
- pitchStack.pop_back();
- if (pitchStack.empty()) {
- note(channel, pitch, 0);
- return false;
- }
- PitchVelo pv = pitchStack.back();
- note(pv.channel, pv.pitch, pv.velo); // change pitch
- return false;
- }
- for (std::list<PitchVelo>::iterator i = pitchStack.begin();
- i != pitchStack.end(); ++i) {
- if ((*i).pitch == pitch) {
- pitchStack.erase(i);
- return false;
- }
- }
- // no noteon found
- // emergency stop:
- note(channel, pitch, velo);
- return false;
- }
- pitchStack.push_back(PitchVelo(channel, pitch, velo));
- note(channel, pitch, velo);
- return false;
- }
-