Hacker News new | past | comments | ask | show | jobs | submit login
Python notebooks for fundamentals of music processing (audiolabs-erlangen.de)
277 points by yeknoda 10 months ago | hide | past | favorite | 17 comments



this one can also be helpful: https://allendowney.github.io/ThinkDSP/


Additional Open Source Music and Sound Production tools:

"Raspberry Pi for Dummies" has chapters on SonicPi and PyGame.

SonicPi is a live coding environment for music creation and instruction. Like ChucK IIUC

It looks like PyGame has pygame.mixer, which is built on SDL's mixer.

The Godot game engine supports Audio Effects: https://docs.godotengine.org/en/stable/tutorials/audio/audio...

BespokeSynth has a "script" module that supports Python for synthesizing notes and chords and also for transforming audio streams: https://github.com/BespokeSynth/BespokeSynth/blob/main/resou... ( https://github.com/BespokeSynth/BespokeSynth/blob/main/bespo... )

AllenDowney/ThinkDSP notebooks reference NumPy, freesound,: https://github.com/AllenDowney/ThinkDSP


My most recommended method for beginners has always been PD (https://puredata.info/) combined with The Theory and Technique of Electronic Music: (https://msp.ucsd.edu/techniques/latest/book.pdf) and this book (https://mitpress.mit.edu/9780262014410/designing-sound/).

Eli's tutorials on SuperCollider are also very helpful: https://www.youtube.com/@elifieldsteel

Of course, you can have a look at my project Glicol that can also be helpful for people to get some intuition on live coding in browsers immediately: https://glicol.org/


"Show HN: Polymath: Convert any music-library into a sample-library with ML" https://news.ycombinator.com/item?id=34756949#34782253

Looks like there's a Hooktheory Classroom product, in addition to Hookpad and their music theory book which features the music of Avicii.

/r/musictheory/wiki suggests that "Open Music Theory" is the best text: https://www.reddit.com/r/musictheory/wiki/index/

The search keyword "Melodic"

Do Windows VST plugins work with Glicol on Linux with Yabridge, LinVst, Carla, or WineASIO?

Glicol is written in Rust and has its own non-Rust syntax?

Is there a syntax/grammar API doc?


> Show HN: Polymath: Convert any music-library into a sample-library with ML

I tried this the other day. There's several issues regardless of using the pinned versions in requirements.txt and trying to use debian bullseye and python 3.10.10 as implied by the provided dockerfile. At least these I noted:

- fix deprecated np.bool usage

- module 'scipy.signal' has no attribute 'hann' --> change to scipy.signal.windows.hann

- librosa.feature.melspectrogram(y, change to y=y

- needs CUDA 11

I got it to work without gpu acceleration cause of the last point. If I come back to this I'll probably just look at using demucs, librosa etc. directly (polymath.py is only ~600 lines gluing things together) and hopefully get it working with latest nvidia drivers.

Also if I have days to let this compile maybe I could get CUDA 11 from this https://aur.archlinux.org/packages/cuda-11.7


Installing conda-forge/tensorflow-gpu installs conda-forge/cudatoolkit-feedstock ; https://conda-forge.org/blog/2021/11/03/tensorflow-gpu/ :

  conda install -c conda-forge install tensorflow-gpu # cudatoolkit
  mamba install tensorflow-gpy
  pixi install tensorflow-gpu
FWICS the polymath README mentions the reference docker container, which should install all of the dependencies:

  docker build -t polymath ./
  docker run \
    -v "$(pwd)"/processed:/polymath/processed \
    -v "$(pwd)"/separated:/polymath/separated \
    -v "$(pwd)"/library:/polymath/library \
    -v "$(pwd)"/input:/polymath/input \
    polymath python /polymath/polymath.py -a ./input/song1.wav
There's a music utility called "time travel" IIRC, that records all recent audio and you can then save a recent window of that. (Edit)

jellyjampreserve: https://github.com/betodealmeida/jellyjampreserve :

> JellyJamPreserve is a Raspberry Pi project that uses jack_capture to record audio on the toggle of a switch. It continuously records audio into a 5 minute circular buffer, and when the switch is turned on the buffer is dumped to a file and it starts recording audio to the file until the switch is turned off. This way you can preserve any cool improvisations by recording sounds from the past!

swh/timemachine; "JACK timemachine" https://github.com/swh/timemachine manpage: https://manpages.org/timemachine

Is there a better way to do this with Pipewire instead of Pipewire-jack?


Want to let you know that I just spent an hour playing around with glicol. It's really something, and very cool that you even included a collaberative editor. Have you shown it on HN yet? I think lots of people here would be interested


Yes it's showed a while ago. But now it's in the next round of refactoring. The syntax does not change much, but the core speed is optimized. The website needs to be rewritten. I am considering using solidjs, dioxus and egui. In addition to the browser editor, there is also this cli that can be used: https://github.com/glicol/glicol-cli


I picked this up as a first reference as someone who had no knowledge in DSP and it was an absolute gem. Really helped with the mental model for sound processing. This repository has some amazing resources too: https://github.com/BillyDM/Awesome-Audio-DSP


Is there a good resource to learn about digital audio processing algorithms, like compression, reverbs etc?


This is one of the best resources out there for audio DSP+ML. While it is focused on music, it is also highly relevant to other audio such as speech environmental sounds etc.


It is also helpful in the context of other signal types Good reference


is this good for someone with no music knowledge but loves programming and want to learn about audio and sound generation?


This is primarily about analysis of music/sound, and almost nothing about sound synthesis. But apart from that, yes.


What are good resources for sound synthesis?

A while ago I started a repository, in which I wrote code to write a riff-wave file with a sine wave in it. My idea is: "All sound is, is waves. Incredibly many overlapping waves maybe, but waves. Using functions I should be able to implement things like fade-in, fade-out, increase frequency, etc, that I usually do using Audacity. And then I should be able to make small command line tools out of those and do fun effects on wave files."

Perhaps my thoughts are naive, as I have no background in sound/music theory and probably lack some fundamental mathematics for sound, but: What would be a good book to get more into this sound synthesis stuff, as a software engineer?


Good stuff, thanks


see also dan ellis' webpages at columbia and the most excellent librosa.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: