Package control :: Module eventCaller :: Class EventCaller
[hide private]
[frames] | no frames]

Class EventCaller

source code

The central control and communitation module

All events from the user interface(s) are sent here. All events from the timed queue are processed here. EventCaller also communicates with the compositional logic, and with Csound through cs.messages.

Instance Methods [hide private]
  __init__(self)
## Class constructor.
  initValues(self)
Initialize the system.
  perform(self, module, state)
Wrapper for (any) composition module's perform method.
  setParameter(self, module, parameter, value)
Set a parameter for a composition module.
  parseEvent(self, event)
Parsing of events output from queue, called from theTime.
  startStopClock(self, state, offset=1)
Start or stop the timed queue clock
  setTimeBpm(self, bpm)
Set tempo in bpm for the variable-tempo timed queue.
  startThreads(self)
Start timed queue (sequencer) threads.
  stopThreads(self)
Stop timed queue (sequencer) threads.
  setPointers(self, csMessages, theTime)
Set pointers to other modules in the system.
  recordAudio(self, state, name="demofile.wav")
Make an audio recording of a realtime session.

Instance Variables [hide private]
  csMessages
Pointer to csMessages instance.
  rMelody1
Instance of the RandMelody composition class.
  rMelody2
Instance of the RandMelody composition class.
  sMelody1
Instance of the SerialMelody composition class.
  sMelody2
Instance of the SerialMelody composition class.
  theTimeSeconds
Instance of a relaxed timed queue used for slow automation (seconds, minutes, hours).
  theTime
Pointer to a precise timed queue, clock slaved to Csound control rate.

Method Details [hide private]

__init__(self)
(Constructor)

source code 
## Class constructor. # # @param self: The object pointer.

initValues(self)

source code 

Initialize the system.

This includes setting various initial values and instantiating csound instruments as needed for normal operation.
Parameters:
  • self - The object pointer.

perform(self, module, state)

source code 
Wrapper for (any) composition module's perform method.
Parameters:
  • self - The object pointer.
  • module - The composition module to perform.

setParameter(self, module, parameter, value)

source code 
Set a parameter for a composition module.
Parameters:
  • self - The object pointer.
  • module - The composition module to set a parameter value for.
  • parameter - The parameter name.
  • value - The value to set the parameter to.

parseEvent(self, event)

source code 
Parsing of events output from queue, called from theTime.
Parameters:
  • self - The object pointer.
  • event - The event to be parsed.

startStopClock(self, state, offset=1)

source code 
Start or stop the timed queue clock
Parameters:
  • self - The object pointer.
  • state - The state (1 or 0) for the clock. Clock runs while state is 1, pause when state is 0.

setTimeBpm(self, bpm)

source code 
Set tempo in bpm for the variable-tempo timed queue.
Parameters:
  • self - The object pointer.
  • bpm - The tempo in bpm.

startThreads(self)

source code 
Start timed queue (sequencer) threads.
Parameters:
  • self - The object pointer.

stopThreads(self)

source code 
Stop timed queue (sequencer) threads.
Parameters:
  • self - The object pointer.

setPointers(self, csMessages, theTime)

source code 
Set pointers to other modules in the system.
Parameters:
  • self - The object pointer.
  • csMessages - Pointer to the csMessages object.
  • theTime - Pointer to the theTime object

recordAudio(self, state, name="demofile.wav")

source code 
Make an audio recording of a realtime session.
Parameters:
  • self - The object pointer.
  • state - START to start recording, STOP to stop.
  • name - The file name to record audio to.

Instance Variable Details [hide private]

csMessages

Pointer to csMessages instance.

rMelody1

Instance of the RandMelody composition class.

rMelody2

Instance of the RandMelody composition class.

sMelody1

Instance of the SerialMelody composition class.

sMelody2

Instance of the SerialMelody composition class.

theTimeSeconds

Instance of a relaxed timed queue used for slow automation (seconds, minutes, hours).

theTime

Pointer to a precise timed queue, clock slaved to Csound control rate.