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.
Diff: BaseMachineCommon.h
- Revision:
- 0:a7a23cc867a6
- Child:
- 1:cb1400ea68a7
diff -r 000000000000 -r a7a23cc867a6 BaseMachineCommon.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/BaseMachineCommon.h Sun Oct 23 05:15:04 2016 +0000
@@ -0,0 +1,35 @@
+/*
+ * BaseMachine_Common.h
+ *
+ * 2016.10.23
+ *
+ */
+
+#define SPI_UI_TO_SEQUENCER_RATE (3000000) // Actual frequency about 2.6MHz
+#define SEQUENCE_N (16)
+
+enum SequencerCmd {
+ CMD_RCV_PLAYING_STEP = 0x01,
+ CMD_RUN = 0x11,
+ CMD_BPM = 0x12,
+ CMD_ACCENT_LEVEL = 0x13,
+ CMD_WAVE_SHAPE = 0x21,
+ CMD_PULSE_WIDTH = 0x22,
+ CMD_CUTOFF = 0x31,
+ CMD_RESONANCE = 0x32,
+ CMD_LEVEL = 0x41,
+ CMD_DURATION = 0x42,
+ CMD_DECAY = 0x43,
+ CMD_SUSTAIN = 0x44,
+ CMD_NOTE = 0x51,
+ CMD_PITCH = 0x52,
+};
+
+const int baseNoteNumber = 36;
+
+// Initial Sequence
+const int noteOn[SEQUENCE_N] = { 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 };
+const int pitch[SEQUENCE_N] = {36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36 };
+const int tie[SEQUENCE_N] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+const int accent[SEQUENCE_N] = { 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 };
+