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

Class BaseComp

source code

A simple test composition module. Generates melodies with limited random selection of pitch, delta, duration.

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