Files @ d5858e9fa689
Branch filter:

Location: light9/bin/wavecurve

David McClosky
keyboardcomposer destroy fix and cleanups
- We were destroying KeyboardComposer a little too much. Fortunately,
we weren't passing the right number of arguments, so this was merely
an error.
- About the TODO comment removed: we don't need to use combine_dict
since Submaster logic will be changed entirely when we/if we move
to a SubServer world and keyboard composer will not be the wiser.
#!/usr/bin/env python
import os, sys, optparse
import run_local
from light9.wavepoints import simp

parser = optparse.OptionParser(usage="%prog inputSong.wav outputCurve")
parser.add_option("-t",type="float",default=.01,
                  help="seconds per sample (default .01, .07 is smooth)")
options,args = parser.parse_args()

inpath,outpath = args

points = simp(inpath, seconds_per_average=options.t)

f = file(outpath, 'w')
for time_val in points:
    print >>f, "%s %s" % time_val