Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Framework/Core/Event.py
blob: 123a740cda34bcd15610293e60854513a6130655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#----------------------------------------------------------------------
# A base class for things that can be played at a given instant
# An onset < 0 implies the Event should be played immediately
#----------------------------------------------------------------------
class Event:
    #-----------------------------------
    # initialization
    #-----------------------------------
    def __init__( self, onset ):
	   self.onset = onset

    #-----------------------------------
    # playback (must be implemented by subclasses)
    #-----------------------------------
    def play( self ):
	   raise NotImplementedError

    #-----------------------------------
    # adjustment
    #-----------------------------------
    def adjustOnset( self, amount ):
	   self.onset += amount