Base class for song effects.
More...
#include <jbwopreffects.h>
|
const std::vector< Note > * | _song = nullptr |
| Melody.
|
|
uint32_t | _step = 0 |
| Current step.
|
|
uint32_t | _tempo = 114 |
| Tempo.
|
|
uint32_t | _wholeNote = (60000 * 4) / _tempo |
| Whole note duration.
|
|
bool | _done = false |
| True if done.
|
|
JBWoprDevice * | _woprDevice |
| JBWoprDevice instance.
|
|
std::string | _name |
| Name of effect.
|
|
bool | _isRunning = false |
| True if effect is running.
|
|
bool | _done = true |
| True if effect is done, waiting for duration to end.
|
|
uint32_t | _duration = -1 |
| Duration of effect in milliseconds.
|
|
uint32_t | _startTime = 0 |
| Start time of effect in milliseconds.
|
|
uint32_t | _nextTick = 0 |
| Next tick time in milliseconds.
|
|
|
void | _displayText (const std::string &text, JBTextAlignment alignment=JBTextAlignment::LEFT) |
| Display text on raw display.
|
|
Base class for song effects.
◆ JBWoprSongEffect()
JBWoprSongEffect::JBWoprSongEffect |
( |
JBWoprDevice * |
woprBoard, |
|
|
const std::vector< Note > * |
song, |
|
|
uint32_t |
tempo = 114 , |
|
|
uint32_t |
duration = -1 , |
|
|
const std::string & |
name = JBWOPR_EFFECT_NAME_SONG |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
woprBoard | JBWoprDevice instance |
melody | Melody |
tempo | Tempo |
duration | Duration of effect (after it is done) in milliseconds, default is -1 (infinite) |
name | Name of effect, default is JBWOPR_EFFECT_NAME_SONG |
◆ loop()
void JBWoprSongEffect::loop |
( |
| ) |
|
|
overridevirtual |
◆ setSong()
void JBWoprSongEffect::setSong |
( |
const std::vector< Note > * |
song | ) |
|
|
virtual |
◆ setTempo()
void JBWoprSongEffect::setTempo |
( |
uint32_t |
tempo | ) |
|
|
virtual |
◆ start()
void JBWoprSongEffect::start |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: