forked from cnlohr/colorchord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathembeddedout.h~
64 lines (43 loc) · 1.39 KB
/
embeddedout.h~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//Copyright 2015 <>< Charles Lohr under the ColorChord License.
#ifndef _EMBEDDEDOUT_H
#define _EMBEDDEDOUT_H
#include "embeddednf.h"
//Controls brightness
#ifndef NOTE_FINAL_AMP
#define NOTE_FINAL_AMP 12 //Number from 0...255
#endif
//Controls, basically, the minimum size of the splotches.
#ifndef NERF_NOTE_PORP
#define NERF_NOTE_PORP 15 //value from 0 to 255
#endif
#ifndef NUM_LIN_LEDS
#define NUM_LIN_LEDS 32
#endif
#ifndef USE_NUM_LIN_LEDS
#define USE_NUM_LIN_LEDS NUM_LIN_LEDS
#endif
#ifndef LIN_WRAPAROUND
//Whether the output lights wrap around.
//(Can't easily run on embedded systems)
#define LIN_WRAPAROUND 0
#endif
#ifndef SORT_NOTES
#define SORT_NOTES 0 //Whether the notes will be sorted. BUGGY Don't use.
#endif
extern uint8_t ledArray[];
extern uint8_t ledOut[]; //[NUM_LIN_LEDS*3]
extern uint8_t RootNoteOffset; //Set to define what the root note is. 0 = A.
extern bool needsLoad;
//For doing the nice linear strip LED updates
void UpdateLinearLEDs();
//For making all the LEDs the same and quickest. Good for solo instruments?
void UpdateAllSameLEDs();
//For making a chasing rainbow pattern with now sound detection`
void UpdateRainbow();
//For solid leds
void UpdateSolid();
//All leds offs
void UpdateOff();
uint32_t ECCtoHEX( uint8_t note, uint8_t sat, uint8_t val );
uint32_t EHSVtoHEX( uint8_t hue, uint8_t sat, uint8_t val ); //hue = 0..255 // TODO: TEST ME!!!
#endif