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 BaseMachineUIController Envelope ExioBufferdController FilterController MCP23S17 PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD AT24C1024 OscController
Diff: main.cpp
- Revision:
- 8:4e38bb44c72e
- Parent:
- 7:a47420a0c4bf
- Child:
- 10:0b7f4eb37197
diff -r a47420a0c4bf -r 4e38bb44c72e main.cpp
--- a/main.cpp Thu Nov 17 12:26:15 2016 +0000
+++ b/main.cpp Thu Nov 17 13:04:27 2016 +0000
@@ -56,9 +56,10 @@
if (sequences[SequenceSender.getStep()].isNoteOn())
{
uint16_t level = EnvelopeGenerator.update();
- if (!sequences[SequenceSender.getStep()].isAccent())
+ level = level >> 1;
+ if (sequences[SequenceSender.getStep()].isAccent())
{
- level = level * 1 / 2;
+ level += (UIController.getAccentLevel() << 4);
}
AmpController.outDca(level);
//printf("%d %d %d\r\n", playingStep, ticks, level);