Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::drum Namespace Reference

Classes

class  ClapVoice
 A hand clap. More...
class  CymbalVoice
 A cymbal, built from a bank of comb filters and then deliberately de-tuned out of any musical relationship. More...
class  FmDrumVoice
 A two-operator FM percussion voice. More...
class  Fm8DrumVoice
 An eight-operator FM percussion voice with a fixed algorithm table. More...
class  Fm6DrumVoice
 A six-operator FM voice with the classic thirty-two algorithm set. More...
struct  FmWaveTable
 A compact, license-clean bank of 26 phase-readable FM waves. More...
struct  FmTransient
class  HatVoice
 A hi-hat, and by extension every other struck metal in a kit. More...
struct  HitLifeDecision
class  HitLife
 Allocation-free shared sequencing for a voice's anti-machine-gun policy. More...
class  KickVoice
 A kick drum. More...
class  Kit
 A set of percussion voices summed into one output, with choke groups. More...
class  ClickLayer
 The transient: a burst of noise through a lowpass, decaying in a few milliseconds. More...
class  NoiseLayer
 The air a strike moves: a longer, coloured noise layer under the body. More...
class  ShellLayer
 A high-Q body resonance mixed back into an excitation path. More...
class  SubLayer
 A sine an octave below the body, gated by the body's own envelope. More...
class  MembraneVoice
 A struck membrane, modelled as its modes rather than as an oscillator. More...
class  OutputStageT
 The output stage every percussion voice ends with: fold, saturate, degrade, set the level, then apply an optional AHD/VCA. More...
class  SnareVoice
 A snare drum. More...
class  StringVoice
 A plucked or struck string, as a percussion voice. More...
class  TomVoice
 A tom, and the analogue electronic-drum voice it generalises. More...
struct  VelocityResponse
 How hard a hit changes the sound, beyond changing how loud it is. More...
class  Voice
 The lifecycle every percussion voice shares. More...
class  ZapVoice
 A zap: a phase-distortion percussion voice. More...

Typedefs

using OutputStage = OutputStageT<float>
using OutputStage64 = OutputStageT<double>

Enumerations

enum class  EngineId {
  kick_oscillator , kick_resonant , kick_circuit , snare ,
  hat , clap , tom_generic , tom_simmons ,
  cymbal_comb , membrane_modal , string_karplus_strong , zap_cz ,
  fm2 , fm6 , fm8 , dx7_msfa
}
 Stable identities for the drum engines Pulp can describe. More...
enum class  EngineProvenance { pulp_original , published_technique , license_hold }
enum class  HitLifeMode {
  fixed_seed , advancing_seed , preserved_state , fixed_seed_preserved_body ,
  advancing_seed_preserved_body
}
 Selects the intentional source of variation between otherwise identical hits. More...
enum class  KickBody { oscillator , resonant , circuit }
 How a kick's body is produced. More...
enum class  MembraneExciter { noise_burst , pluck }
 What strikes the modal membrane. More...
enum class  OutputOversampling { bypass = 1 , x2 = 2 , x4 = 4 }
 Realtime quality choices for the shared drum output nonlinearity. More...
enum class  StringModulation { none , fm , ring , sync }
enum class  VoiceState { idle , ringing , choking }
 Public lifecycle inspection for a drum voice. More...

Functions

const EngineMetadata * find_engine (std::string_view name) noexcept
std::unique_ptr< Voice > create_engine (EngineId id)
 Construct a configured engine by stable identity.

Variables

constexpr std::array< EngineMetadata, 16 > engine_registry
 The authoritative engine inventory.
constexpr std::array< FmTransient, 24 > kFmTransients
 Twenty-four original procedural strike recipes.

Typedef Documentation

◆ OutputStage

◆ OutputStage64

Enumeration Type Documentation

◆ EngineId

enum class pulp::signal::drum::EngineId
strong

Stable identities for the drum engines Pulp can describe.

An unavailable identity stays in this list when its provenance is useful to callers. That lets a preset loader distinguish "known but held" from an unknown engine without compiling or vendoring the held implementation.

Enumerator
kick_oscillator 
kick_resonant 
kick_circuit 
snare 
hat 
clap 
tom_generic 
tom_simmons 
cymbal_comb 
membrane_modal 
string_karplus_strong 
zap_cz 
fm2 
fm6 
fm8 
dx7_msfa 

◆ EngineProvenance

Enumerator
pulp_original 
published_technique 
license_hold 

◆ HitLifeMode

Selects the intentional source of variation between otherwise identical hits.

These are lifecycle policies, not random "humanize" amounts.

Two independent things happen on a hit: what the excitation stream does, and what the resonating body does. Every mode is one cell of that grid, so a voice never has to encode a policy outside this enum:

Mode Excitation Body
fixed_seed restart, base seed reset
advancing_seed restart, advancing reset
preserved_state continue uninterrupted preserved
fixed_seed_preserved_body restart, base seed preserved
advancing_seed_preserved_body restart, advancing preserved

Preserving the body is what stops a struck metal voice from sounding machine-gunned: the previous hit keeps ringing and the new excitation is added into a body that is already in motion, which is what happens when a real cymbal is struck twice.

Enumerator
fixed_seed 
advancing_seed 
preserved_state 
fixed_seed_preserved_body 
advancing_seed_preserved_body 

◆ KickBody

enum class pulp::signal::drum::KickBody
strong

How a kick's body is produced.

The three options are genuinely different instruments rather than three settings of one, which is why this is a mode switch and not a blend control.

