You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TODO.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,20 @@
2
2
3
3
* Timer count up, ending options - maybe separate chrono and timer à la Timex?
4
4
* Different setting option for pushbutton (à la Timex) vs. rotary (à la microwave ovens) - external file?
5
-
* Set current DST state in EEPROM so when the clock is connected to power, it can determine whether correction is needed
6
5
* Option to display weekdays as Sun=0 or Sun=1 (per Portuguese!)
7
6
* When setting times of day, make 1439 (minutes) roll over to 0 and vice versa
8
7
* Implement options for full date every 5 minutes
9
-
* Is it possible to trip the chime *after* determining if we're in night mode or not
8
+
* Is it possible to trip the chime *after* determining if we're in night shutoff or not
10
9
* Reenable rotary encoder with libraries with workable licenses
11
10
* In display code, consider using `delayMicroseconds()` which, with its tighter resolution, may give better control over fades and dim levels
12
11
* in `checkInputs()`, can all this if/else business be defined at load instead of evaluated every sample? OR is it compiled that way? maybe use `#ifdef`
13
12
* in `ctrlEvt()`, could we do release/shorthold on mainSel so we can exit without making changes?
13
+
* Should functions be modular in the code, and have a reserved memory location / 100 per each?
14
+
* Should functions have their own options menu?
15
+
* I2C display to help with setting?
16
+
* I2C multicolor LED to indicate which function we're in?
17
+
* Metronome function
18
+
* Alarm option should be beeping patterns, including a slow wake which defeats the 2 minute delay
19
+
* Signalstart should create a situation where there's time on the counter, but doesn't make sound since the rtc can do that. Other beepable actions would probably cancel that counter anyway
int curevent = 0; //Current event (index in arrays above)
13
+
int cureventnote = 0; //Current note in the event (to support cycling through a chord). 1 for single note. 0 when not playing a note presently.
14
+
float transpose = 1;
15
+
unsignedlong eventstart = 0; //0 when not playing a song presently.
16
+
//we will only keep track of time since last event, thus bpm may vary due to rounding errors, but millis() rollover will only cause one event skip (I think?).
17
+
public:
18
+
Song(int zero) {}
19
+
voidplay(){
20
+
check(true); //the true means this starts the song
21
+
} //end void play
22
+
voidcheck(bool start){ if(start || curevent){ //if song starting or playing
23
+
unsignedlong mils = millis();
24
+
//Are we moving to a new event?
25
+
int neweventdiff = (eventtimes[curevent+1]-eventtimes[curevent])*(600/bpm); //*(600/bpm) converts diff in centibeats to milliseconds
26
+
if(start || mils-eventstart >= neweventdiff){
27
+
if(start) eventstart = mils; //true start of event
28
+
else eventstart = eventstart + neweventdiff; //set start of event relative to start of last, for better timekeeping
29
+
curevent++; //Next event
30
+
if(curevent+1 == 30){ curevent=1; } //Have we looped? Go back to first event //eventtimes.size
31
+
}
32
+
//Should we do anything about the current event?
33
+
int neweventnote = (((mils-eventstart)%120)/40)+1; //a cycle of 3 every 120 ms (40ms/ea), based on current time
34
+
switch(eventtypes[curevent]){ //The type of note/chord/stop
35
+
case1: //C Major chord, cycle of 523.25, 659.25, 784 Hz
0 commit comments