Skip to content

Commit

Permalink
Add argument to tempo_aug (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
loubbrad authored Mar 5, 2024
1 parent 56b66ea commit 7c2c47e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aria/tokenizer/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,16 +819,18 @@ def tempo_aug(
instruments_wd: list,
_tempo_aug_range: float,
_mixup: bool,
tempo_aug: float | None = None,
):
"""This must be used with export_aug_fn_concat in order to work
properly for concatenated sequences."""

def _quantize_time(_n: int):
return round(_n / time_step) * time_step

tempo_aug = random.uniform(
1 - _tempo_aug_range, 1 + _tempo_aug_range
)
if not tempo_aug:
tempo_aug = random.uniform(
1 - _tempo_aug_range, 1 + _tempo_aug_range
)

src_time_tok_cnt = 0
dim_tok_seen = None
Expand Down

0 comments on commit 7c2c47e

Please sign in to comment.