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: AverageAnalogIn BaseMachineUIController ExioBufferdController MCP23S17 PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD AT24C1024
Diff: main.cpp
- Revision:
- 3:97e89dad2a44
- Parent:
- 2:354ca389e975
- Child:
- 4:f79bf2806617
--- a/main.cpp Sun Nov 06 23:25:33 2016 +0000
+++ b/main.cpp Mon Nov 07 00:32:22 2016 +0000
@@ -11,8 +11,9 @@
#include "mbed.h"
#include "rtos.h"
-#define UART_TRACE (0)
+#define UART_TRACE (1)
#include "BaseMachineUIController.h"
+#include "Sequence.h"
const int samplingRate = 1;
@@ -67,6 +68,9 @@
bpm = UIController.getBpm();
setNoteLen();
+ Sequence sequences[SEQUENCE_N];
+ UIController.getSequences(&sequences);
+
OscillatorParam osc;
UIController.getOscillatorParam(&osc);
@@ -83,6 +87,16 @@
printf("%d %d ", flt.cutoff, flt.resonance);
printf("%d %d %d %d %d ", env.level, env.length, env.duration, env.decay, env.sustain);
printf("%d %d\r\n", bpm, accentLevel);
+ for (int i = 0; i < SEQUENCE_N; i++) {
+ printf("%d %d %d %d %d %u\r\n",
+ i,
+ sequences[i].isNoteOn(),
+ sequences[i].getPitch(),
+ sequences[i].isTie(),
+ sequences[i].isAccent(),
+ (sequences[i].getFrequency10()) >> 16
+ );
+ }
#endif
}
}