Making a simple sampler + sequencer


#1

Hey there all! I'm very new to Axoloti and I need some guidance.

I have a very specific project that I want to get finished this year, namely:

  • A portable sampler with a lofi mic, recording to a SD-card
  • The sampler also has a sequencer, reading and playing the samples.

Simple enough I thought, but not simple in hardware as far as I can tell. My initial thought was to use the Axoloti as both the sequencer (with some fx and whatnot) and sampler. When I came to the realisation that Axoloti, powerful as it is, might now have the support needed for the recording side I turned to Arduino and inspiration from Bastl Instruments Microgranny (which is Arudino based with an Adafruit Wave shield).

So in short, I want not only to read samples from the SD-card (sample player). I want both to record and play samples (sampler). Is it still doable doing just with the Axoloti? Mind you I don't need 44.1kHz, I'm perfectly fine with low bit rate and 22.05 or lower sample rates and pretty short recordings < 2 sec (since the sample sequencer mainly will work as a drum instrument anyways).

I found a few topics related to this question, but haven't found an answer to this specific problem and I do want to avoid pitfalls in the beginning.

As you might tell I am a beginner in all things hardware, but I'm embarking a new career in embedded systems so I've got time and dedication to learn more.

I'm thankful for any help!


#2

My limited knowledge on this is what I needed for my Mellotron patch in the community library. Polyphonic streaming from the sd-card is possible. I had to use a fast card, or the seek time when starting a new sample took too long, resulting in clicks (at least that was what I think caused the clicks). Also, changing the pitch on streaming audio is a bit tricky. My wave/polyplay does this, but my simple linear interpolation-algorithm is a bit rough.

Loading samples into ram and then playing them is quite straight-forward I think. I have never done so, but iirc there are already dedicated objects for that. I have never tried to record a sample and save it to the sd-card, neither.


#3

Hi
I think the axoloti is very capable of what you want.
You just need to record the audio into a table, and then play back that table using a sequencer (or other).
If you want something even much more evolved, look into @JeromeB test patches on this thread : Beatslicer patches. You would just need to add the sequencing half.
It's hard to help without exactly knowing what you want to do, and what controller you are going to use (number of buttons, keys...)
Look around the forum for anything concerning samples and sequencers, explore the different community objects and patches, I'm sure you'll start finding part of what you need to start making your dream patch


#4

There's a guy on the Axoloti forum, you might have seen him, has a YouTube channel where he produces strange noises and compositions in strange places. He also started doing tutorials and I must admit, I wish he'd do one all about recording/playback/resampling and demo some examples while explaining them, examples of how to get it all optimised for duplex operations etc - a proper dedicated video on the subject!

Oh look, there he is * POINTS ABOVE * :grin:


#5

Thank both of you for your answers!

Matthew! You're the youtuber that made me consider Axoloti in the first place. Your tutorials and artistic explorations are equally awesome. :smiley: The playback is not really an issue as you both stated. Good to know that the only extra bit of hardware seems to be on the sensor side (simple mic). I have started a design sketch, will probably upload it here later.

The box I want will do the following:

  • Record 4 sounds (preferably lets the user pitch them before saving) one sample at a time OR record 1 longer sample and uses a threshold to pick out 4 starting points, whatever is easiest to implement.

  • Create a rhythm. It will do so with essentially with just 2 knobs. Knob 1 sets the tempo. Knob 2 is a beat generator (macro control that generates rhythms, complexity increases at higher values). 4 individual pots for each sample, if the space is limited: 1 big macro knob controlling all the instruments. If possible write the loop as a wave file to the SD-card.

Besides the 2 knobs, there needs to be a few simple buttons for recording, previewing and erasing. I haven't decided yet on how many. But I want to make it as simple as possible (4 buttons will probably be enough). Making it very linear is not a problem, in fact that's the goal.

