Configurable (SD card) sample player object


#1

Hi everyone! My first axo object (tested only on 1.0.9 so I'm not posting it to Community library**)

It is a MIDI triggered SD card sample player. Actually it is a trigger for wave/play. It uses a text file (SAMPLER.CFG) on SD card to define which samples would be played on which MIDI note and how.

Example config (SAMPLER.CFG on SD card):

36 TRIGGER SAMPLE1.RAW
38 HOLD SAMPLE2.RAW
# comment
f#4 T SAMPLE3.RAW
A3 H SAMPLE4.RAW

MIDI note 36 (C2) will trigger sample and let it play till it ends (or another sample is triggered), note 38 (D2) will play sample while the key is down and stop on release. Notes can be defined also by their name and play mode can be shortened.

sample_trigger.axo (4.3 KB)
sample_trigger.h is also needed but I'm not allowed to upload it so I'm linking it.

** I've done some modifications to firmware (connecting external arduino powered display) which aren't compatible with 1.0.10 so that's why it is 1.0.9.


SirSickSik Contributions
Axofx - bass/vocal effect, sampler and synth
Mapping keys to samples
#2

Yay! I have been waiting for something like this for a while! Maybe put a loop mode per sample as well? (just a kind suggestion:)

Thanks!


#3

Loop mode is definitely on the TODO list (there is a LOOP mode commented in the source) but currently I have no idea how would I do it :slight_smile:.


#4

Works well, quite useful indeed. Thanks a lot
Shame it doesn't work in polyphonic mode.


#5

Yeah. A polyphonic module would be killer. One module that you can import samples into. Map them out on a keyboard and play polyphonically. with loop point etc options for each sample=Wowzers!


#6

Yeah, that would be cool :). For looping I think I would need to reimplement something like wave/play directly inside the object or find a way to get file length from the trigger object. Polyphony could be doable - I'm not yet really familiar with how Axoloti handles stuff so I'll need to check that.

BTW, adding wave playing directly to trigger object could maybe add possibility for pitch (speed) manipulation - I've done a simple sampler before on a very similar CPU (and same OS) which reads samples from SD card with variable playback speed (octave up and down) and it works pretty OK.


#7

Hello.

n00b here. This object is great, and I've got it working but there's one problem - the samples are played back very slowly. It sounds to me like half speed though I'm using speech so it's hard to tell exactly.

The samples are .raw files, 16 bit 48k stereo, which I think is correct, though I've also tried various combinations of 8 bit, 44k, mono etc but nothing works right.

The patch is just built exactly as shown above so there's nothing added that could mess things up (yet!)

I think it's probably something really obvious! Can anyone help?

Thanks


#8

Some further information if anyone out there can help.

The sound is not played at exactly half speed. I tried doubling the speed of a 100bpm loop on my computer (making it a 200bpm loop) and putting it onto the SD card.

I'd hoped it would play back at 100bpm and I could just chalk it up to 'one of those things', but no, it's around 110bpm when played back. I can't think of an obvious mathematical relation that would explain that (whereas exact doubling/halfing could have been down to mono/stereo interplay).


#9

44.1kHz (in file) versus 48kHz (on Axoloti) sample rate would make up for the 100bpm/110bpm ratio.


#10

Ah, good spot. Thanks, I'll test that out.