Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab (on Chrome) Not Working? #96

Open
davies-w opened this issue Mar 27, 2023 · 3 comments
Open

Google Colab (on Chrome) Not Working? #96

davies-w opened this issue Mar 27, 2023 · 3 comments

Comments

@davies-w
Copy link

Hi,

I'm really excited to play with this, however, I don't seem to be able to get it to work with Google Colab. I cribbed the Getting Started Example, and it has literally played only once - and despite restarting everything, I haven't been able to get it to work since.

https://colab.research.google.com/drive/12AOjdfuGQS0Oed6f1IFhAR4T90FvtST3#scrollTo=WrOjM2Pj6VQr

Any help gratefully received!
Winton

@benbovy
Copy link
Collaborator

benbovy commented Apr 4, 2023

Hi @wantondevious, thanks for the feedback!

I'm not using Google Colab so unfortunately I'm afraid I cannot help much on this right now. I wouldn't be surprised if there are some limitations in the Colab widget implementation such that you wont hear any sound.

(PS: 100 is painfully high for the volume value, better is something between -inf and 0)

@benbovy
Copy link
Collaborator

benbovy commented Apr 19, 2023

I wouldn't be surprised if there are some limitations in the Colab widget implementation such that you wont hear any sound.

One thing I'm not sure is whether the security model used in Colab is compatible with Tonejs. I suspect it wouldn't work out of the box: IIUC Colab outputs are each isolated in an iframe with different origin (https://stackoverflow.com/a/48920438) while Tonejs use a globally defined audio context (via the web audio API).

@davies-w
Copy link
Author

Thanks so much Ben! It's such a cool project, I hope I can figure it out, the implications for being able to combine data science and music generation are amazing - your world animation for example!

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

No branches or pull requests

2 participants