Skip to content

isaacbarker/beeptunes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Beep Tunes

BeepTunes is a very much rough conversion software to take .mp3 files and output them as a list of single note frequencies and durations to play on simple buzzers, say with a microcontroller.

Usage

pip install numpy scipy sounddevice librosa tensorflow crepe

Tensorflow requires python <= 3.10 (which this project was written in) so this is recommended.

python beeptunes.py [-h] [-s MODEL_SIZE] [-kf] [-lt LENGTHTHRESHOLD] filename

Length Threshold determines the shortest possible length of tone detected that is included as a note. This can be adjusted to help remove short spikes or irregularities or include shorter notes for effect.

Model Size determines which flavour of the CREPE model is used, valid options: tiny|small|medium|large|full

The resulting track will be shorter as in an attempt to make a good finished project notes which are unrecognisable or too short to likely be correct are discarded.

Doest it work??

This project kinda works. If you have knowledge of music then composing the track yourself is definitely a better idea but I wanted to try this out and for some tracks it does yield good results. Playing around with length threshold does also help.

I have had the best success with simple tracks but often complex music can be made out. I recommend cutting the area you want to beepify as to remove any other extra elements.

Credits

This project would not be possible without:

CREPE Pitch Tracker - A Convolutional REpresentation for Pitch Estimation -- pre-trained model (ICASSP 2018)

musical-key-finder - A python project that uses several standard/otherwise very common libraries to determine the key that a song (an .mp3) is in.

About

Turn .mp3s into tracks to play on monophonic buzzers (e.g. piezoelectric buzzers)

Topics

Resources

Stars

Watchers

Forks

Languages