Skip to content

Commit

Permalink
adding TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
pseeth committed Apr 2, 2019
1 parent 3c83bba commit 6f8891a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scaper/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from .audio import get_integrated_lufs
from .version import version as scaper_version

# TODO: for seeding, turn these into more complex functions in util?
SUPPORTED_DIST = {"const": lambda x: x,
"choose": lambda x: random.choice(x),
"uniform": random.uniform,
Expand Down Expand Up @@ -244,7 +245,7 @@ def trim(audio_infile, jams_infile, audio_outfile, jams_outfile, start_time,
# Copy result back to original file
shutil.copyfile(tmpfiles[-1].name, audio_outfile)


# TODO: this should take a np.RandomSeed object (default to None)
def _get_value_from_dist(dist_tuple):
'''
Sample a value from the provided distribution tuple.
Expand Down Expand Up @@ -731,7 +732,7 @@ def _validate_event(label, source_file, source_time, event_time,
# Time stretch
_validate_time_stretch(time_stretch)


# TODO: add a seed parameter in init that defaults to None
class Scaper(object):
'''
Create a Scaper object.
Expand Down
2 changes: 1 addition & 1 deletion scaper/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _populate_label_list(folder_path, label_list):
# ensure consistent ordering of labels
label_list.sort()


# TODO: add a seed parameter here for seeding
def _trunc_norm(mu, sigma, trunc_min, trunc_max):
'''
Return a random value sampled from a truncated normal distribution with
Expand Down

0 comments on commit 6f8891a

Please sign in to comment.