AllenDowney/ThinkDSP is one of the open-source repositories TopGit tracks, currently at 4.7k stars, written primarily in Jupyter Notebook. Think DSP: Digital Signal Processing in Python, by Allen B. Downey.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Think DSP is an introduction to Digital Signal Processing in Python.
Order Think DSP from Amazon.com.
Download the first edition in PDF.
Download the first edition in EPUB.
Read the second edition draft in HTML.
The premise of this book (and the other books in the Think X series) is that if you know how to program, you can use that skill to learn other things. I am writing this book because I think the conventional approach to digital signal processing is backward: most books (and the classes that use them) present the material bottom-up, starting with mathematical abstractions like phasors.
With a programming-based approach, I can go top-down, which means I can present the most important ideas right away. By the end of the first chapter, you can decompose a sound into its harmonics, modify the harmonics, and generate new sounds.
Here's a notebook that previews what you will see in Chapter 1:
chap01.ipynb
And if you want to see where we are headed, here's a preview of Chapter 10:
chap10.ipynb
Think DSP is a Free Book. It is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International, which means that you are free to copy, distribute, and modify it, as long as you attribute the work and don't use it for commercial purposes.
Which repository?
Think DSP has two GitHub homes.
This repository, ThinkDSP, contains the LaTeX source for the published first edition, the source code for the think-dsp package, and two notebooks for each chapter, one with examples and exercises, the other with solutions. It is the home of the PDF and EPUB versions of the book. A frozen first-edition HTML build still lives on Green Tea Press; the HTML to read is the ThinkDSP2 draft.
A newer repository, ThinkDSP2, contains a draft second edition with one Jupyter notebook per chapter and a more polished HTML generated with Jupyter Book.
If you have the published first edition and are looking for the supporting materials, you probably want ThinkDSP.
If you are just getting started and you want the most current version, you might want ThinkDSP2.
Running the code
The code for this book is in Jupyter notebooks.
If you are not familiar with Jupyter, you can run a tutorial by clicking here.
To run the ThinkDSP code, you have several options:
Google Colab — Best for a quick start: no local install, works in a browser, free.
Conda on your computer — Best for a stable local setup and offline work.
Poetry on your computer — Best if you already use Poetry / prefer a project-local virtualenv.
The following sections explain these options in detail.
Note: I have heard from a few people who tried to run the code in Spyder. Apparently there were problems, so I don't recommend it.
Option 1: Run on Colab
Most of the notebooks in this repository also run on Colab. If you find one that doesn't, let me know and I will update it.
You can open any of them by clicking on the links below. If you want to modify and save any of them, you can use Colab to save a copy in a Google Drive or your own GitHub repo, or on your computer.
chap01.ipynb
chap01soln.ipynb
chap02.ipynb
chap02soln.ipynb
chap03.ipynb
chap03soln.ipynb
chap04.ipynb
chap04soln.ipynb
chap05.ipynb
chap05soln.ipynb
chap06.ipynb
chap06soln.ipynb
chap07.ipynb
chap07soln.ipynb
chap08.ipynb
chap08soln.ipynb
chap09.ipynb
chap09soln.ipynb
chap10.ipynb
chap10soln.ipynb
chap11.ipynb
chap11soln.ipynb
Option 2: Install Python+Jupyter with Conda
First, download the files from this repository. If you are a Git user, you can run
Otherwise you can download this Zip file and unzip it.
Either way, you should end up with a directory called ThinkDSP.
Now, if you don't already have Jupyter, I highly recommend installing Anaconda, which is a Python distribution that contains everything you need to run the ThinkDSP code. It is easy to install on Windows, Mac, and Linux, and because it does a
user-level install, it will not interfere with other Python installations.
Information about installing Anaconda is here.
There are two ways to get the packages you need for ThinkDSP. You can install them by hand or create a Conda environment.
cd ThinkDSP
conda env create -f environment.yml
conda activate ThinkDSP
Once the environment is active, open the notebooks under nb/. You do not need to pip install think-dsp; see Install if you want the library in your own code.
Option 3: Install Python+Jupyter with Poetry
Clone the repository as in Option 2. Then, assuming you have Poetry installed, run
cd ThinkDSP
poetry install --extras notebooks
to install the libraries you need in a virtual environment. Start Jupyter with
poetry run jupyter notebook
(poetry shell is deprecated in recent Poetry.) Then see Install if you want the thinkdsp library in your own code.
Install
How you get the thinkdsp library depends on what you are doing:
If you are running the chapter notebooks, you do not need to install the think-dsp package. Notebooks download thinkdsp.py into the working directory when you run them. If you already set up Conda or Poetry above, you have the notebook stack. Otherwise:
pip install -r requirements.txt
If you want to use the thinkdsp library in your own code, you can install the think-dsp package from PyPI:
pip install think-dsp
Most readers will not need to do this.
If you want to do development in this repository, you can install an editable checkout plus the development tools that test the code:
pip install -r requirements-dev.txt
Or with conda: make create_environment_dev (also does pip install -e .).
Chapter notebooks live under nb/. Shared datasets (CSV, WAV) live under data/.
Building the book
The LaTeX source for the first edition is in book/, and book/book.tex is the single source for every output format.
PDF
Requires a LaTeX distribution (TeX Live, MacTeX, or texlive-latex-extra on Debian
and Ubuntu):
cd book
make
EPUB
Produces a reflowable EPUB3 with MathML equations, suitable for e-readers:
cd book
make epub # writes build/epub/thinkdsp.epub
Requires Pandoc 3 or later and
Poppler (for pdftocairo, which rasterizes the
vector figures into PNGs that e-readers can display):
No LaTeX installation is needed for the EPUB. The build rewrites a copy of
book.tex under build/epub/; the original is never modified. Figures are
rendered at 150 dpi by default, which fits a typical e-ink screen — override with
make epub EPUB_DPI=200.
To validate the result, install EPUBCheck
(brew install epubcheck, or sudo apt install epubcheck) and run:
make epub-check
Three errors are expected and harmless: two links in Chapter 5 come from \url{}
being used for a bare domain and a filename in book.tex, and one figure
cross-reference between chapters is not rewritten by Pandoc when it splits the
book into per-chapter files.
Use make epub-clean to remove the build directory.
HTML
The HTML to read is the second-edition Jupyter Book draft:
ThinkDSP2.
The first-edition Hevea HTML on Green Tea Press is frozen and is not
updated by a routine release. Rebuilding with make hevea is optional
legacy tooling.
Freesound
Special thanks to Freesound (http://freesound.org), which is the source of many of the sound samples I use in this book, and to the Freesound users who uploaded those sounds. I include some of their wave files in
the GitHub repository for this book, using the original file
names, so it should be easy to find their sources.
Unfortunately, most Freesound users don't make their real names
available, so I can only thank them using their user names. Samples
used in this book were contributed by Freesound users: iluppai,
wcfl10, thirsk, docquesting, kleeb, landup, zippi1, themusicalnomad,
bcjordan, rockwehrmann, marcgascon7, jcveliz. Thank you all!
How active is development on AllenDowney/ThinkDSP?
The most recent commit recorded on AllenDowney/ThinkDSP was 1 month ago, based on the GitHub push timestamp. The repository has 3.6k forks — one of the better signals of community interest.
How many stars does AllenDowney/ThinkDSP have?
AllenDowney/ThinkDSP has 4.7k GitHub stars — refresh the page for the live number, or check github.com/AllenDowney/ThinkDSP. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is AllenDowney/ThinkDSP?
AllenDowney/ThinkDSP (AllenDowney/ThinkDSP) is a Jupyter Notebook project on GitHub. From the project's own README: Think DSP: Digital Signal Processing in Python, by Allen B. Downey.
What language is AllenDowney/ThinkDSP written in?
AllenDowney/ThinkDSP is written primarily in Jupyter Notebook. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is AllenDowney/ThinkDSP associated with?
GitHub's repository topics for AllenDowney/ThinkDSP: "dsp", "python", "signal-processing", "textbook". TopGit's editorial category is open-source.
Read full README in the tab above.
Still deciding about ThinkDSP?
One click hands the question to an AI along with this page — see what it says about ThinkDSP.