wavebender icon indicating copy to clipboard operation
wavebender copied to clipboard

Command line argument -t: allow times which are fractions of seconds

Open feinstaub opened this issue 8 years ago • 0 comments

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

feinstaub avatar Jan 15 '17 22:01 feinstaub