Back

How to Train a Gen AI Kick Drum Model on Your Old Linux Desktop with 6GB VRAM

52 points4 hourszhinit.dev
tunk3 minutes ago

This has been done years ago. See https://audialab.com/products/emergent-drums-2/ for instance.

larme2 hours ago

People who are interested in this application should check synplant[0]. It has a ML technology called "Genopatch" which gives you 2 functionality:

1. you can try to describe a sound with some tags and it will try to generate a sound to capture the feeling of these tags

2.you can feed it with a sound sample and it will try to re-synthesize the sound with its synth engine. Though the end result will usually be just a "re-imagined" version of your input sample.

My guess is the underlying model is not a "deep" model. The main benefit is that the end result is not a wave file, but a list of generated parameters that can be synthesized by the synthplant engine. And now it comes the interesting part: you can tweak these parameters to finetune the generated sound. These parameters have actual meanings (FM ratio, reverb etc.)

[0]: https://soniccharge.com/synplant

aw12355 minutes ago

How far are we from getting a general model that can resynthesize any instrumental audio sound without fiddling with any knobs, so that we can recreate instruments we hear from any song? Seems like it should exist by now?

larme15 minutes ago

For me creating the exact sound is not very interesting from sound designing perspective. You can always sample the real instrument.

Like physical modeling synthesis, the interesting part is to compress the sound to some parameters that you can tweak and generate new sounds

Another approach is VAE, which also you give your some latent embedding, you can tweak the embedding to generate new sound. However the meaning of this embedding is not explicit.

zhinit40 minutes ago

SUNO is pretty close. It still has some weird things going on with high frequency artifacts and phase between left and right channels but if you aren't listening on a good system (like a phone) most people probably wont notice.

zhinit42 minutes ago

synplant is a great synth!

johndear2232 hours ago

Articles like this are why I come back to HN. Interesting technically, kinda novel and fun. Got me thinking about datasets that may be sitting on old HDD, got TBs of old video and audio from projects of past. Blogs like this help point the way.. Now if only I had the time..

alex7o2 hours ago

If you know what you want to achieve you can asks claude/codex/glm whatever, to do the proof of concept first and Dave some time like that

zhinit38 minutes ago

Thanks!

dj_axl2 hours ago

Modeled reverb yet no modeled compressor, hrmm, is compression not used on kick drums (or not a big part of the sound)?

zhinit2 hours ago

The compression is the OTT which stands for Over The Top compression. It was originally a multiband compressor preset in ableton and is now used widely throughout dance music.

trencedamp1 hour ago

For a moment I thought Gen AI meant the current generation of kids. It's a fitting moniker

pringk023 hours ago

I just wish it had samples! I want to hear it

zhinit3 hours ago

For sure! I just added a couple

andai18 minutes ago

Did you save any of the "failed" results? I'd love to hear what kind of weird sounds it makes out of distribution (e.g. on the keywords it didn't have much data for).

motoxpro3 hours ago

They sound cool! Add a few more! :P

jdalgetty2 hours ago

I was hoping to hear some songs using these samples!

juancn2 hours ago

Excellent article! I think it has the right level of detail, one question though: why the shape of the tensor? 4x8x11.

That I didn't get from the text.

zhinit2 hours ago

the spectrograms are 128x173 (128 mel frequency bins by 173 time frames) the encoder is downsampling 4 stages of stride 2 convolutions so it halves dimensions 4 times

0: 128 x 173

1: 64 x 87

2: 32 x 44

3: 16 x 22

4: 8 x 11

Then i used 4 separate channels.

This was somewhat arbitrary due to the local training constraint. This would be a hyper parameter worth tuning if I had time to dig into this more.

I trained this a few month ago and don't remember exactly what I tried before I arrived here, but I only ran the whole process 2 or 3 times because of how long it took to train. Hope this answers your question!

juancn2 hours ago

Yeah, thanks!!

cocodill1 hour ago

someone needs to take care of the snares

zhinit33 minutes ago

If you are committed the model should work about the same on any type of one shot sample. The code is public and documented so if you have the snare collection and a macbook you could probably point claude/chatgpt at it and it would be able to train on your laptop.

kleiba23 hours ago

I have to admit I don't understand what exactly the problem is we're trying to solve with ML here...?

zhinit3 hours ago

I wouldn't exactly say it's trying to solve a problem. It's to explore and see what happens which is what music is all about. It's also a unique niche model I haven't seen before.

tgv3 hours ago

Decomposing sounds from (fully produced?) tracks into underlying components, and then giving the user the option to synthesize them with different parameter settings. I think.

pennomi3 hours ago

I was trying (and failing) to do this the other day. It’s a really interesting problem space and I love to see someone with a more solid foundation give it a try.

mock-possum3 hours ago

This is a really really fun sounding project - ironically, because there are no audio samples provided at all. I would have thought a music producer creating samples for music would naturally let you listen to what they were making.

zhinit3 hours ago

Good point! I just added a couple at the end of the intro

lardosaurusrex3 hours ago

I always roll my eyes when I see LLM weirdos talk about getting models to run on "old" hardware and finding out it's hardware that's still better than what most people have access to.

It doesn't make it any less impressive to those who know what hardware requirements for LLMs usually is/are but for those with no idea it usually ends up reinforcing bitterness towards it as they feel annoyed that their own hardware is somehow worse and yet are unable to upgrade because of said LLMs stealing all the hardware in the world all while RAM/memory/storage manufacturers manipulate the market(s) against them.

kube-system13 minutes ago

English adjectives are highly contextual. In this context, the author's clear meaning is in context to the current generative AI boom.

jdboyd2 hours ago

The Geforce GTX 1060 launched 10 years ago with a MSRP of $249. It spend 5 years and 4 months as the #1 card according to the Steam Hardware Survey. That makes it hard to feel that it is fair to accuse it of still being better than what most people have access to, unless you are asserting that most people have access to no GPU at all, which is likely accurate, but not likely to be accurate here, nor in any sort of enthusiast circumstance. If you lump the Intel Xe built in graphics (started with the 11th gen Core Is) and the Intel UHD (launched with 8th gen Core Is) together, the combined group would come in 6th place, with the 5 places above that in commonness for people who are actively playing steam games all being considerably faster than the Geforce GTX 1060 or Geforce GTX 1660 cards.

Interestingly, now the #1 GPU is the GeForce RTX 4060 Mobile version, which I believe is the first time the top has been a laptop chip instead of desktop chip.Items #2 and #3 on the list are the 2 generation old RTX 3060, followed by the 1 generation newer RTX 4060. 4th and 5th are RTX 5070 and RTX 3050.

zhinit3 hours ago

For sure.

If you are curious I used a NVIDIA GeForce GTX 1660 SUPER So to be exact, it came out 7 years ago (I upgraded at some point on this desktop a long time ago and didn't remember the exact year) (I updated the article to reflect this now)

This cost $230 new and you can get one now for $100 which I don't think is too out of reach.

jdboyd2 hours ago

Saying 10yo 6GB will make most people think you are talking about a Geforce GTX 1060.

zhinit2 hours ago

That was an oversight. The tower is more than 10 years old. I updated the article to be exact now

bigyabai2 hours ago

> but for those with no idea it usually ends up reinforcing bitterness towards it as they feel annoyed that their own hardware is somehow worse

I don't think "those with no idea" spend much time thinking about their hardware at all. They respond to marketing and peer-pressure influences, but most of them are not upgrading phones or laptops because they can't run AI on it.

Most people I know have been wanting upgrade cycles to slow down for quite some time, now. I think that those people will survive deferred retail therapy for a few years.