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

Type EnvelopeView

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, *args, **kwds)
Initialization.
  DrawBuffer(self)
Overriding a Canvas method that paints onto an offscreen buffer.
  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_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_motion(self, event)
Callback that responds to mouse motion over the envelope view.
  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 Canvas
  Blit(self, dc)
Performs the blit of the buffer contents on-screen.
  GetBoundingRect(self)
Returns a tuple that contains the co-ordinates of the top-left and bottom-right corners of the canvas.
  MakeNewBuffer(self)
  onEraseBackground(self, event)
  onPaint(self, event)
Renders the off-screen buffer on-screen.
  onPostPaint(self, dc)
  onSize(self, event)
Perform actual redraw to off-screen buffer only when the size of the canvas has changed.
  ReDraw(self, *args, **kargs)
Explicitly tells the canvas to redraw it's contents.
  Refresh(self)
    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 = 8824                                                                  
int SUSTAIN = 8823                                                                  
    Inherited from Canvas
bool doublebuffered = True

Instance Method Details

__init__(self, *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.Canvas.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_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_motion(self, event)

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

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:
8824                                                                  

SUSTAIN

Type:
int
Value:
8823                                                                  

Generated by Epydoc 2.1 on Fri Nov 24 13:58:33 2006 http://epydoc.sf.net