Live data from Hacker News

Tone.js – A framework for making interactive music in the browser

github.com

21–27 of 27 posts

Re: Tone.js – A framework for making interactive music in the browser

#21
post #12

The examples were a lot of fun to play with. Nice work. I was thinking earlier today of creating an F1 engine note simulator. I would want to play with the number of cylinders, v angle, crank offset (v8 normal crank/180 crank) and maybe some kind of exhaust system variables (tuned length, crossover pipe), and of course RPM. I don't know where to start, could you point me at the type of programming I would want to loo…

This is a wildly ambitious starter project! There are a huge number of mutually interacting non-linearities in an engine that you can only model with intense effort. I guess you need to read up on synthesis before diving into F1 mechanics.

For plausible approximations, which is the right way to go, you should check out PureData or (better) MaxMSP. See this tutorial by Andy Farnell

https://www.youtube.com/watch?v=9J7oqfnoObA

Re: Tone.js – A framework for making interactive music in the browser

#22
post #12

The examples were a lot of fun to play with. Nice work. I was thinking earlier today of creating an F1 engine note simulator. I would want to play with the number of cylinders, v angle, crank offset (v8 normal crank/180 crank) and maybe some kind of exhaust system variables (tuned length, crossover pipe), and of course RPM. I don't know where to start, could you point me at the type of programming I would want to loo…

I can see 3 ways to approach it, but they are all more "sound design" or acoustics than programming.

1) Process recordings of real F1 engines at fixed RPMs to seamlessly go from one to another.

2) Approximate the sound sources and what happens to them on he way to the ear, so: oscillators and noise generators passing through filters and delays to modify the spectrum.

3) A real attempt at modelling the sound sources and the acoustics of the enclosures and pipes in terms of "what happens to the air pressure variations here".

Or use something already existing: https://www.krotosaudio.com/igniter/

Re: Tone.js – A framework for making interactive music in the browser

#24
post #7

I used Tone.js to create my music theory website https://www.lightnote.co/ Using recordings from my guitar (of each and every note) I was able to build an interactive fretboard that could play guitar tabs/chords. Also the Transport API made it simple to build a drum looping machine very quickly. Ableton has built something similar, also using Tone.js: https://learningmusic.ableton.com/make-beats/make-beats.html Perfo…

I've been looking at your site and I like your music theory lessons a lot. Great work!

One request - could you use a slightly longer attack on your 'basic tone' sound in the lessons? Currently there's a harsh click each time the tone plays. Just 0.05 seconds of attack would still give a 'punchy' sound, without the clicks.

Re: Tone.js – A framework for making interactive music in the browser

#25
post #12

The examples were a lot of fun to play with. Nice work. I was thinking earlier today of creating an F1 engine note simulator. I would want to play with the number of cylinders, v angle, crank offset (v8 normal crank/180 crank) and maybe some kind of exhaust system variables (tuned length, crossover pipe), and of course RPM. I don't know where to start, could you point me at the type of programming I would want to loo…

Ha!

Red Bull did one too, it sounds a bit better: https://www.youtube.com/watch?v=gZIUGreqrCY

Re: Tone.js – A framework for making interactive music in the browser

#27
post #7

I used Tone.js to create my music theory website https://www.lightnote.co/ Using recordings from my guitar (of each and every note) I was able to build an interactive fretboard that could play guitar tabs/chords. Also the Transport API made it simple to build a drum looping machine very quickly. Ableton has built something similar, also using Tone.js: https://learningmusic.ableton.com/make-beats/make-beats.html Perfo…

I made a toy project with tone.js as well and found the same mobile performance issue - http://bloop.elialbert.com

is unusable in an iphone 10 and perfectly fine in chrome desktop. if anyone knows how to fix that I'd love to hear.

Post reply on HN