DEV Community

matej
matej

Posted on • Updated on

Remixing songs using Chat GPT-4 and the command line

I've recently heard a song that I really liked, and I've thought about how I wanted the tempo to be a bit slower.

We've all heard Youtube "slowed, reverbed, bass boosted" versions of popular radio songs.

Just playing it at 0.9x at Youtube wasn't going to be enough!

Since we just got GPT-4 available and it's all the rage, I've decided to go to it and prompt it for the tips.

First prompt was pretty basic -



Could I do a basic song (mp3) remix via ffmpeg


Enter fullscreen mode Exit fullscreen mode

and the answer was more in the line of mixing different songs together, so I had to be a bit more direct.



It's more in the line that I have extracted vocals from a song, and a separate track for the instrumental of the song and I want to slow the instrumental by some 12 %, add bass boost and slight reverb, and then merge that again with the vocals, is that possible with ffmpeg?


Enter fullscreen mode Exit fullscreen mode

I got back the following -

ffmpeg commands part I

ffmpeg commands part II

ffmpeg commands part III

But then my session crashed and I realized I forgot to copy actual commands :).

After a bit of back and forth with OpenAI's GPT and "Sidney" via Edge chat - I got the following pipeline to make a decent result -

  1. Slow it down


ffmpeg -i input.mp3 -filter: a "atempo=0.89" slowed_input.mp3



Enter fullscreen mode Exit fullscreen mode
  1. Add some boost to bass frequencies


ffmpeg -i slowed_input.mp3 -af "equalizer=f=100:width_type=h:200:g=6" input_boosted.mp3


Enter fullscreen mode Exit fullscreen mode
  1. Add reverb with sox


sox input_boosted.mp3 reverb_input.mp3 reverb 30 50 100 50 0


Enter fullscreen mode Exit fullscreen mode

And this is the result

I've also prompted GPT for a statement that I own no copyright of the song for Youtube video description (legal purposes), in Croatian (!!) and it handled that pretty well.

NOTES

  • I had to use sox, because there is some mismatch between my Fedora version of ffmpeg and it's filters to add reverb
  • As you'll notice I've ignored my first idead to split the track into vocals and instrumental, since that ended me up with a too big of a mismatch between vocals and the music track
  • When applying bass boost, the effect is modulated with the last 'g' variable, sometimes more than 5 gives loud thumps one would have to further clean
  • There is ample room to play with the reverb effect but I like this as it's quick and dirty
  • At times Sidney straight up refuses to give you a direct ffmpeg or sox command

This is another one in my line of experimenting building stuff with the tiny shoggoths that LLMs are.

LLM as a shoggoth

I've been using it as a math tutor, CRUD coding buddy, and to automate generating recipes from Youtube cooking videos.

Top comments (1)

Collapse
 
koroosh_wantons_150c7d7e9 profile image
Koroosh Wantons

ریمیکس پیشرو نیلوفر آبی . سورنا مستی .کوروش پس من چی . آرتا ازت بدم میاد . بهرام لمس . دورچی دمن تینگز