Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Amp AverageAnalogIn Envelope FilterController Sequence BaseMachineComon mbed-rtos mbed
Fork of SpiSequenceSender_Test by
Diff: main.cpp
- Revision:
- 21:c4d09aaa52b9
- Parent:
- 20:00d3b6ace8c7
- Child:
- 22:82f1e7877f9f
diff -r 00d3b6ace8c7 -r c4d09aaa52b9 main.cpp
--- 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
}
}
