Package aldrin :: Module envelope :: Class EnvelopeView
[show private | hide private]
[frames | no frames]

Type EnvelopeView

        CanvasBase --+    
                     |    
object --+           |    
         |           |    
    Object --+       |    
             |       |    
    EvtHandler --+   |    
                 |   |    
            Window --+    
                     |    
                Canvas --+
                         |
                        EnvelopeView


Envelope viewer.

A drawing surface where you can specify how the volume of a sample changes over time.
Method Summary
  __init__(self, wavetable, *args, **kwds)
Initialization.
  DrawBuffer(self)
Overriding a Canvas method that paints onto an offscreen buffer.
  Enable(self, enable)
  env_to_pixel(self, x, y)
(int, int) get_point_at(self, position)
Finds an existing envelope point that matches the given position the best.
list get_translated_points(self)
Converts the envelope values to a list of pixel values.
  on_context_menu(self, event)
Callback that responds to context menu activation.
  on_delete_point(self, event)
Callback responding to the context menu item that deletes the current point of the envelope.
  on_enter(self, event)
Called when the mouse enters the envelope editor.
  on_leave(self, event)
Called when the mouse leaves the envelope editor.
  on_left_down(self, event)
Callback that responds to left mouse down over the envelope view.
  on_left_up(self, event)
Callback that responds to left mouse up over the envelope view.
  on_load(self, event)
Callback responding to the "load" context menu item.
  on_motion(self, event)
Callback that responds to mouse motion over the envelope view.
  on_reset(self, event)
Callback responding to the "reset" context menu item.
  on_save(self, event)
Callback responding to the "save" context menu item.
  on_set_sustain(self, event)
Callback responding to the context menu item that sets the current point to sustain mode.
(int, int) pixel_to_env(self, position)
Converts a (x,y) pixel coordinate into an envelope point value.
  update(self)
Updates the envelope view based on the sample selected in the sample list.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
int DELETE = 103                                                                   
int LOAD = 105                                                                   
int RESET = 104                                                                   
int SAVE = 106                                                                   
int SUSTAIN = 102                                                                   

Instance Method Details

__init__(self, wavetable, *args, **kwds)
(Constructor)

Initialization.
Overrides:
aldrin.canvas.Canvas.__init__

DrawBuffer(self)

Overriding a Canvas method that paints onto an offscreen buffer. Draws the envelope view graphics.
Overrides:
aldrin.canvas.CanvasBase.DrawBuffer

get_point_at(self, position)

Finds an existing envelope point that matches the given position the best.
Parameters:
position - Pixel coordinate.
           (type=(int, int))
Returns:
(index, match) that represents the index of a point and whether it matches exactly or not (with EXACT and NEXT).
           (type=(int, int))

get_translated_points(self)

Converts the envelope values to a list of pixel values.
Returns:
Pixel values.
           (type=list)

on_context_menu(self, event)

Callback that responds to context menu activation.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

on_delete_point(self, event)

Callback responding to the context menu item that deletes the current point of the envelope.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

on_enter(self, event)

Called when the mouse enters the envelope editor.

on_leave(self, event)

Called when the mouse leaves the envelope editor.

on_left_down(self, event)

Callback that responds to left mouse down over the envelope view.
Parameters:
event - MouseEvent event
           (type=wx.MouseEvent)

on_left_up(self, event)

Callback that responds to left mouse up over the envelope view.
Parameters:
event - MouseEvent event
           (type=wx.MouseEvent)

on_load(self, event)

Callback responding to the "load" context menu item.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

on_motion(self, event)

Callback that responds to mouse motion over the envelope view.
Parameters:
event - MouseEvent event
           (type=wx.MouseEvent)

on_reset(self, event)

Callback responding to the "reset" context menu item.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

on_save(self, event)

Callback responding to the "save" context menu item.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

on_set_sustain(self, event)

Callback responding to the context menu item that sets the current point to sustain mode.
Parameters:
event - CommandEvent event
           (type=wx.CommandEvent)

pixel_to_env(self, position)

Converts a (x,y) pixel coordinate into an envelope point value.
Parameters:
position - Pixel coordinate.
           (type=(int, int))
Returns:
(time, amplitude) point on the envelope.
           (type=(int, int))

update(self)

Updates the envelope view based on the sample selected in the sample list.

Class Variable Details

DELETE

Type:
int
Value:
103                                                                   

LOAD

Type:
int
Value:
105                                                                   

RESET

Type:
int
Value:
104                                                                   

SAVE

Type:
int
Value:
106                                                                   

SUSTAIN

Type:
int
Value:
102                                                                   

Generated by Epydoc 2.1 on Sun Feb 4 18:01:15 2007 http://epydoc.sf.net