Enumerator
oscillator 

A swept oscillator.

The pitch envelope is explicit, so the sweep is exactly what the controls say it is. This is the most controllable option and the one that reaches the deepest, longest sounds.

resonant 

A struck resonance.

There is no oscillator and no amplitude envelope on the body: an exciter rings a resonator and the ring is the sound, so what the strike sounds like changes what the body sounds like.

circuit 

The TR-808's bridged-T network in its op-amp feedback loop.

Nothing here is scripted – the pitch drop is the network retuning itself as its own ring amplitude falls, and the attack thump is a transistor shunt lifting the centre frequency for a few milliseconds. The trade is that the controls are component values and envelope timings, not "pitch" and "sweep".

◆ MembraneExciter

What strikes the modal membrane.

Enumerator
noise_burst 

A short filtered-noise burst: stick or hand depending on its length.

pluck 

One filtered sample: a true impulse that rings the body without a continuing noise texture.

◆ OutputOversampling

Realtime quality choices for the shared drum output nonlinearity.

x2 is the shipping default. It is the same 65-tap Kaiser half-band pair used by Pulp's character-delay hysteresis path. x4 cascades a second copy for unusually hard fold/drive settings. bypass deliberately preserves host-rate aliasing for period-authentic drum-machine sounds and removes the filter latency entirely.

Enumerator
bypass 
x2 
x4 

◆ StringModulation

Enumerator
none 
fm 
ring 
sync 

◆ VoiceState

enum class pulp::signal::drum::VoiceState
strong

Public lifecycle inspection for a drum voice.

This is intentionally not a serializable DSP snapshot: voices own heterogeneous filter, delay, and RNG state, so pretending one base blob can restore them would create a false portability contract. Plugin parameter/state persistence belongs above the voice; this value is for allocation, UI, and choke-policy decisions.

Enumerator
idle 
ringing 
choking 

Function Documentation

◆ create_engine()

std::unique_ptr< Voice > pulp::signal::drum::create_engine ( EngineId id)
inline

Construct a configured engine by stable identity.

This is a setup-time operation and may allocate. Held or unknown implementations return null.

◆ find_engine()

const EngineMetadata * pulp::signal::drum::find_engine ( std::string_view name)
inlinenoexcept

Variable Documentation

◆ engine_registry

std::array<EngineMetadata, 16> pulp::signal::drum::engine_registry
inlineconstexpr

The authoritative engine inventory.

Names are persistence-safe and must not be reused for a different topology.

◆ kFmTransients

std::array<FmTransient, 24> pulp::signal::drum::kFmTransients
inlineconstexpr
Initial value:
{{
{NoiseColor::white, 0.00, 3.0, 0.10, 9000.0, 0.7},
{NoiseColor::white, 0.05, 4.0, 0.14, 7500.0, 1.0},
{NoiseColor::white, 0.10, 5.0, 0.18, 6200.0, 1.3},
{NoiseColor::pink, 0.08, 7.0, 0.12, 5200.0, 1.8},
{NoiseColor::pink, 0.15, 10.0, 0.16, 4200.0, 2.4},
{NoiseColor::pink, 0.22, 14.0, 0.20, 3400.0, 3.0},
{NoiseColor::brown, 0.12, 18.0, 0.08, 2800.0, 3.8},
{NoiseColor::brown, 0.20, 24.0, 0.12, 2400.0, 4.8},
{NoiseColor::violet, 0.05, 2.0, 0.18, 12000.0, 0.5},
{NoiseColor::violet, 0.10, 3.0, 0.24, 10000.0, 0.8},
{NoiseColor::violet, 0.18, 5.0, 0.30, 8200.0, 1.1},
{NoiseColor::blue, 0.08, 7.0, 0.20, 7000.0, 1.5},
{NoiseColor::blue, 0.16, 10.0, 0.26, 5800.0, 2.0},
{NoiseColor::blue, 0.24, 14.0, 0.32, 4800.0, 2.7},
{NoiseColor::white, 0.30, 20.0, 0.10, 3600.0, 3.5},
{NoiseColor::pink, 0.35, 28.0, 0.14, 3000.0, 4.5},
{NoiseColor::brown, 0.30, 40.0, 0.08, 2200.0, 6.0},
{NoiseColor::violet, 0.28, 8.0, 0.36, 14000.0, 0.6},
{NoiseColor::blue, 0.32, 12.0, 0.40, 11000.0, 0.9},
{NoiseColor::white, 0.40, 18.0, 0.44, 8800.0, 1.4},
{NoiseColor::pink, 0.45, 26.0, 0.30, 6500.0, 2.2},
{NoiseColor::brown, 0.50, 38.0, 0.22, 4600.0, 3.4},
{NoiseColor::violet, 0.38, 16.0, 0.50, 12500.0, 1.0},
{NoiseColor::blue, 0.55, 30.0, 0.55, 7200.0, 2.8},
}}
@ blue
+3 dB/octave — the mirror of pink.
Definition noise_source.hpp:21
@ pink
-3 dB/octave — equal power per octave.
Definition noise_source.hpp:19
@ brown
-6 dB/octave — integrated white ("red" noise).
Definition noise_source.hpp:20
@ violet
+6 dB/octave — differentiated white ("purple" noise).
Definition noise_source.hpp:22
@ white
0 dB/octave — the raw generator output.
Definition noise_source.hpp:18

Twenty-four original procedural strike recipes.

These are synthesis settings, not sampled or matched values.