explaingit

allendowney/thinkdsp

4,534Jupyter NotebookAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A free, code-first textbook on digital signal processing with 11 interactive Python notebook chapters covering audio analysis, Fourier transforms, and filtering, runnable in your browser without any installation.

Mindmap

mindmap
  root((thinkdsp))
    What it does
      DSP textbook
      Audio analysis
      Signal filtering
      Fourier transforms
    Tech stack
      Python
      Jupyter Notebook
      NumPy
      Anaconda
    Topics covered
      Waveforms and spectrums
      Noise and filtering
      Modulation
      Discrete cosine transform
    How to run
      Google Colab
      Binder
      Local Anaconda
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Work through 11 Python notebook chapters to learn how to analyze, filter, and synthesize audio signals hands-on.

USE CASE 2

Run the notebooks free in Google Colab or Binder with no local Python installation needed.

USE CASE 3

Use the included exercises and solutions to self-study Fourier transforms, noise, and filtering concepts at your own pace.

Tech stack

PythonJupyter NotebookNumPyAnaconda

Getting it running

Difficulty · easy Time to first run · 5min

No setup needed, open any notebook in Google Colab or Binder for free with a single click.

Free to read and share with attribution, but commercial use is prohibited under the Creative Commons NC license.

In plain English

Think DSP is a free book about digital signal processing (DSP) written by Allen B. Downey, who teaches at Olin College. This repository contains the Jupyter notebook files that accompany the book, which is also available to read online as HTML or download as a PDF, and to purchase in print from Amazon. Digital signal processing is the study of how to analyze, modify, and generate signals such as audio, in a mathematical and computational way. Most textbooks on the subject start with heavy math from the beginning. This book takes the opposite approach: it assumes you already know how to program in Python, and uses that knowledge to build intuition for the concepts before introducing the formulas. The author argues that starting with working code lets readers get to interesting results much faster. By the end of the first chapter, you can break a sound apart into its frequency components (called harmonics), change them, and reassemble a new sound. The notebooks cover eleven chapters. Each chapter has an exercise notebook and a corresponding solutions notebook. Topics build from basic waveforms and spectrums through Fourier transforms, filtering, noise, modulation, linear time-invariant systems, differentiation and integration, and finally the discrete cosine transform. You can run the notebooks without installing anything by opening them in Google Colab or on Binder, both of which are free cloud-based services. Alternatively you can install the dependencies locally using Anaconda (a Python distribution that bundles the required scientific libraries) or using the poetry package manager. The book is free to use and share under a Creative Commons license that requires attribution and prohibits commercial use.

Copy-paste prompts

Prompt 1
Using the thinkdsp Python code, show me how to load a WAV file, compute its frequency spectrum, and plot the harmonics.
Prompt 2
In thinkdsp, how do I apply a low-pass filter to an audio signal to remove high-frequency noise and hear the result?
Prompt 3
Using thinkdsp, break a sound into its harmonic components with a Fourier transform and reassemble a modified version with some harmonics removed.
Prompt 4
How do I open the thinkdsp Chapter 1 notebook in Google Colab and run the first signal-generation example?
Open on GitHub → Explain another repo

← allendowney on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.