In this chapter, I will briefly learn some of the physical properties of sound, how I can code through the MIMIC platform, and understand and further use maximJS…
1.Oscillation, Frequency & Amplitude
All periodic phenomena can be represented by waveforms, such as sounds in daily life. Later, we can also describe images by sin and cos. Generally, when the wave is greater than 0, the speaker will play forward, and when it is less than 0, it will be played backwards; and when our wave value is greater than 1 or less than -1, we will be in a state of distortion; of course, all of this It happened on the basis of time changes.
If we want to explore more wonderful mixing effects, we can adjust around 20Hz; oscillations with a frequency exceeding 20KHz cannot be heard by humans, and in order to be able to digitally represent periodic oscillations, we will need to sample twice. Therefore, the sampling rate of a digital audio system is usually 44.1KHz or 48.0KHz, which is twice the hearing range.
The maximum frequency that the system can reproduce is half of the sampling rate, which is called the Nyquist frequency.
We need to store the sampled value of the vibration, 8 bit will provide 256 values to represent the amplitude, most of the time we may need 16 bit, which can provide 65.536 values to describe the floating point number between -1 and 1.
This also provides us with more ways to control the sound, so that different waveforms can interfere with each other to achieve many effects, such as beats, or fade in and out.
You can check some of my demo code below:
https://mimicproject.com/code/eb0ca41c-5b66-acf2-c7b7-d0a38ac0f8de
About this Post
This post is written by Siqi Shu, licensed under CC BY-NC 4.0.