Vendorize uClock #10
2
clock.h
2
clock.h
@ -13,9 +13,9 @@
|
|||||||
#define CLOCK_H
|
#define CLOCK_H
|
||||||
|
|
||||||
#include <NeoHWSerial.h>
|
#include <NeoHWSerial.h>
|
||||||
#include "uClock.h"
|
|
||||||
|
|
||||||
#include "peripherials.h"
|
#include "peripherials.h"
|
||||||
|
#include "uClock.h"
|
||||||
|
|
||||||
// MIDI clock, start, stop, and continue byte definitions - based on MIDI 1.0 Standards.
|
// MIDI clock, start, stop, and continue byte definitions - based on MIDI 1.0 Standards.
|
||||||
#define MIDI_CLOCK 0xF8
|
#define MIDI_CLOCK 0xF8
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <gravity.h>
|
#include <gravity.h>
|
||||||
|
|
||||||
#include "euclidean.h"
|
#include "euclidean.h"
|
||||||
|
|
||||||
// Enums for CV configuration
|
// Enums for CV configuration
|
||||||
@ -87,7 +88,7 @@ class Channel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void setSwing(int val) {
|
void setSwing(int val) {
|
||||||
base_swing = constrain(val, 50, 95);
|
base_swing = constrain(val, 50, 95);
|
||||||
if (!isCvModActive()) {
|
if (!isCvModActive()) {
|
||||||
cvmod_swing = base_swing;
|
cvmod_swing = base_swing;
|
||||||
}
|
}
|
||||||
@ -141,12 +142,12 @@ class Channel {
|
|||||||
bool hit = cvmod_probability >= random(0, 100);
|
bool hit = cvmod_probability >= random(0, 100);
|
||||||
// Euclidean rhythm check
|
// Euclidean rhythm check
|
||||||
switch (pattern.NextStep()) {
|
switch (pattern.NextStep()) {
|
||||||
case Pattern::REST: // Rest when active or fall back to probability
|
case Pattern::REST: // Rest when active or fall back to probability
|
||||||
hit = false;
|
hit = false;
|
||||||
break;
|
break;
|
||||||
case Pattern::HIT: // Hit if probability is true
|
case Pattern::HIT: // Hit if probability is true
|
||||||
hit &= true;
|
hit &= true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (hit) {
|
if (hit) {
|
||||||
output.High();
|
output.High();
|
||||||
|
|||||||
@ -63,7 +63,7 @@ void StateManager::reset(AppState& app) {
|
|||||||
|
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
_saveMetadata(); // Write the new metadata
|
_saveMetadata(); // Write the new metadata
|
||||||
_saveState(app); // Write the new (default) app state
|
_saveState(app); // Write the new (default) app state
|
||||||
interrupts();
|
interrupts();
|
||||||
|
|
||||||
_isDirty = false;
|
_isDirty = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user