Skip to content

Conversation

@keggsmurph21
Copy link
Collaborator

Add support for loading / generating / saving spectrograms.

This way, we can lazy-load / compute values that we don't already
have at access time.
This commit relies on the existence of a particular sub-type of
SpectrogramLoader being present, which breaks some of our assumptions.

This functionality should probably be implemented some other way ...
possibly via the registry?
(I think I accidentally didn't include this file in any earlier
commits ... RIP)
@keggsmurph21 keggsmurph21 added this to the ultratrace 2.0 milestone Jan 10, 2020
Comment on lines +72 to +83
if self.spectrogram_file is None:
sound_file = self.get_sound_file()
if sound_file is not None:
try:
logger.debug(
"No spectrogram file found, trying to create from sound file"
)
self.set_spectrogram_file(
ParselmouthLoader.from_sound_file(sound_file)
)
except FileLoadError as e:
logger.warning(e)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: This needs special attention, since it breaks some of our assumptions.

@jonorthwash jonorthwash force-pushed the master branch 3 times, most recently from 81d5a96 to 9d1c199 Compare October 13, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants