EffectPresets
index
/home/david/Projects/Jokosher/trunk/Jokosher/EffectPresets.py

#       THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE
#       THE 'COPYING' FILE FOR DETAILS
#
#       EffectPresets.py
#       
#       This module implements support for effects presets. These presets are used
#       to store settings for single effects and multiple effects strung together
#       (called a 'chain').
#
#       The way this works is that we have a LADSPA_FACTORY_REGISTRY filled with
#       the system's LADSPA effects, LADSPA_NAME_MAP which amps LADSPA element
#       factory names (Such as ladspa-delay-5s) to the effect name (such as
#       Simple Delay) and self.effectpresetsregistry which contains a generated
#       dictionary of effects. This dictionary is search with list comprehensions
#       to get the relavent presets out.
#
#-------------------------------------------------------------------------------

 
Modules
       
Globals
glob
gst
gtk
math
os
pygst
string
xml.dom.minidom

 
Classes
       
EffectPresets

 
class EffectPresets
    This class implements support for effects presets. These presets are used
to store settings for single effects and multiple effects strung together
(called a 'chain').
 
  Methods defined here:
FillEffectsPresetsRegistry(self)
Load all presets into the main presets registry.
FillLADSPARegistry(self)
Fill Globals.LADSPA_FACTORY_REGISTRY with effects on the system. This
is to ensure that only presets with effects on the current system are listed.
LoadInstrumentEffectChain(self, presetname)
Load settings from the preset file for an effects chain.
 
Parameters:
        presetname -- name of the preset to be loaded.
        
Returns:
        a settings dictionary with the loaded settings for the effects.
LoadInstrumentEffectList(self)
TODO -- This method is not yet implemented.
LoadSingleEffectList(self)
TODO -- This method is not yet implemented.
LoadSingleEffectSettings(self, effectelement, presetname)
Load effect settings from a preset file for a single effect.
 
Parameters:
        effectelement -- the effect element to be loaded.
        presetname -- the name of the preset to be loaded.
        
Returns:
        a settings dictionary with the loaded settings for the effect.
SaveEffectChain(self, label, effectlist, instrumenttype)
Write an effect chain to a preset file.
 
Parameters:
        label -- the name of the effect.
        effectlist -- the list of effects.
        instrumenttype -- the type of instrument currently being used.
SaveSingleEffect(self, label, effectdict, effectelement, effecttype)
This method will write a single effect preset to a preset file.
 
Parameters:
        label --the name of the effect.
        effectdict -- the effect dictionary.
        effectelement -- the effect that the user selected.
        effecttype -- the type of the effect the user selected.
__init__(self)
Creates a new instance of EffectsPresets. If needed, it populates the
LADSPA and effect presets registries.