hpc.social


High Performance Computing
Practitioners
and friends /#hpc
Share: 
This is a crosspost from   Cleve’s Corner: Cleve Moler on Mathematics and Computing Cleve Moler is the author of the first MATLAB, one of the founders of MathWorks, and is currently Chief Mathematician at the company. He writes here about MATLAB, scientific computing and interesting mathematics.. See the original post here.

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.zip

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

sonic_examples_0.mp4

1. Lissajous

sonic_examples_1.mp4

2. Mertens

sonic_examples_2.mp4

3. TanSin

sonic_examples_3.mp4

4. Van der Pol

sonic_examples_4.mp4

5. VdP Derivative

sonic_examples_5.mp4

6. Blackjack

sonic_examples_6.mp4

7. Vibrating L-shaped Membrane

sonic_examples_7.mp4

8. Recamán Sequence

sonic_examples_8.mp4

9. Swinging Sticks

sonic_examples_9.mp4


Get the MATLAB code

Published with MATLAB® R2024b