2024-02-27 复健:(最基础的)音频和信号处理

This article is categorized as "Garbage" . It should NEVER be appeared in your search engine's results.

因为要给🔗 [2022-09-16 - Truxton's blog] https://truxton2blog.com/2022-09-16/ 处理一个遗留问题,不得不重新复习整个【音频,信号处理】的基础知识,只为了能补充Vibrato/chirp的代码,以及搞清楚为什么当年做出了一段特别奇怪的音频:

注意耳朵


以下内容在🔗 [2022-09-16 - Truxton's blog] https://truxton2blog.com/2022-09-16/ 都能找到,本篇笔记仅仅是重新粘贴一遍。还有一些内容(chirp/vibrato的推导)不算是最基础的知识,写在2022-09-16的笔记里。


重新写了最基础最基础的sinewave、欧拉公式、频率/角频率/周期 相关的笔记:


以及重新复习了python生成sinewave的代码,这里贴出一个440Hz sinewave的例子:

import numpy as np
from scipy.io import wavfile

bits = 16
sr = 44100


def save_wav(y, filename):
    # Scale the signal to fit the desired bit depth range
    y_scaled = np.int16(y * (2 ** (bits - 1) - 1))
    # Save the wav file
    wavfile.write(filename, sr, y_scaled)


if __name__ == '__main__':
    t = np.linspace(0, 10, 10 * sr)

    # 生成一段440Hz的sinewave熟悉一下代码
    y = np.sin(2 * np.pi * (440 * t))
    save_wav(y, '440_sinewave.wav')

没了。剩下的(chirp/vibrato的推导)不算是最基础的知识,写在2022-09-16的笔记里。


Leave a Comment Anonymous comment is allowed / 允许匿名评论