Open beasteers opened 5 years ago
This is in reference to #41
This looks somewhat related to the changes in #53, if you want to take a look at that. Instead of hard-coding defaults for source_time, you can pass in something like ('uniform', 0, 100000), where the last number is just some number bigger than the duration of all your source files and it'll fall back to doing ('uniform', 0, source_duration - event_duration). Similar logic is implemented for the other supported distributions.
Oh wow that's some timing lol. K, I'll look into it when I can get a minute. Hopefully we can merge them, because I still think having default values across the board is intuitive, like I think you should be able to do:
sc.add_background(label=('const', 'street'))
sc.add_event(label=('const', 'bird'))
sc.add_event(label=('const', 'car_honking'))
sc.add_event() # any random event
and have it generate valid soundscapes based on the limited information you give it.
See my latest comment on #41
Here is a summary of the defaults that I added:
The ones that are most beneficial are the
source_time
,event_time
, and theevent_duration
, as they can help sample evenly from recordings with differing lengths with fewer manually set values, but defaults in general seem like a nice convenience.This change is