BaseMachine UI Controllerに分離

Dependencies:   AverageAnalogIn PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD BaseMachineComon

Fork of BaseMachine_Sequencer by Ryo Od

Revision:
21:c4d09aaa52b9
Parent:
20:00d3b6ace8c7
Child:
22:82f1e7877f9f
--- a/main.cpp	Tue Aug 23 11:47:44 2016 +0000
+++ b/main.cpp	Tue Aug 23 11:55:53 2016 +0000
@@ -103,17 +103,7 @@
 // とりあえずの変数(後でClassのメンバ変数に格納)
 #define MOD_NUMBER_MAX 1
 volatile int modNumber = 0;
-/*
-volatile uint8_t cutOff;
-volatile uint8_t resonance;
-*/
-volatile uint8_t envMod;
-/*
-volatile uint8_t level;
-volatile uint8_t duration;
-volatile uint8_t decay;
-volatile uint8_t sustain;
-*/
+volatile uint8_t envMod = 127;
 
 //------------------------------------------------------------------------
 // Callback functions
@@ -408,10 +398,9 @@
     PinRunStop.setAssertValue(0);
     PinRunStop.setSampleFrequency(); 
     
-    // Test SequencerSender Run
+    // Initialize 0bjects
     //
     Sequence::setBaseNoteNumber(baseNoteNumber);
-    sequenceSender.setBpm(bpm);
     
     // Initialize sequences
     for (int i = 0; i < SEQUENCE_N; i++) {
@@ -432,33 +421,5 @@
         pollingPots();
         pollingRotEncs();
         pollingPins();
-#if 0        
-        /*
-        sequenceSender.setPulseWidth(sequenceSender.getPulseWidth() + 4);
-        Thread::wait(500);
-        sequenceSender.setWaveShape(SpiSequenceSender::WAVESHAPE_SAW);
-        Thread::wait(500);
-        sequenceSender.setWaveShape(SpiSequenceSender::WAVESHAPE_SQUARE);
-        */
-        //envelope.setLevel(levelIn * 4095);
-        envelope.setLevel(4095);
-        envelope.setDuration(durationIn * envelopeLength);
-        envelope.setDecay(decayIn * envelopeLength);
-        envelope.setSustain(sustainIn * 4095);
-        
-        filterController.setCutoff(cutoffIn * 255);
-        filterController.setResonance(resonanceIn * 255);
-        
-        #if(UART_TRACE)
-        printf("%d\t%d\t%d\t%d\t%d\t%d\r\n",
-            filterController.getCutoff(),
-            filterController.getResonance(),
-            envelope.getLevel(),
-            envelope.getDuration(),
-            envelope.getDecay(),
-            envelope.getSustain()
-        );
-        #endif
-#endif        
     }
 }