-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Clock Enhancements #49
Conversation
fa81aaf
to
04d6ef2
Compare
After sufficient time and testing, I've rebased and squashed this down into a single commit. It's quite functional, but some code review would be a good idea... Also, it probably depends on #59 to fit in memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely solid feature!!
software/o_c_REV/HEM_ClockSetup.ino
Outdated
@@ -91,44 +108,91 @@ protected: | |||
} | |||
|
|||
private: | |||
int cursor; // 0=Source, 1=Tempo, 2=Multiply | |||
char cursor; // 0=Play/Stop, 1=Forwarding, 2=External PPQN, 3=Tempo, 4,5=Multiply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worthwhile to extract this to an enum, it'll make it much easier to understand at a glance the different cursor states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and there's probably a cursor variable in every other applet that should be an enum... I'll work on this.
software/o_c_REV/HSClockManager.h
Outdated
bool tock[3] = {0,0,0}; // The current tock value | ||
int tocks_per_beat[3] = {1, 1, 24}; // Multiplier | ||
int clock_ppqn = 4; // external clock multiple | ||
bool cycle = 0; // Alternates for each tock, for display purposes | ||
int count[3] = {0,0,0}; // Multiple counter, 0 is a special case when first starting the clock | ||
|
||
bool boop[4]; // Manual triggers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider extracting hard-coded array lengths to consts
* Adapts to external clock at configurable PPQN (0 to disable) * Separate internal clock multipliers/dividers for each hemisphere (0 to disable) * Internal Clock sends realtime MIDI Clock/Start/Stop * Forwarding only duplicates physical DIGITAL 1 -> DIGITAL 3 * Clock state data is stored with ClockSetup, not Metronome
04d6ef2
to
5cec6bc
Compare
This is a fairly elegant solution to #23 that's hopefully not too intrusive.
Clock Forwarding and internal clock Start/Stop are now independent settings. On the ClockSetup screen, turn encoder left to toggle Start/Stop, turn right to toggle Forwarding, indicated by a LINK_ICON. Long-press left encoder will still Pause/Unpause.
Internal clock always triggers Digital 1, will only trigger Digital 3 if forwarding is ON.
Functionally, I think it's exactly what I wanted. Open to feedback on the interface screen.