Example #1
0
def emitter():
    source = MIDISource("sequence emitter")
    def logsend(data):
        print data
        source.send(data)
    countdown()
    play(song, source.send)
Example #2
0
def main(args):
    if not args[1:]:
        print "Usage runner.py <song.py>"
        return 1

    mod = args[1]
    m = __import__(mod, globals(), locals(), ['x'])

    source = MIDISource("musi emitter")
    send_midi = source.send

    countdown()
    while True:
        m = reload(m)
        song = m.song
        print "Playing."
        try:
            play(song, send_midi)
        except KeyboardInterrupt:
            print "Interrupted. Hit enter."
            input()
Example #3
0
def emitter():
    def logsend(data):
        print data
        source.send(data)
    countdown()
    play(song, source.send)
Example #4
0
def emitter():
    source = MIDISource("random note emitter")
    countdown()
    play(song, source.send)