Skip to content

Commit

Permalink
Reordered arguments, made comments consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
rnnh committed Mar 15, 2022
1 parent 9968b37 commit 7aed651
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ $ python vaporiser.py --help
```
usage: vaporiser.py [-h] [-o OUTPUT_NAME] -a AUDIO_INPUT [-s SPEED_RATIO]
[-p PITCH_SHIFT] [-l LOWPASS_CUTOFF] [-b BASS_BOOST]
[-ga GAIN_DB] [-tr] [-ph] [-co] [-g GIF_FILE] [-sb]
[-ga GAIN_DB] [-op] [-ph] [-tr] [-co] [-g GIF_FILE] [-sb]
Creates a vaporwave (slowed, with reverb) remix of a given MP3 file, with the
option of playing over a looped GIF as a video.
Creates a vaporwave (slowed, with reverb) remix of a given MP3 file, with
multiple audio effects available, and the option of playing over a looped GIF
as a video.
options:
-h, --help show this help message and exit
Expand Down Expand Up @@ -130,8 +131,12 @@ extra audio arguments:
None)
-ga GAIN_DB, --gain GAIN_DB
Applies gain (dB). (default: None)
-tr, --tremolo Enable tremolo effect. (default: False)
-op, --oops Applies Out Of Phase Stereo effect. This is sometimes
known as the ‘karaoke’ effect as it often has the
effect of removing most or all of the vocals from a
recording. (default: False)
-ph, --phaser Enable phaser effect. (default: False)
-tr, --tremolo Enable tremolo effect. (default: False)
-co, --compand Enable compand, which compresses the dynamic range of
the audio. (default: False)
Expand Down
29 changes: 15 additions & 14 deletions vaporiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def main():
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=(
"Creates a vaporwave (slowed, with reverb) remix of a given MP3 file, with"
" the option of playing over a looped GIF as a video."
" multiple audio effects available, and the option of playing over a looped"
" GIF as a video."
),
)

Expand Down Expand Up @@ -108,14 +109,6 @@ def main():
action="store_true",
)

audio_arguments_optional.add_argument(
"-tr",
"--tremolo",
dest="tremolo",
help="Enable tremolo effect.",
action="store_true",
)

audio_arguments_optional.add_argument(
"-ph",
"--phaser",
Expand All @@ -124,6 +117,14 @@ def main():
action="store_true",
)

audio_arguments_optional.add_argument(
"-tr",
"--tremolo",
dest="tremolo",
help="Enable tremolo effect.",
action="store_true",
)

audio_arguments_optional.add_argument(
"-co",
"--compand",
Expand Down Expand Up @@ -185,27 +186,27 @@ def main():
# ...pitch shift
fx = AudioEffectsChain().pitch(args.pitch_shift)

# Adds tremolo effect to the audio effects chain
# Adding tremolo effect to the audio effects chain
if args.tremolo:
fx = fx.tremolo(freq=500, depth=50)

# Adds a phaser to the audio effects chain
# Adding phaser to the audio effects chain
if args.phaser:
# fx.phaser(gain_in, gain_out, delay, decay, speed)
fx = fx.phaser(0.9, 0.8, 2, 0.2, 0.5)

# Applies gain to the audio effects chain
# Adding gain to the audio effects chain
if args.gain_db is not None:
fx = fx.gain(db=args.gain_db)

# Applies compand to the audio effects chain
# Adding compand to the audio effects chain
if args.compand:
fx = fx.compand()

# Adding reverb, lowpass filter, speed alteration to audio effects chain
fx = fx.speed(args.speed_ratio).lowpass(args.lowpass_cutoff).reverb()

# Adds OOPS to audio effects chain
# Adding OOPS to audio effects chain
if args.oops:
fx = fx.custom("oops")

Expand Down

0 comments on commit 7aed651

Please sign in to comment.