One trigger in, a burst of N triggers out, with a spacing curve and a level ramp.
More...
|
| void | prepare (double sample_rate) |
| void | set_count (int n) |
| | Changing the count while the burst is idle keeps it idle: next_index_ marks "finished" by sitting at the count, so growing the count without this guard would resume a finished burst and fire hits no trigger asked for.
|
| int | count () const |
| void | set_spacing_ms (double ms) |
| void | set_spacing_curve (float c) |
| void | set_levels (SampleType first, SampleType last) |
| void | set_interval_ms (double ms) |
| double | interval_ms () const |
| void | reset () |
| Hit | process (bool trigger) |
| | At most one hit fires per sample.
|
| bool | process (SampleType trigger) |
| long long | hit_offset_samples (int index) const |
| | Sample offset of hit index from the burst's trigger.
|
| bool | active () const |
| bool | busy () const |
template<typename SampleType = float>
class pulp::signal::BurstGenT< SampleType >
One trigger in, a burst of N triggers out, with a spacing curve and a level ramp.
Hit i of count fires at span * stage_curve(i / (count - 1), spacing_curve), where span = (count - 1) * spacing_ms. The curve is the shared stage-shaping law, so spacing_curve = 0 is even spacing, +1 accelerates (gaps shrink — a bouncing ball landing), and -1 decelerates (gaps grow — a drag).
RT contract: fixed scalar state; process() and reset() allocate nothing.
USE: ratchet fills; strum-like event fans; bouncing-ball gestures. Feed the output to LpgT::strike() with the per-hit level and you have a playable percussion roll from two primitives.