Package comp :: Module baseComp :: Class BaseComp
[hide private]
[frames] | no frames]

Class BaseComp

source code

Known Subclasses:
serialMelody.SerialMelody, randMelody.RandMelody

A base composition class, custom composition classes should inherit from this class.

Instance Methods [hide private]
  __init__(self)
Class contructor.
  perform(self, state=CONTINUE, beat=0)
Handle the starting stopping or continuing of the composition process.
  playEvent(self)
Get event data from composition method, play event to Csound, insert "next" event in theTime queue.
  getData(self)
Get parameter values for the next event in the composition.

Instance Variables [hide private]
  isPlaying
A flag indicating if the composition process should continue playing or not.
  eventCaller
Pointer to the event caller.

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Class contructor.
Parameters:
  • self - The object pointer.

perform(self, state=CONTINUE, beat=0)

source code 
Handle the starting stopping or continuing of the composition process.
Parameters:
  • self - The object pointer.
  • state - The playback state, can be START, CONTINUE, STOP
  • beat - The current beat count of the timed queue (self.eventCaller.theTime), may be fractional. This parameter is optional; if it is not supplied, the current beat count (integer) will be polled from theTime.

playEvent(self)

source code 
Get event data from composition method, play event to Csound, insert "next" event in theTime queue.
Parameters:
  • self - The object pointer.

getData(self)

source code 
Get parameter values for the next event in the composition. You should override this method with something useful.
Parameters:
  • self - The object pointer.

Instance Variable Details [hide private]

isPlaying

A flag indicating if the composition process should continue playing or not.

eventCaller

Pointer to the event caller.