#!/usr/bin/python2.2

import sys
sys.path.insert(0, ".")
import soundcard

#soundcard.initialise("/dev/sequencer", 0)
soundcard.initialise_devicefile("/dev/music", 2)
#soundcard.initialise("drvmidi -i d %s")

t = soundcard.Track()
t.set_bpm(120, 4)
t.note(4, 9, 60, 100)
t.notelen_time(4)
t.note(4, 9, 64, 100)
t.notelen_time(4)
t.note(4, 9, 67, 100)
t.notelen_time(4)

print "Playing three short sounds"

soundcard.synth.play_track(t)

import sys
print "press <enter> to close the device"
sys.stdin.readline()
soundcard.synth.close()
