Package PMIDI :: Module Composer :: Class Measure
[show private | hide private]
[frames | no frames]

Type Measure

object --+
         |
        Measure


Class that represents a single measure for a voice.
Method Summary
  __init__(self, channel, measure_number)
Initialize an instance.
  ClearNotes(self)
Get rid of all the held notes.
  NewHit(self, beat, duration, name)
Generate a new note object for a drumset and store it.
  NewNote(self, beat, duration, name, octave)
Create a new note in this measure and store it.
list of integer Sequence(self)
Generate a list of all the notes and their stop partners.
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variable Summary
integer channel: Channel the notes in this measure will sound play on
integer measure_number: The position of this measure with respect to all other measures
list of Note notes: All of the notes starting in this measure

Method Details

__init__(self, channel, measure_number)
(Constructor)

Initialize an instance.
Parameters:
channel - Channel the notes in this measure will sound play on
           (type=integer)
measure_number - The position of this measure with respect to all other measures
           (type=integer)
Overrides:
__builtin__.object.__init__

ClearNotes(self)

Get rid of all the held notes.

NewHit(self, beat, duration, name)

Generate a new note object for a drumset and store it.
Parameters:
beat - Beat to sound the hit in the current measure (0-64)
           (type=integer)
duration - Duration of the note in beats
           (type=integer)
name - Name of the instrument in the drum kit to hit
           (type=string)

NewNote(self, beat, duration, name, octave)

Create a new note in this measure and store it.
Parameters:
beat - Beat to start sounding note in current measure (0-64)
           (type=integer)
duration - Duration of the note in beats
           (type=integer)
name - Note name
           (type=string)
octave - Octave of the note (5 is middle)
           (type=integer)

Sequence(self)

Generate a list of all the notes and their stop partners.
Returns:
Sequenced notes in this measure
           (type=list of integer)

Instance Variable Details

channel

Channel the notes in this measure will sound play on
Type:
integer

measure_number

The position of this measure with respect to all other measures
Type:
integer

notes

All of the notes starting in this measure
Type:
list of Note

Generated by Epydoc 2.1 on Tue Feb 22 16:24:34 2005 http://epydoc.sf.net