Closed pseeth closed 4 years ago
Yes, let's add this! A few comments:
Scaper._instantiate()
also touches self.duration
. It also calls self._instantiate_event()
which touches self.bg_path
, self.fg_path
, self.bg_labels
, self.fg_labels
, self.protected_labels
and self.duration
. Then there's _generate_audio()
which touches pretty much all other parameters in self.*
. All this to say, there's a big difference between the notion of resetting the Scaper object and just resetting the event specifications, and we should limit ourselves to the latter in this context.reset_fg_event_spec()
and reset_bg_evet_spec()
?Scaper.set_random_seed()
in case someone wants to change the random seed of an already existing Scaper object?How does this all sound?
All sounds good. I'll fold this into #54!
Added via #54
It might be useful to have a way to reset the event specification in a Scaper object so that the same Scaper object can be used over and over to generate soundscapes, instead of making a Scaper object inside the loop for each soundscape like in the tutorial.
Current proposal is to add a function to the Scaper object called
Scaper.reset_event_spec()
which would accomplish this. Looking throughScaper._instantiate
, the only objects that get touched that belong toself
areself.bg_spec
andself.fg_spec
. As these are both lists, I think the body ofreset_event_spec
would look something like:Which are their original settings in the init function.
We would need a corresponding test. Maybe generate something, then reset the object, then generate again? And make sure the generated soundscapes are different from one another?