refactor: see enhancement issue #95#97
refactor: see enhancement issue #95#97thorwhalen wants to merge 2 commits intospacetelescope:mainfrom
Conversation
|
Made this PR which addresses the comments made in issue #95, and also includes my solution for #94 (simply adding a method to play in notebooks, with a notebook appropriate tool ( I only changed the series.py module: Tests pass, and I (think) I kept the same behavior as before, even though, I'm not sure this was intended. One of the thing I wanted to do is un-hardcode this aspect of the code, centralizing it. Why? Two good reasons:
I would have liked to just say: AUDIO_CONFIG = (
(0, 0), # Start at silence
(0.01, 1), # Quick attack to full volume
("dur-0.1", 1), # Hold at full volume until near end
("dur-0.05", 0.5), # Start release
("dur-0.005", 0), # End with silence
)(or actually, would prefer to make that a Since AUDIO_CONFIG = {
# Envelope parameters for playback
"play_envelope": [
(0, 0), # Start at silence
(0.01, 1), # Quick attack to full volume
("dur-0.1", 1), # Hold at full volume until near end
("dur-0.05", 0.5), # Start release
("dur-0.005", 0), # End with silence
],
# Envelope parameters for writing to file
"write_envelope": [
(0, 0), # Start at silence
(0.1, 1), # Slower attack for files
("dur-0.1", 1), # Hold at full volume until near end
("dur-0.05", 0.5), # Start release
("dur-0.005", 0), # End with silence
],
}so if this misalignment wasn't on purpose, I suggest you use a single audio config instead. |
|
I updated this my branch to rename play_notebook to play_in_notebook, as requested by @scfleming in this comment. |
See issue #95