Skip to content

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

@feinstaub

Description

@feinstaub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions