Python tool for glitching MP3s while leaving them playable. Includes many options to shape glitching amount, character, and timbre.
The mechanics behind this are described in this article, and I discuss using Python to do the glitching in this article.
Should work for both constant bit rate (CBR) and variable bit rate (VBR) MP3s.
- Provide the name of an mp3 file in the same folder as the script to serve as an input, followed by the desired output file name
python3 mp3glitch.py <input_file_name> <output_file_name>- Options
-h, --helpshow this help message and exit-p, --probpercent probability of glitching (float)-m, --hexmindecimal representation of minimum hex value to insert (int)-M, --hexmaxdecimal representation of maximum hex value to insert (int)-f, --frameminminimum position in frame to glitch (float, 0-1)-F, --framemaxmaximum position in frame to glitch (float, 0-1)-s, --spacingminminimum spacing between glitched frames (int)-S, --spacingmaxmaximum spacing between glitched frames (int)-w, --widthnumber of hex digits to insert in each glitch (int)-l, --limitmax number of glitches per frame (0 = no limit) (int)