EffectChainCollection#
plupy.data.effect_chains: audio effect chains (filter, gainer, delay, reverb).
class EffectChainCollection(DataCollection)Inherits DataCollection: its members are documented there.
Usage and examples
Members: new
new#
new(name: str) -> EffectChainA new, empty effect chain (assign with sound.props["sound.effects"] = chain).
A stack of audio effects, first to last; a new chain is empty and holds at most 8. Kinds: "filter" (Analog Filter: mode "LowPass", "BandPass" or "HighPass", cutoff_hz 10 to 22000, resonance 0 to 1, drive_db 0 to 48), "gainer" (volume_db, panning -1 to 1), "delay" (left_ms, right_ms 1 to 2000, feedback 0 to 0.95, ping_pong, damp_hz 200 to 20000, wet_db, dry_db) and "reverb" (room_size, damping, width 0 to 1, pre_delay_ms 0 to 500, wet_db, dry_db); each also has bypassed. Delay and reverb run only where the sound is summed: a track (SoundSequence.set_track_effects), a sequence (props["sequence.effects"]) or a scene's mixer (props["scene.mixer.environment"], .music, .effects, .voice, .ui); a Sound's own chain skips them. add returns the effect's id; move(effect, 0) puts it first. An unknown setting raises TypeError, a value out of range PlupyError. Assign the chain to Sounds with props["sound.effects"]:
with plupy.edit("Radio voice"):
radio = plupy.data.effect_chains.new("Radio")
radio.add("filter", mode="BandPass", cutoff_hz=1800, resonance=0.4, drive_db=12)
radio.add("gainer", volume_db=-4)
voice.props["sound.effects"] = radio
with plupy.edit("Venue space"):
space = plupy.data.effect_chains.new("Venue space")
space.add("reverb", room_size=0.8, wet_db=-4, dry_db=-96) # the Environment bus is wet only
scene.props["scene.mixer.environment"] = space
song.props["sequence.environmentSend"] = 0.3 # sound.environmentSend on a Sound
echo = plupy.data.effect_chains.new("Echo")
echo.add("delay", left_ms=357, right_ms=476, feedback=0.38, ping_pong=True, wet_db=-9)
song.set_track_effects(2, echo) # by index or name; None removes itRelated types#
DataCollection · EffectChain · PlupyError · Sound · SoundSequence · edit
Source#
- _live.py:448