Simple drum machine


#1

Hey everyone,

I'm just getting into this whole Axoloti thing and so far it's been a lot of fun. But yeah, that learning curve is still holding me down.

I know there are some patches/projects out there for a drum machine, but I'd like to find one that will work well with my Beatstep Pro. Is there one like this out there?

16 voices
sample based
banks changeable by cc

I'd like to add additional features as I get to know what I'm doing, but for now this would be great to have!

Thanks in advance


#2

I made a bunch of notes in here for how to load samples to tables. It's much better than using the wave play object, but it takes some understanding.

16 samples is a lot, so if you want to modulate and mangle it you might overflow the RAM of the Axoloti. You might be okay if you just want to select and play the samples straightforward. If you run out of space, consider using less samples so you can mess with them more.

There's tons and tons of information on this forum about playing samples, and a few example patches. If you have an ambitious project in mind, prepare to dig for gold here in the forums. I promise, you'll find it though.

Samples from tables.axp (7.8 KB)


#3

I'd say that 16 samples is doable. I think the most efficient way is make kind of a "sample train".

By that I mean having 16 samples in the same wavefile and load that file to a table. Then you offset into the table to read each of the 16 samples.

If you have some samples that you want to combine into a single wav file, I think the easiest way is to use a DAW.

This needs to be kind of specific, so here comes an explanation on the technical side:

Tablesizes and setting a bpm in DAW to fit Axolotis table sizes perfectly:

Axolotis table size are set by the power of 2. So table sizes can be in sample 2, 4, 8, 16, 32, 64........ 2048, 4096, 8192.......... 262144 samples long. And so on.

If you for example want to make a file in the DAW that fits Axolotis tablesize 262144 samples perfectly, you can set the DAWs BPM to 175,7813 bpm(Precisely!!!!) and set the length of the loop you bounce from the DAW to 4 bars.

its also important that you set the DAW to 48khz sample rate, cause thats what Axoloti is using.

So if you bounce a loop of 4 bars, at 48khz at 175,7813 bpm you will end up with a file that is exactly 262144 samples long, which is perfect for Axoloti :slight_smile:

That will only give you a 1/4 length for each of the 16 sample slices. I know it's not very long, but for short drum hits it can work okay. If you want to get longer sample slices, you just expand the loop you render to longer, like 8 bars (524288 samples), then you get 1/2(half bar) for each sample slice, if you render 16 bars(1048576 samples) you get a full bar for each sample slice....... And so on..........

It does take some work, but it's pretty efficient method, cause you have done all the math BEFORE adding the file to Axoloti, Axoloti really just have to play them back and not do any calculations.

Then to play back each of the sample slices, you can use my sample slicer, which is explained here:

Here is a snapshot how it can be used, but I recommend reading the description in the above link. I am pretty proud of this object, it's pretty light on cpu and when making the sample train as described above you get a lot of bang for the buck :slight_smile:

Hope this makes any sense........ :upside_down_face:

Have a nice weekend!


#4

See, like I said in the notes, @telemari, Jaffa's the guy!


#5

Awesome. Thanks for the replies. I'll take a lil bit to wrap my head around all of that. But I do believe I understand the concept. That instead of loading up 16 samples I will load up 1 that has all of my desired sounds in it, and have the axoloti play back portions of that one sample, effectively giving me 16 samples. I'm into it! Or I totally misunderstood, haha.

If I can change that sample via cc/pc messages so I can have different drum kits for different parts of my songs I will be golden... for now.

Easy on the CPU sounds good to me. I have some other ideas to try to implement with that.


#6

Yes you got it right. You have one single audio file, but with 16 smaller samples/audiofiles in the single file.

Keep in mind you have to distribute the samples EVENLY in the sample train or else my object wont work. Like for the 262144 example, which is 4 bars, you put a new sample on every 1/4 of the 4 bar loop.

Yes you can change the whole audiofile using a cc number. You just need to load another audio file into the table, then you have 16 new slices. But keep in mind, loading a new file from SD-card to a table, can make a BEEP sound, while it loads.

But yeah, try it out and see if you can get one working and take it from there :slight_smile:


#7

jaffa, just add this line when loading stuff (before the line that starts the load):

codec_clearbuffer();

this clears the audio output buffer before loading, so it won't create the beep. You'll just have a short silence instead.


#8

Nice, thats a lot simpler than the approach I used to avoid the bleep.

Will try it out for future projects :slight_smile:

Not doing o much Axoloti these days, got some other micro controllers now I am messing around with, like Bela :slight_smile:

I use them more atm.


#9

I got me a "salt" and "salt+" (also bela) for my modular :slight_smile: Though haven't done much with it yet as I was in the middle of moving around because of renovation of my house.
I wanted to turn it into a live ifft-oscillator, but I'm starting to think it also wouldn't be such a bad idea to incoörporate my drum sequencer or this melodic generator. Though perhaps I might be at least able to add the key-pattern-generator to the ifft oscillator to drive the "sinfonion" 's root key and use some trigger/cv outputs to drive my drums with my drum-sequencer.