Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
feinstaub opened this issue Jan 15, 2017 · 0 comments
Open

Comments

@feinstaub
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant