ipython-books/cookbook-2nd

Synthetizer not working

nathraim opened this issue · 0 comments

Hello, I have tried the synthetizer notebook, but it failed to work, both on my own computer and with the binder link provided. More precisely, while a call to "synth(440)" in an individual cell works as expected, clicking on the buttons, however, does not seem to trigger anything.
I made a workaround as follows.
First I created
out=widgets.Output()
Then instead of with widgets.Output() I wrote with out.
FInally in an another cell I displayed the output:
display(out)
This, however, creates a new widget each time a button is clicked. It can be circumvented by using clear_output(wait=True) after the call to 'synth', but this works only because here the duration of the sound is very short.
I'm interested in this, so if you have a better way of playing a sound (or several at the same time) without displaying unnecessary widgets, I'm all ear ;).

Nathaniel