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
io
boopak.pinfo
boodle.stereo

 
Classes
       
boodle.agent.Agent(builtins.object)
FadeInOutAgent
FadeOutAgent
NullAgent
SetPanAgent
SetVolumeAgent
StopAgent
TestSoundAgent

 
class FadeInOutAgent(boodle.agent.Agent)
    FadeInOutAgent(agentinst, liveinterval=10.0, fadeinterval=1.0, fadeoutinterval=None)
 
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.
 
 
Method resolution order:
FadeInOutAgent
boodle.agent.Agent
builtins.object

Methods defined here:
__init__(self, agentinst, liveinterval=10.0, fadeinterval=1.0, fadeoutinterval=None)
Initialize self.  See help(type(self)) for accurate signature.
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class FadeOutAgent(boodle.agent.Agent)
    FadeOutAgent(duration=0.005)
 
FadeOutAgent(interval):
 
This agent causes a channel to fade down to zero volume over a
given interval, and then stop.
 
 
Method resolution order:
FadeOutAgent
boodle.agent.Agent
builtins.object

Methods defined here:
__init__(self, duration=0.005)
Initialize self.  See help(type(self)) for accurate signature.
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class NullAgent(boodle.agent.Agent)
    NullAgent(*args, **kwargs)
 
NullAgent:
 
This agent does nothing.
 
 
Method resolution order:
NullAgent
boodle.agent.Agent
builtins.object

Methods defined here:
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class SetPanAgent(boodle.agent.Agent)
    SetPanAgent(newpan, duration=0.5)
 
SetPanAgent:
 
This agent causes a channel to change to a given pan position. (See
Channel.set_pan.)
 
 
Method resolution order:
SetPanAgent
boodle.agent.Agent
builtins.object

Methods defined here:
__init__(self, newpan, duration=0.5)
Initialize self.  See help(type(self)) for accurate signature.
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class SetVolumeAgent(boodle.agent.Agent)
    SetVolumeAgent(newvol, duration=0.005)
 
SetVolumeAgent:
 
This agent causes a channel to change to a given volume. (See
Channel.set_volume.)
 
 
Method resolution order:
SetVolumeAgent
boodle.agent.Agent
builtins.object

Methods defined here:
__init__(self, newvol, duration=0.005)
Initialize self.  See help(type(self)) for accurate signature.
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class StopAgent(boodle.agent.Agent)
    StopAgent(*args, **kwargs)
 
StopAgent:
 
This agent causes a channel to stop playing. (See Channel.stop.)
All notes and agents in the channel (and subchannels) will be
discarded.
 
 
Method resolution order:
StopAgent
boodle.agent.Agent
builtins.object

Methods defined here:
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

 
class TestSoundAgent(boodle.agent.Agent)
    TestSoundAgent(*args, **kwargs)
 
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.
 
 
Method resolution order:
TestSoundAgent
boodle.agent.Agent
builtins.object

Methods defined here:
get_title(self)
get_title() -> string
 
Return the name of the agent. This normally returns the title
value from the agent's metadata. (An agent class can override
this behavior, but there is usually no reason to do so.)
run(self)
run()
 
Perform the agent's action. Each subclass of Agent must override
this method.

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']