Python: module boodle.builtin

boodle.builtin | index boodle/builtin.py

`builtin: A module containing useful utility Agent classes.
These Agents are too important to be distributed in an optional package;
they need to be available always.
NullAgent -- does nothing
StopAgent -- causes a channel to stop playing
SetVolumeAgent -- causes a channel to change to a given volume
SetPanAgent -- causes a channel to change to a given pan position
FadeOutAgent -- causes a channel to fade down to zero volume over an interval
FadeInOutAgent -- creates a channel that fades up, holds, and fades out
TestSoundAgent -- plays a little test melody`

Modules
`` |  |
boodle.agent | cStringIO | boopak.pinfo | boodle.stereo

Classes
`` |  | boodle.agent.Agent FadeInOutAgent FadeOutAgent NullAgent SetPanAgent SetVolumeAgent StopAgent TestSoundAgent
class FadeInOutAgent(boodle.agent.Agent)
`` | `FadeInOutAgent(agent, liveinterval, fadeinterval, fadeoutinterval=fadeinterval): This agent creates a channel with an agent, and causes that channel to fade up from zero volume, remain at full volume, and then fade out and stop. The fadeinterval is the time the channel takes to fade in or out. The liveinterval is the duration of maximum volume (from the end of fade-in to the beginning of fade-out). If two intervals are given, the first is the fade-in time, and the second is the fade-out time.`
| Methods defined here: __init__(self, agentinst, liveinterval=10.0, fadeinterval=1.0, fadeoutinterval=None) get_title(self) run(self)
class FadeOutAgent(boodle.agent.Agent)
`` | `FadeOutAgent(interval): This agent causes a channel to fade down to zero volume over a given interval, and then stop.`
| Methods defined here: __init__(self, duration=0.0050000000000000001) get_title(self) run(self)
class NullAgent(boodle.agent.Agent)
`` | `NullAgent: This agent does nothing.`
| Methods defined here: get_title(self) run(self)
class SetPanAgent(boodle.agent.Agent)
`` | `SetPanAgent: This agent causes a channel to change to a given pan position. (See Channel.set_pan.)`
| Methods defined here: __init__(self, newpan, duration=0.5) get_title(self) run(self)
class SetVolumeAgent(boodle.agent.Agent)
`` | `SetVolumeAgent: This agent causes a channel to change to a given volume. (See Channel.set_volume.)`
| Methods defined here: __init__(self, newvol, duration=0.0050000000000000001) get_title(self) run(self)
class StopAgent(boodle.agent.Agent)
`` | `StopAgent: This agent causes a channel to stop playing. (See Channel.stop.) All notes and agents in the channel (and subchannels) will be discarded.`
| Methods defined here: get_title(self) run(self)
class TestSoundAgent(boodle.agent.Agent)
`` | `TestSoundAgent: Plays a little test melody. This does some under-the-cover contortions to create a sound sample without loading any Boodler modules from the external module collection.`
| Methods defined here: get_title(self) run(self) Static methods defined here: getsound() `getsound() -> File Create a sound sample object for a short musical note. The AIFF sound data is kept in memory, not stored in an actual file anywhere. This caches the File object; if you call it more than once, you'll get the same File.` makesound(fl) `makesound(fl) -> None Generate AIFF sound data for a short musical note, and write the AIFF to the given file.` Data and other attributes defined here: sound = None

Data
`` |  | __all__ = ['NullAgent', 'StopAgent', 'SetVolumeAgent', 'SetPanAgent', 'FadeOutAgent', 'FadeInOutAgent', 'TestSoundAgent']