forked from ewowi/StarBase
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UserModLive: artifx effects testing (WIP)
Added beatMania and Green Ripple Reflections pio.ini move to asmParser 2.1.1 LedEffects: add slider2 UserModLive: - add triangle, time, beatSin8, fadeToBlackBy, sCFP (Set color from pixel)
- Loading branch information
1 parent
39736a5
commit 5a4778c
Showing
5 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//from https://github.com/MoonModules/WLED-Effects/blob/master/ARTIFX/wled/beatmania.wled | ||
//Created by Andrew Tuline Converted by Ewoud Wijma | ||
|
||
uint8_t locn1; | ||
uint8_t locn2; | ||
uint8_t locn3; | ||
uint8_t locn12; | ||
|
||
uint8_t colr1; | ||
uint8_t colr2; | ||
uint8_t colr3; | ||
uint8_t colr12; | ||
|
||
uint8_t bri1; | ||
uint8_t bri2; | ||
uint8_t bri3; | ||
uint8_t bri12; | ||
|
||
void setup() | ||
{ | ||
} | ||
|
||
|
||
void loop() { | ||
|
||
//fadeToBlackBy(slider2/8); // Adjustable fade rate. | ||
|
||
locn1 = beatSin8(slider1/3+1,0,width) ; // Adjustable speed. | ||
locn2 = beatSin8(slider1/4+1,0,width); | ||
locn3 = beatSin8(slider1/5+1,0,width/2+width/3); | ||
|
||
colr1 = beatSin8(slider2/6+1,0,255); | ||
colr2 = beatSin8(slider2/7+1,0,255); | ||
colr3 = beatSin8(slider2/8+1,0,255); | ||
|
||
bri1 = beatSin8(slider2/6+1,32,255); | ||
bri2 = beatSin8(slider2/7+1,32,255); | ||
bri3 = beatSin8(slider2/8+1,32,255) ; // One too many beats. | ||
|
||
locn12 = locn1+locn2; | ||
colr12 = colr1+colr2; | ||
bri12 = bri1+bri2; | ||
sCFP(locn12,colr12,bri12); | ||
sCFP(locn1,colr2,bri1); | ||
sCFP(locn2%(width-1),colr1,bri2); | ||
} | ||
|
||
void main() { | ||
resetStat(); | ||
setup(); | ||
while (2>1) { | ||
loop(); | ||
show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//https://github.com/MoonModules/WLED-Effects/blob/master/ARTIFX/wled/green_ripple_reflections.wled | ||
//original from https://patterns.electromage.com/pattern/Ktjben4j36Wqxnk8N | ||
//Converted by Andrew Tuline and Ewoud Wijma | ||
|
||
float PI2; | ||
float PI6; | ||
float PI10; | ||
|
||
float t1; | ||
float t2; | ||
float t3; | ||
|
||
float a; | ||
float b; | ||
float c; | ||
float v; | ||
|
||
void setup() | ||
{ | ||
PI2 = 6.28318; | ||
PI6 = PI2 * 3; | ||
PI10 = PI2 * 5; | ||
} | ||
|
||
|
||
void loop() { | ||
|
||
t1 = time(0.03) * PI2; | ||
t2 = time(0.05) * PI2; | ||
t3 = time(0.04) * PI2; | ||
|
||
for (uint8_t index = 0; index < width; index++) { | ||
a = sin(index * PI10 / width + t1); | ||
a = a * a; | ||
b = sin(index * PI6 / width - t2); | ||
c = triangle(index * 3 / width + 1 + sin(t3) / 2 % 1); | ||
v = (a + b + c) / 3; | ||
v = v * v; | ||
//printCustom((float)index,a,b,c,v); | ||
CRGB gg = hsv(0.3 * 255, a * 255, v * 255); | ||
for (uint8_t y = 0; y < height; y++) { | ||
sPC(0, y*panel_width+index, gg); | ||
} | ||
} | ||
} | ||
|
||
void main() { | ||
resetStat(); | ||
setup(); | ||
while (2>1) { | ||
loop(); | ||
show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters