asweigart / asweigart/pyaudacity

pa.beat_finder(thresval=x) thresval parameter ignored

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
38
Forks
8
PR merge metrics
No merged PRs in 30d

Description

To reproduce:
1. Run `pa.do('BeatFinder: thresval="5"')` on an audio track.
2. Run `pa.do('BeatFinder: thresval="60"')` on the same audio track.
3. Two Label tracks are generated with different content.
4. Run `pa.beat_finder(thresval=5)`. Observe: The generated label track does not correspond to
`pa.do('BeatFinder: thresval="5"')`.

`thresval` seems to be ignored when passing as parameter to `beat_finder`, but works for `pa.do('BeatFinder: thresval="x"')`.

Reason: format is [applied to the result of the function instead of the argument](https://github.com/asweigart/pyaudacity/blob/cac25cf282ab8eaa1d07ffa6df363584fb21a4a5/src/pyaudacity/__init__.py#L2653)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/pyaudacity/__init__.py#L2653, where the issue reports that formatting is applied incorrectly. Reproduce the two pa.do BeatFinder calls and compare them with pa.beat_finder(thresval=5); done means the function call produces the same label-track content as the matching pa.do command.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.