formatting
This commit is contained in:
@ -24,23 +24,21 @@ static const byte MOD_CHOICE_SIZE = 25;
|
|||||||
// Negative numbers are multipliers, positive are divisors.
|
// Negative numbers are multipliers, positive are divisors.
|
||||||
static const int CLOCK_MOD[MOD_CHOICE_SIZE] PROGMEM = {
|
static const int CLOCK_MOD[MOD_CHOICE_SIZE] PROGMEM = {
|
||||||
// Multipliers
|
// Multipliers
|
||||||
-24, -16, -12, -8, -6, -4, -3, -2,
|
-24, -16, -12, -8, -6, -4, -3, -2,
|
||||||
// Internal Clock Unity
|
// Internal Clock Unity
|
||||||
1,
|
1,
|
||||||
// Divisors
|
// Divisors
|
||||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 24, 32, 64, 128
|
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 24, 32, 64, 128};
|
||||||
};
|
|
||||||
|
|
||||||
// This represents the number of clock pulses for a 96 PPQN clock source
|
// This represents the number of clock pulses for a 96 PPQN clock source
|
||||||
// that match the above div/mult mods.
|
// that match the above div/mult mods.
|
||||||
static const int CLOCK_MOD_PULSES[MOD_CHOICE_SIZE] PROGMEM = {
|
static const int CLOCK_MOD_PULSES[MOD_CHOICE_SIZE] PROGMEM = {
|
||||||
// Multiplier Pulses (96 / X)
|
// Multiplier Pulses (96 / X)
|
||||||
4, 6, 8, 12, 16, 24, 32, 48,
|
4, 6, 8, 12, 16, 24, 32, 48,
|
||||||
// Internal Clock Pulses
|
// Internal Clock Pulses
|
||||||
96,
|
96,
|
||||||
// Divisor Pulses (96 * X)
|
// Divisor Pulses (96 * X)
|
||||||
192, 288, 384, 480, 576, 672, 768, 864, 960, 1056, 1152, 1536, 2304, 3072, 6144, 12288
|
192, 288, 384, 480, 576, 672, 768, 864, 960, 1056, 1152, 1536, 2304, 3072, 6144, 12288};
|
||||||
};
|
|
||||||
|
|
||||||
static const byte DEFAULT_CLOCK_MOD_INDEX = 8; // x1 or 96 PPQN.
|
static const byte DEFAULT_CLOCK_MOD_INDEX = 8; // x1 or 96 PPQN.
|
||||||
|
|
||||||
@ -216,7 +214,7 @@ class Channel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dest_mod = _calculateMod(CV_DEST_MOD, cv1_val, cv2_val, -(MOD_CHOICE_SIZE/2), MOD_CHOICE_SIZE/2);
|
int dest_mod = _calculateMod(CV_DEST_MOD, cv1_val, cv2_val, -(MOD_CHOICE_SIZE / 2), MOD_CHOICE_SIZE / 2);
|
||||||
cvmod_clock_mod_index = constrain(base_clock_mod_index + dest_mod, 0, 100);
|
cvmod_clock_mod_index = constrain(base_clock_mod_index + dest_mod, 0, 100);
|
||||||
|
|
||||||
int prob_mod = _calculateMod(CV_DEST_PROB, cv1_val, cv2_val, -50, 50);
|
int prob_mod = _calculateMod(CV_DEST_PROB, cv1_val, cv2_val, -50, 50);
|
||||||
|
|||||||
@ -37,30 +37,30 @@ const uint8_t TEXT_FONT[437] U8G2_FONT_SECTION("velvetscreen") PROGMEM =
|
|||||||
* "%/0123456789ABCDEFILNORSTUVXx"
|
* "%/0123456789ABCDEFILNORSTUVXx"
|
||||||
*/
|
*/
|
||||||
const uint8_t LARGE_FONT[766] U8G2_FONT_SECTION("stk-l") =
|
const uint8_t LARGE_FONT[766] U8G2_FONT_SECTION("stk-l") =
|
||||||
"\35\0\4\4\4\5\3\1\6\20\30\0\0\27\0\0\0\1\77\0\0\2\341%'\17;\226\261\245FL"
|
"\35\0\4\4\4\5\3\1\6\20\30\0\0\27\0\0\0\1\77\0\0\2\341%'\17;\226\261\245FL"
|
||||||
"\64B\214\30\22\223\220)Bj\10Q\232\214\42R\206\310\210\21d\304\30\32a\254\304\270!\0/\14"
|
"\64B\214\30\22\223\220)Bj\10Q\232\214\42R\206\310\210\21d\304\30\32a\254\304\270!\0/\14"
|
||||||
"\272\272\275\311H\321g\343\306\1\60\37|\373\35CJT\20:fW\207\320\210\60\42\304\204\30D\247"
|
"\272\272\275\311H\321g\343\306\1\60\37|\373\35CJT\20:fW\207\320\210\60\42\304\204\30D\247"
|
||||||
"\214\331\354\20\11%\212\314\0\61\24z\275\245a\244\12\231\71\63b\214\220q\363\377(E\6\62\33|"
|
"\214\331\354\20\11%\212\314\0\61\24z\275\245a\244\12\231\71\63b\214\220q\363\377(E\6\62\33|"
|
||||||
"\373\35ShT\20:fl\344\14\211\231\301\306T\71\202#g\371\340\201\1\63\34|\373\35ShT"
|
"\373\35ShT\20:fl\344\14\211\231\301\306T\71\202#g\371\340\201\1\63\34|\373\35ShT"
|
||||||
"\20:fl\344@r\264\263\222\344,\215\35\42\241\6\225\31\0\64 |\373-!\203\206\214!\62\204"
|
"\20:fl\344@r\264\263\222\344,\215\35\42\241\6\225\31\0\64 |\373-!\203\206\214!\62\204"
|
||||||
"\314\220A#\10\215\30\65b\324\210Q\306\354\354\1\213\225\363\1\65\32|\373\15\25[\214\234/\10)"
|
"\314\220A#\10\215\30\65b\324\210Q\306\354\354\1\213\225\363\1\65\32|\373\15\25[\214\234/\10)"
|
||||||
"Y\61j\350\310Y\32;DB\15*\63\0\66\33}\33\236SiV\14;gt^\230Y\302\202\324"
|
"Y\61j\350\310Y\32;DB\15*\63\0\66\33}\33\236SiV\14;gt^\230Y\302\202\324"
|
||||||
"\71\273;EbM\252\63\0\67\23|\373\205\25\17R\316\207\344\350p\312\201#\347\35\0\70 |\373"
|
"\71\273;EbM\252\63\0\67\23|\373\205\25\17R\316\207\344\350p\312\201#\347\35\0\70 |\373"
|
||||||
"\35ShT\20:f\331!\22D\310 :\205\206\10\11B\307\354\354\20\11\65\250\314\0\71\32|\373"
|
"\35ShT\20:f\331!\22D\310 :\205\206\10\11B\307\354\354\20\11\65\250\314\0\71\32|\373"
|
||||||
"\35ShT\20:fg\207H,Q\223r\276\30DB\15*\63\0A\26}\33\246r\247\322P\62"
|
"\35ShT\20:fg\207H,Q\223r\276\30DB\15*\63\0A\26}\33\246r\247\322P\62"
|
||||||
"j\310\250\21\343\354\335\203\357\354w\3B$}\33\206Dj\226\214\42\61l\304\260\21\303F\14\33\61"
|
"j\310\250\21\343\354\335\203\357\354w\3B$}\33\206Dj\226\214\42\61l\304\260\21\303F\14\33\61"
|
||||||
"\212\304\222MF\221\30v\316\236=\10\301b\11\0C\27}\33\236Si\226\20Bft\376O\211\215"
|
"\212\304\222MF\221\30v\316\236=\10\301b\11\0C\27}\33\236Si\226\20Bft\376O\211\215"
|
||||||
" Db\215\42$\0D\33}\33\206Dj\226\214\32\62l\304\260\21\343\354\177vl\304(\22K\324"
|
" Db\215\42$\0D\33}\33\206Dj\226\214\32\62l\304\260\21\343\354\177vl\304(\22K\324"
|
||||||
"$\2E\22|\373\205\17R\316KD\30\215\234_>x`\0F\20|\373\205\17R\316\227i\262\31"
|
"$\2E\22|\373\205\17R\316KD\30\215\234_>x`\0F\20|\373\205\17R\316\227i\262\31"
|
||||||
"\71\377\22\0I\7s\333\204\77HL\15{\333\205\201\363\377\77|\360`\0N$}\33\6\201\346\314"
|
"\71\377\22\0I\7s\333\204\77HL\15{\333\205\201\363\377\77|\360`\0N$}\33\6\201\346\314"
|
||||||
"\35;\206\12U\242D&\306\230\30cd\210\221!fF\230\31a(+\314\256\63\67\0O\26}\33"
|
"\35;\206\12U\242D&\306\230\30cd\210\221!fF\230\31a(+\314\256\63\67\0O\26}\33"
|
||||||
"\236Si\226\214\32\61\316\376\277\33\61j\310\232Tg\0R\61\216;\6Ek\230\14#\61n\304\270"
|
"\236Si\226\214\32\61\316\376\277\33\61j\310\232Tg\0R\61\216;\6Ek\230\14#\61n\304\270"
|
||||||
"\21\343F\214\33\61n\304\60\22\243\210\60Q\224j\310\260\61\243\306\20\232\325\230QD\206\221\30\67b"
|
"\21\343F\214\33\61n\304\60\22\243\210\60Q\224j\310\260\61\243\306\20\232\325\230QD\206\221\30\67b"
|
||||||
"\334\301\1S\42\216;\236c\211\226\220\42\61n\304\270\21c\307R\232,[\262\203\307\216\65h\16\25"
|
"\334\301\1S\42\216;\236c\211\226\220\42\61n\304\270\21c\307R\232,[\262\203\307\216\65h\16\25"
|
||||||
"\21&\253\320\0T\15}\33\206\17R\15\235\377\377\25\0U\21|\373\205a\366\377\237\215\30\64D\15"
|
"\21&\253\320\0T\15}\33\206\17R\15\235\377\377\25\0U\21|\373\205a\366\377\237\215\30\64D\15"
|
||||||
"*\63\0V\26\177\371\205\221\366\377\313\21\343\206\220\42C\25\11r'\313\16\3X)~;\206\201\6"
|
"*\63\0V\26\177\371\205\221\366\377\313\21\343\206\220\42C\25\11r'\313\16\3X)~;\206\201\6"
|
||||||
"\217\221\30\66\204\20\31\42\244\206\14Cg\320$Q\222\6\315!\33\62\212\10\31BD\206\215 v\320"
|
"\217\221\30\66\204\20\31\42\244\206\14Cg\320$Q\222\6\315!\33\62\212\10\31BD\206\215 v\320"
|
||||||
"\302\1x\24\312\272\205A\206\216\220@c\212\224\31$S\14\262h\0\0\0\0\4\377\377\0";
|
"\302\1x\24\312\272\205A\206\216\220@c\212\224\31$S\14\262h\0\0\0\0\4\377\377\0";
|
||||||
|
|
||||||
#define play_icon_width 14
|
#define play_icon_width 14
|
||||||
#define play_icon_height 14
|
#define play_icon_height 14
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class Pattern {
|
|||||||
|
|
||||||
// Update the euclidean rhythm pattern using bitmap
|
// Update the euclidean rhythm pattern using bitmap
|
||||||
void updatePattern() {
|
void updatePattern() {
|
||||||
pattern_bitmap_ = 0; // Clear the bitmap
|
pattern_bitmap_ = 0; // Clear the bitmap
|
||||||
|
|
||||||
if (steps_ == 0) return;
|
if (steps_ == 0) return;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,6 @@ class StateManager {
|
|||||||
// Indicate that state has changed and we should save.
|
// Indicate that state has changed and we should save.
|
||||||
void markDirty();
|
void markDirty();
|
||||||
|
|
||||||
|
|
||||||
// This struct holds the data that identifies the firmware version.
|
// This struct holds the data that identifies the firmware version.
|
||||||
struct Metadata {
|
struct Metadata {
|
||||||
byte version;
|
byte version;
|
||||||
@ -70,6 +69,7 @@ class StateManager {
|
|||||||
byte selected_save_slot;
|
byte selected_save_slot;
|
||||||
ChannelState channel_data[Gravity::OUTPUT_COUNT];
|
ChannelState channel_data[Gravity::OUTPUT_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _isDataValid();
|
bool _isDataValid();
|
||||||
void _saveMetadata();
|
void _saveMetadata();
|
||||||
|
|||||||
Reference in New Issue
Block a user