I’ve found Desmos really helpful for crafting waveforms. Here’s my template that includes all the Pixelblaze builtin functions:
Here are some functions I’ve been working on this holdiay season:
Fade through black (for less sudden transitions in Firestorm playlists)
// Fade in/out through black
// https://www.desmos.com/calculator/5zwjxh0tys
var fBDuration = 25 // Total pattern duration in seconds
var fBFade = 2 // Fade duration
var initFBOffset = time(fBDuration / 65.536) // Value of timer at pattern initiation
function fBV() {
var t = ( 1 + time(fBDuration / 65.536) - initFBOffset ) % 1
var _v = min(1, fBDuration / 2 / fBFade * triangle(t))
return _v * _v // ease in, ease out
// return _v // linear
// return sqrt(_v) // sudden in / sudden out
}
var fIO // 0-1 Multiplier for fade-in-out
fIO = fBV() // Put this in beforeRender
// In render, scale your v like this
hsv(h, s, v * fIO)