wavebender
wavebender copied to clipboard
Command line argument -t: allow times which are fractions of seconds
In init.py these lines had to be changed (change type to float and then convert to int later):
...
parser.add_argument('-t', '--time', help="Duration of the wave in seconds.", default=60, type=float)
...
# convert the channel functions into waveforms
samples = compute_samples(channels, int(args.rate * args.time))
...
write_wavefile(filename, samples, int(args.rate * args.time), args.channels, args.bits // 8, args.rate)
to allow this:
$ python3 -m wavebender -t 0.5 -f 400 - | aplay