Gemphet8 ; 8-polyphonic synthesizer control application

Dependencies:   MIDI REnc button mbed

Files at this revision

API Documentation at this revision

Comitter:
ChuckTimber
Date:
Tue Aug 12 00:00:28 2014 +0000
Parent:
9:a86ad099f24d
Child:
11:e6a47dc75120
Commit message:
function divided working copy - compile OK

Changed in this revision

MIDI_Proc/midi_proc.cpp Show annotated file Show diff for this revision Revisions of this file
MIDI_Proc/midi_proc.h Show annotated file Show diff for this revision Revisions of this file
button.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MIDI_Proc/midi_proc.cpp	Mon Aug 11 23:16:06 2014 +0000
+++ b/MIDI_Proc/midi_proc.cpp	Tue Aug 12 00:00:28 2014 +0000
@@ -8,10 +8,10 @@
 static uint16_t MidiNotesTag;
 uint8_t NumOfNotes = POLYPHONICE_NOTES;
 
-MIDI midi(dp16, dp15);
 
 void midi_init(void)
 {
+    midi.begin();
     midi.setHandleNoteOff(&midi_noteoff);
     midi.setHandleNoteOn(&midi_noteon);
     midi.setHandleControlChange(&midi_cc);
--- a/MIDI_Proc/midi_proc.h	Mon Aug 11 23:16:06 2014 +0000
+++ b/MIDI_Proc/midi_proc.h	Tue Aug 12 00:00:28 2014 +0000
@@ -4,6 +4,8 @@
 #include "mbed.h"
 #include "MIDI.h"
 
+extern MIDI midi;
+
 #ifdef __cplusplus
 //extern "C" {
 #endif /* __cplusplus */
@@ -14,11 +16,6 @@
 
 #define POLYPHONICE_NOTES 8
 
-    typedef unsigned char uint8_t;
-    typedef unsigned short uint16_t;
-    typedef uint8_t byte;
-    typedef uint16_t word;
-    
     /** @structure MIDI Note management structure
      *
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/button.lib	Tue Aug 12 00:00:28 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ChuckTimber/code/button/#04236df532fb
--- a/main.cpp	Mon Aug 11 23:16:06 2014 +0000
+++ b/main.cpp	Tue Aug 12 00:00:28 2014 +0000
@@ -8,15 +8,16 @@
  */
  
 #include "mbed.h"
-//#include "button.h"
+#include "button.h"
 //#include "REnc.h"
-
+#include "MIDI.h"
+#include "I2CEEprom.h"
 
 // LED (active HIGH)
 #define dbg_led_on()        { }
 #define dbg_led_off()       { }
 
-
+/// MIDI parameters -- 82-byte (32+32+18)
 uint8_t midi_params[]={
     0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -24,11 +25,16 @@
 };
 
 DigitalOut myled(LED1);
+I2CEEprom i2crom(dp5, dp27, 0xa0);
+MIDI midi(dp16, dp15);
+
 
 
 int main() {
 
     while(1) {
+        midi.read();
+        
         myled = 1;
         wait(0.2);
         myled = 0;