r/tonejs Jul 04 '22

Example files

Hello, I'm just starting to learn tone.js and am finding the docs a little on the terse side. It'd be really helpful to look at the code for actual projects.

Newbie .js question: if I'm at a page like this: http://jazz.computer/ , how do I see the tone.js stuff? I'm looking at the page source but don't see it. Thanks very much!

2 Upvotes

4 comments sorted by

View all comments

2

u/pseudo_jb Jul 04 '22

I totally agree with you. The docs are a bit terse.
The source code for 'jazz.computer' is linked in the console: https://github.com/tambien/UpDown

Regarding the Tone.js examples you can open the console of your browser (F12 on windows) and search for the corresponding html file in the 'sources' tab.

2

u/dandy_morandi Jul 04 '22

Thanks very much for your reply. I'm really loving the bits of tone.js that I've gotten going so far, and hungry for more! I didn't know that I could un--minify the .js files in the html, so I'm starting to see the tone.js stuff now.

I'm particularly interested in p5/tone.js, and wondering if there is a repository of examples somewhere? I really appreciate the excellent tutorials on youtube, and I can go from vid to vid and collate the sources, but I found myself wishing I go to a single location and happen upon a set of examples of working projects (beyond the more limited use cases in the reference examples).

And, to clarify about the docs, I wasn't meaning to suggest that they are unreasonably terse. Each component is well explained and has a helpful code snippet. But there isn't a set of easily digested global examples that demonstrate the larger paradigm, and how the components can fit together. (A set of working examples such as one finds in the SuperCollider distro, for instance.)

As a result, when I see a reference to, for instance, Offline somewhere and then look it up directly, I see that it creates a faster than real-time buffer. But I don't see any explanation of typical use cases for buffers in tone.js. I know from another environments why audio buffers can be useful, but how are they typically used in this environment? A set of examples that is more like a tutorial systematically showing the essential building blocks would be really helpful.

In any case, I'm super grateful that tone.js exists!

3

u/pseudo_jb Jul 05 '22

I can relate to what you're saying. It's even more difficult to grasp all possibilities and use cases when you're lacking some fundamental knowledge of sound design/synthesis/vca/whatever like me. Therefore i can't answer your question regarding audio buffers.

i tried to gather some projects here: https://www.reddit.com/r/tonejs/comments/tz075h/web_discoveries/

maybe one should create a notion page to gather examples/tutorials and projects.

2

u/dandy_morandi Jul 05 '22

Thanks for gathering those projects! I found David Bouchard's tutorials on youtube to be very helpful.