Code for Sonic and Ten Sonic Movies
Two previous blog posts, Dec. 12, 2024 and Nov. 16, 2024, introduced "Sonic", my new tool for incorporating sound in videos. Today's blog post includes a link to the MATLAB source code for Sonic, as well as links to new versions of ten examples.
Contents
Code
The MATLAB code for Sonic and all the examples is available in this 11 MB zip file.
Sonic
There are two ways to generate the musical sounds. The three movies Warm-Up, TanSin and Blackjack use recordings of C-major scales played on three different pianos. All the other movies rely on resampling a single note from a trumpet, xylophone or piano.
The function sonic_examples(kases,n) is a driver for sonic. The first parameter, kases, is an integer vector of desired examples, 0 though 9. The second parameter, n, is the number of desired samples.
- n = 25 is very fast
- n = 100 is reasonable
- n = 200 is the default
- n = 300 is overkill
Ten Movies
Here are links to new versions of the animated videos, and the final frames.
0. Warm-Up
1. Lissajous
2. Mertens
3. TanSin
4. Van der Pol
5. VdP Derivative
6. Blackjack
7. Vibrating L-shaped Membrane
8. Recamán Sequence
9. Swinging Sticks
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.