Skip to content

Navigation Menu

Sign in
Sign up

Seamlessly changing drum samples via MIDI #48

Answered by copych
nullpainter asked this question in Q&A
Discussion options

I am (very slowly) building a hardware interface to AcidBox and am interested to change drum samples on the fly. I have tried with and without PRELOAD_ALL defined but when I send a program change to MIDI channel 10 it both takes some time for the drums to change - which is fine - but all notes stop and there's crunchy static for a bit. I've attached a recording to demonstrate.

Is this expected and just a limitation of the ESP32 / Acidbox? If so, I'll just leave off this feature!

Acidbox.live.drum.change.issue.mp4
You must be logged in to vote

Replies: 4 comments 3 replies

Comment options

@nullpainter , please, specify, what version of AcidBox and what hardware do you use?
There's a lot of changes in the branches is happening right now, including developing of a hardware interface, so, please, notify if you are interested in contributing.
About the issue. Actually, as far as I remember, PRELOAD_ALL should give zero drumkit switching time, but I have to check, what could go wrong. Meanwhile you can check this: when using PRELOAD_ALL, all the samples should be rolled over and be available by triggering different notes in the whole octaves range without sending "program change" message.

You must be logged in to vote
0 replies
Comment options

I'm using a Chinese ESP32-S3 devkit and a clone of S3-only from a few months ago. I tried reintegrating the latest changes from this branch, but unless I'm doing something very wrong it doesn't currently compile using Arduino IDE (header files in src but referenced in subfolders without ../../, and a few other things).

I can confirm that triggering different notes does result in samples from all sets.

I noticed that Init() is called in SetProgram() in sampler.ino. Apart from changing the value of myDir if PRELOAD_ALL is set, Init() does appear to load all samples each time. Should Init() bypass this if the samples have already been loaded?

You must be logged in to vote
1 reply
Comment options

Please, revert to the main branch, it has the stuff that you need. But, there's a lacking PRELOAD_ALL check in SetProgram() of sampler.ino, which should only modify the octave shift when PRELOAD_ALL is defined. I hopefully upload the fixture one of these days.
Please note that S3-only branch probably contains some unwanted features for your purposes, like an absent AcidBanger.

Comment options

To be more precise, this one should do best: https://github.com/copych/AcidBox/tree/0c8cb417d15ac51f40f874398a4aeaf9b7b1a991 , I think that I will modify this version when fixing the program change issue.

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
Comment options

Amazing, thank you. I'll give that a try when I get a chance.

Comment options

Perfect, that works great. For anyone else reading this - you need to send a program of 99 - 107 inclusive to select drum sets 0-8.

Answer selected by copych
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /