{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "\n", "Following Section 1.3.2 of [Müller, FMP, Springer 2015], we cover in this notebook the relation between frequency and pitch. \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Sinusoids\n", "\n", "A sound wave can be visually represented by a [waveform](../C1/C1S3_Waveform.html). If the points of high and low air pressure repeat in an alternating and regular fashion, the resulting waveform is called **periodic**. In this case, the *period* of the wave is defined as the time required to complete a cycle. The **frequency**, measured in **Hertz** (Hz), is the reciprocal of the period. The simplest type of periodic waveform is a **sinusoid**, which is completely specified by its **frequency**, its **amplitude** (the peak deviation of the sinusoid from its mean), and its **phase** (determining where in its cycle the sinusoid is at time zero). The following figure shows a sinusoid with frequency $4~\\mathrm{Hz}$.\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Audible Frequency Range\n", "\n", "The higher the frequency of a sinusoidal wave, the higher it sounds. The audible frequency range for humans is between about $20~\\mathrm{Hz}$ and $20000~\\mathrm{Hz}$ ($20~\\mathrm{kHz}$). Other species have different hearing ranges. For example, the top end of a dog's hearing range is about $45~\\mathrm{kHz}$, a cat's is $64~\\mathrm{kHz}$, while bats can even detect frequencies beyond $100~\\mathrm{kHz}$. This is why one can use a dog whistle, which emits **ultrasonic sound** beyond the human hearing capability, to train and to command animals without disturbing nearby people.\n", "\n", "In the following experiment, we generate a **chirp signal** which frequency increases by a factor of two (one octave) every second. Starting with $80~\\mathrm{Hz}$, the frequency raises to $20480~\\mathrm{Hz}$ over a total duration of $8$ seconds. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-02-15T08:45:15.142303Z", "iopub.status.busy": "2024-02-15T08:45:15.142005Z", "iopub.status.idle": "2024-02-15T08:45:18.134248Z", "shell.execute_reply": "2024-02-15T08:45:18.133326Z" } }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |