-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from gituser12981u2/develop
updated to flake8 standards and fixed ci pipeline
- Loading branch information
Showing
3 changed files
with
90 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
from .visualizer import AudioVisualizer | ||
|
||
|
||
def main(): | ||
"""Entry point for the audio visualizer command line interface.""" | ||
import argparse | ||
parser = argparse.ArgumentParser(description="Terminal Audio Visualizer") | ||
parser.add_argument('--mode', choices=['vertical', 'horizontal'], default='vertical', help="Choose visualization mode: vertical or horizontal") | ||
parser.add_argument('--alpha', type=float, default=0.2, help="Smoothing factor for FFT; default is 0.2. Raise if you want it to be less charming") | ||
parser.add_argument('--chunk', type=int, default=2048, help="Number of frames per buffer; default is 2048") | ||
parser.add_argument('--rate', type=int, default=44100, help="Sampling rate; default is 44100") | ||
parser.add_argument('--bar_count', type=int, default=75, help="Number of bars in the visualization; default is 75") | ||
parser.add_argument('--mode', choices=['vertical', 'horizontal'], | ||
default='vertical', | ||
help="Choose visualization mode: vertical or horizontal") # noqa: E501 | ||
parser.add_argument('--alpha', type=float, default=0.2, | ||
help="Smoothing factor for FFT; default is 0.2. Raise if you want it to be less charming") # noqa: E501 | ||
parser.add_argument('--chunk', type=int, default=2048, | ||
help="Number of frames per buffer; default is 2048") # noqa: E501 | ||
parser.add_argument('--rate', type=int, default=44100, | ||
help="Sampling rate; default is 44100") | ||
parser.add_argument('--bar_count', type=int, default=75, | ||
help="Number of bars in the visualization; default is 75") # noqa: E501 | ||
args = parser.parse_args() | ||
|
||
visualizer = AudioVisualizer(mode=args.mode, alpha=args.alpha, chunk=args.chunk, rate=args.rate, bar_count=args.bar_count) | ||
visualizer = AudioVisualizer(mode=args.mode, alpha=args.alpha, | ||
chunk=args.chunk, rate=args.rate, | ||
bar_count=args.bar_count) | ||
visualizer.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters