Permalink
Browse files

preparing the multimode

git-svn-id: https://minicomputer.svn.sourceforge.net/svnroot/minicomputer/trunk@113 a4770fbb-0739-0410-ac47-c227fb5b275d
  • Loading branch information...
1 parent 1351ef7 commit 391cc0a743eb6dcd0f148342a06c59346c8101bb herrsteiner committed Nov 18, 2010
Showing with 13 additions and 4 deletions.
  1. +2 −2 common.h
  2. +11 −2 cpu/main.c
View
@@ -32,6 +32,6 @@
#define _MULTISETTINGS 6
// the version number as string
-#define _VERSION "1.41"
-
+#define _VERSION "1.42"
+enum MIDIMODES {_MULTI,_SINGLE,_SPLIT,_6TO2};
#endif
View
@@ -1,7 +1,7 @@
/** Minicomputer
* industrial grade digital synthesizer
*
- * Copyright 2007,2008 Malte Steiner
+ * Copyright 2007,2008,2009,2010 Malte Steiner
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -41,6 +41,7 @@
#define tabF 4096.f
// variables
+enum MIDIMODES midimode = _MULTI; // the old behaviour
float delayBuffer[_MULTITEMP][96000] __attribute__((aligned (16)));
float table [_WAVECOUNT][TableSize] __attribute__((aligned (16)));
float parameter[_MULTITEMP][_PARACOUNT] __attribute__((aligned (16)));
@@ -1144,8 +1145,12 @@ static void *midiprocessor(void *handle) {
fprintf(stderr, "Note On event on Channel %2d: %5d \r",
c, ev->data.note.note);
#endif
- if (c <_MULTITEMP)
+ if (c <_MULTITEMP){
+ switch (midimode)
{
+ default:
+ case _MULTI:
+ {
if (ev->data.note.velocity>0)
{
lastnote[c]=ev->data.note.note;
@@ -1162,6 +1167,10 @@ static void *midiprocessor(void *handle) {
break;// not the best method but it breaks only when a note on is
}// if velo == 0 it should be handled as noteoff...
+ }
+ break;
+
+ }
}
}
// ...so its necessary that here follow the noteoff routine

0 comments on commit 391cc0a

Please sign in to comment.