Perhaps an ADSR-envelope, 1-envelope for all 4 samples. Maybe just 2 knobs (1 knob for the attack, 1 knob for the decay, with fix 0 sustain, 0 release). Or a push-switch-knob to step through the envelope.

Recording process: 1) Record 2) Preview 3) pitch (optional) 4) save 5) autoload in a sampler and control with an adsr 6) overwrite repeat step 1-6 with the next sample. When 4 samples have been recorded, then and only then generate rhythm. When loop is saved/cleared repeat recording new samples (and new rhythm).

I have plenty instruments but my current interest is to use generative tools to spark new ideas. And I want to make it very limited.. recording 4 samples, generate a rhythm, in some way capture that loop and move on. Recall ability is not the goal here I'lll use the rhythms in a computer later on.

A few other options would be a input attenuator (knob), speaker perhaps? OLED? Another macro-knob that randomly loads a pre-defined fx-chain with a dry/wet-knob.

I will remember getting a fast SD-card and look into that Beatslicer patch.

I'm really at the beginning stages and my first language isn't english as you probably can tell. Again thankful for any input!. 12-15 pots/knobs should be max and there's always the possibility to use an external midi controller when prototyping I guess. To be honest, this is my first project and I have just started to understand analog/digital circuits.. so my knowledge and intution is limited. I have more experience in coding and a lot of years making electronic music in the box.


#6

Ok ! , I've done a short, quite messy, improvised tutorial video to help you in your quest
(oh and thanks @Benmir for the kind words by the way)

The making of this tutorial taught me quite a lot about what "not to do" when filming such videos.

1° Don't improvise, make sure you have a full written plan before you start to patch

2° Keep up with the notion of time. This is probably the hardest : modular time, tutorial time and improvisation time are very expanding notions. So imagine combining the 3.

3° Don't hope to do a "non edited" version, I did it here (more or less) but you still end up with a load of wasted time waiting for my slow brain to fix my bad patching.
But I intended to leave this one as it is, so that you can live through the debugging process, and so that I can feel bad and call myself names each time I watch it again for the end of my life !

Anyway, I suppose you're wondering why this post hasn't got any video attached, at that's because it's still uploading (and my internet speed is very bad).
I don't think it won't be online before tomorrow morning.
I'll post it here as soon as I see it online (and I'm awake, and not to drunk)

Just to warn, the video lasts around 30 min, and is very un"artistic" and quite a pain to listen to (from my point of view). I hope it won't be so hard for you, and will help some people invent fun new ways to play around with their axoloti


#7

#8

Dear Matthew!

Man.. I don't even know where to begin to express my gratitude!!

In a world full of twitter wars and shallow social media platforms you have proven that internet still can be a place of sharing. Massive kudos!

I watched the whole tutorial and will probably revisit it a lot the coming weeks, can't wait till i get my Axoloti (should arrive in a couple of days now). I actually prefer non-scripted, non-edited tutorials. It gives a greater insight in more aspects (like troubleshooting, design choices, reasoning) than just the finished product. I will look into the objects you referred to in the video.

You gave me a real head start, again.. thanks!


#9

Yeah @mtyas Awsome video, a standard I am sure we have all come to respect and appreciate, it will help me heaps with my limited synth no how..
Wasn't sure where to begin with recording audio tables, I am surprised it took up so little DSP load.. :roll_eyes:


#10

Nice video, Mat, very good of you to do that. I wish you'd included my request as well though, for setting up duplex operations. I read somewhere on the forum a while ago that it was possible to do recording to SD card while playback was in process, but it required some clever sketch work to do it.

I wish someone would do a tutorial either written or video where all that sort of stuff is explained. It's mental torture having an Axoloti and not being able to do that. Can't remember who it was, but I know someone on here managed to do it.


#11

Sorry axoman, can't help you with your request, don't know how to do it myself. I'm just a musicien who tries to patch up instruments for his sets. I'm no technician, electrician or coder.
I'm sure someone else can try to fill your request.


#12

Cheers Matt, I'll start a thread about it, worth a try I suppose.