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

Fix Inconsistent Minimum Note Length #97

Merged
merged 5 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion basic_pitch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pathlib

__author__ = "Spotify"
__version__ = "0.2.6"
__version__ = "0.3.0"
__email__ = "basic-pitch@spotify.com"
__demowebsite__ = "https://basicpitch.io"
__description__ = "Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection."
Expand Down
4 changes: 2 additions & 2 deletions basic_pitch/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def predict_and_save(
model_path: Union[pathlib.Path, str] = ICASSP_2022_MODEL_PATH,
onset_threshold: float = 0.5,
frame_threshold: float = 0.3,
minimum_note_length: float = 58,
minimum_note_length: float = 127.70,
minimum_frequency: Optional[float] = None,
maximum_frequency: Optional[float] = None,
multiple_pitch_bends: bool = False,
Expand All @@ -372,7 +372,7 @@ def predict_and_save(
model_path: Path to load the Keras saved model from. Can be local or on GCS.
onset_threshold: Minimum energy required for an onset to be considered present.
frame_threshold: Minimum energy requirement for a frame to be considered present.
minimum_note_length: The minimum allowed note length in frames.
minimum_note_length: The minimum allowed note length in milliseconds.
minimum_freq: Minimum allowed output frequency, in Hz. If None, all frequencies are used.
maximum_freq: Maximum allowed output frequency, in Hz. If None, all frequencies are used.
multiple_pitch_bends: If True, allow overlapping notes in midi file to have pitch bends.
Expand Down
2 changes: 1 addition & 1 deletion basic_pitch/note_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def model_output_to_notes(
onset_thresh: float,
frame_thresh: float,
infer_onsets: bool = True,
min_note_len: int = 5,
min_note_len: int = 11,
min_freq: Optional[float] = None,
max_freq: Optional[float] = None,
include_pitch_bends: bool = True,
Expand Down
2 changes: 1 addition & 1 deletion basic_pitch/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main() -> None:
parser.add_argument(
"--minimum-note-length",
type=float,
default=58,
default=127.70,
help="The minimum allowed note length, in miliseconds.",
)
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.6
current_version = 0.3.0
commit = True
tag = True

Expand Down