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 PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD BaseMachineComon
Fork of BaseMachine_Sequencer by
Diff: main.cpp
- Revision:
- 46:0fb579ecdd77
- Parent:
- 45:3c7143da38d1
- Child:
- 47:f4c16d1e4207
--- a/main.cpp Fri Oct 07 09:56:34 2016 +0000
+++ b/main.cpp Fri Oct 07 10:41:48 2016 +0000
@@ -279,6 +279,7 @@
if (_bpm != bpm) {
bpm = _bpm;
sequencerDisplay.setBpm(_bpm);
+ SpiSendParams(CMD_BPM, _bpm);
isDirty = true;
}
@@ -287,12 +288,16 @@
currentStep = _step;
// syncronize sequence value & Rotary Encoder's value
RotEncPitch.setVal(sequences[currentStep].getPitch());
+ SpiSendParams(CMD_NOTE, getNoteData(_step));
+ SpiSendParams(CMD_PITCH, sequences[_step].getPitch());
isDirty = true;
}
int _pitch = RotEncPitch.getVal();
if (_pitch != sequences[currentStep].getPitch()) {
sequences[currentStep].setPitch(_pitch);
+ SpiSendParams(CMD_NOTE, getNoteData(currentStep));
+ SpiSendParams(CMD_PITCH, _pitch);
isDirty = true;
}
}
