I wonder how many other people close the tab without noticing the buttons like I did.
Karplus-Strong can be extended in ways to simulate different types of plucking, acoustic pickup at bridge, or electric pickup at any point along tbe string, and plucked at any point along the string. Body resonance can be simulated etc. It's a pretty fun synth technique to play with. Amazing to take beyond simulating conventional instruments.
But this is very primitive compared to a massive body of research on better simulation. The delay line works great though, that part hasn't changed.
Variations on Karplus-Strong synthesis can yield some pretty wacky, dry and plucky types of sounds. In the original paper, the authors propose a variant of the algorithm which involves randomly alternating the sign (+/-) of every sample in the feedback loop, which creates a lot more atonal information in the signal. There’s also a variation floating around which uses an allpass filter in the feedback loop to introduce inharmonicity in the signal, see for example https://www.youtube.com/watch?v=SpC3t1EVF_Q.
Here for example is a piece made up largely of the harmonics (Portrait of Tracy Jaco Pastorius) https://www.youtube.com/watch?v=nsZ_1mPOuyk That's an electric bass and the bell-like sounds are harmonics. Basically he's just lightly touching the string in specific places to suppress the fundamental tone so you just hear the harmonics.
Whereas here (Stir it up - Bob Marley and the Wailers) https://www.youtube.com/watch?v=1hwL3S3Gtzs when the bass comes in, the player is holding his hand near the bridge (back of the strings) with the side of the palm resting on the strings to suppress all the harmonics so you only get the fundamental tone and it has this sort of muffled quality (because a lot of the brightness comes from harmonics).
Touching the string at different points will excite different vibrational modes. Notably if you pluck in the exact center you activate none of the even-numbered nodes, if you pluck around the 1/3 point that's optimal for activating the second harmonic, etc. You can never not activate the fundamental mode touching it in one spot but you activate it less if you get close to the edge.
Why is this the case? It is funny that my guitarist's intuition seems very clear about it - "the string is tougher and clickier at the bridge compared to the neck, of course the tone is more shrill" - but in terms of actual analytical evidence I just have to say "something something Fourier coefficients" :) Refining the physical intuition a bit: I believe the boundary at the end of the string dampens lower-frequency (i.e. lower-energy) vibrations faster than higher-frequency vibrations, so the lower harmonics die off more quickly than the higher "nasal" harmonics.
If you click on the little notes in the bottom right, you can pick other sets of chords, which give a different "vibe". (Me, I'm partial to the Andalusian ones)
That's why common advice to people starting the guitar is "Three chords, you can play anything. Four, you control the mood. Five, you're a god among men"
C/Am, F, G are adjacent in the circle of fifths so they will all play nice in a progression.
Each course of strings on the webpage somewhat behaves and sounds like an "ovikannel" when you strum it manually.
Here's one that was found hanging on a wall but they were normally attached to an entrance door so the wooden balls would swing against the strings when the door was opened, and play the chime:
https://www.reddit.com/r/finnish/comments/dvd125/my_finnish_...
One of the commenters was quite curious as to what it would sound like. Well about like this.
It also happens in Firefox but a lot less.
This shouldn't happen.
The main reason is the use of createScriptProcessor.
This should be replaced with AudioWorklet. Use WASM + SharedArraybuffer for calculation.
The visual of picking the strings is great, I spent a lot of time on it, I believe the vote is also a recognition of this.
Here is a similar idea (karplus) implemented with Rust + WASM, which is much better in terms of audio quality:
https://jackschaedler.github.io/karplus-stress-tester/
I also wrote a simple api to use Rust wasm audio here:
If you are interested in doing some use cases, leave a message. I am actively maintaining it recently.
also: support different materials like steel/nylon/gut
If you have a DAW there are so many interesting free sound generators on the internet. Just spitfire audio has their free lab VSTs which give you 60 VSTs to play with - and thats just one company.
https://labs.spitfireaudio.com/
Its all just missing the front end a DAW normally provides but is too complicated for people just looking to mess around with sounds.
Edit: I don’t know why I’m being downvoted, the mute button is very unintuitive. YouTube will play on a web page with mute on, but this page won’t.
Probably worth the app/os to give you a notice if you fiddle with the volume while muted.
Edit: yes I’d pay $2 to play with this. lol
However, I must point out that if tonejs is used here, audio will quickly become a bottleneck or even memory leak.
It reminds me of a Karplus Strong project written in rust that I saw before. This project is of course visually minimal, but demonstrates the use of rust + wasm audio.
https://jackschaedler.github.io/karplus-stress-tester/
I wrote a simple api to use Rust wasm audio here:
If you are interested in doing some use cases, leave a message. I am actively maintaining it recently.
The cause of the popping glitches is createScriptProcessor
Wonderful!
This should be replaced with AudioWorklet. Use WASM + SharedArraybuffer for calculation.
Here is a similar idea (karplus) implemented with Rust + WASM, which is much better in terms of audio quality:
It was a fun project, although the game was a little rough around the edges to say the least.
I tried to find it but never have.
Does anyone else know what it is?
You can play classical music on the simulated instruments. This is the nicest thing I've seen in a long time.
I went to the TLD and couldn’t make sense of how this is connected to that.
The blob one harmonizes in a very interesting way. I would love to know the algorithm. Maybe even enough to pull apart the source code or reverse engineer it.
I went to share it with some musician friends of mine, but first wanted to give them a TL;DR.
I tried to copy info out of the "?" dialog so that I didn't have to re-type the details but the page blocked the operation. That was enough for me to pass. I don't have time to do extra work to explain someone else's project.
While I can cop to the fact that some may interpret my comment as "Please don't complain about tangential annoyances—e.g. article or website formats, name collisions, or back-button breakage. They're too common to be interesting." it seems there is an equal and opposite lack of consideration around "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith. "
Pluck by Murat
A math-based string simulator.
Download on Apple App Store for $1.99 [Image of Apple App Store download button]
- It's fun to have on iPad with multitouch, especially for kids (even 1 year olds). - Support this project
Both the audio and visuals are generated using the same math, rendered at different speeds so the eye can see.
No tricks or audio files are used: everything is calculated from raw sine waves, with a theory of how energy is released in a pluck. - The vibrations are modeled based on how far down the string you pluck from. - The velocity of midi notes are mapped to both pluck position, as well as pluck strength.
This YouTube video of a slow motion string pluck proves that our simulated result is very close to reality. [Embedded YouTube video of slow motion pluck]
Technical details: - Each string is simulated with 12 overtones (integer multiples of the note frequency) - To calculate amplitude of each overtone, we take the Fourier transform of the plucked string at the time the pick is released - Higher frequency overtones decay faster than lower frequency overtones - 72 strings x 12 overtones x 44,100 samples per second = 52,920,000 calculations per second - Audio buffer of 1024 samples are sent to the GPU to compute in parallel on each tick
There are several directions I can take this project from here: 1. Turn it into an interactive educational tool to teach physics of sound, timbre & music. 2. Turn it into a music learning tool for kids where songs are pre-made as chords that the user can pluck to learn rhythm and feel. 3. Turn it into an interactive art installation 4. Turn it into a game where i.e. a bouncing ball plucks the strings & you try to match the melody
If you are interested in any of the above, please get in touch at murat@ayfer.net or @moyfer.