查看单个帖子
旧 2024-12-18, 23:52   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
默认 Code for Sonic and Ten Sonic Movies - Cleve Moler on Mathematics and Computing

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 (requires JavaScript)

Published with MATLAB® R2024b
poster 当前离线   回复时引用此帖