TDAbleton Drum Sequencer

Hello,

I’m pretty new to TouchDesigner, however - I am trying to create a drum sequencer from TouchDesigner to Ableton. To do this I am using an Ableton Clip Slot Base, and creating individual “swap notes” Panel Executes that are programmed to add a single note at a single point in a bar, which increments along in 16ths.

The problem I am having is when disabling a note, it sometimes removes the note/notes after it which it isn’t programmed to remove.

The end goal is to be able to add and remove notes for 6 drum elements with buttons (16 buttons for each drum). I’m doing this because I want to create a controller using an Arduino that gives people the ability to edit a drum sequence as it is playing, using a series of 16 buttons per drum.

I have attached the file so anyone can see the code inside of the Panel Executes. At the moment I am only working with four bars to simplify things.

Thanks
Sequencer Test.4.toe (182 KB)

I’m traveling right now but will take a look in a couple days when I’m settled

Here is a zip including the Ableton file, starting from Ivan’s Demo set and adding a 505 Classic. Let me know if i’ve missed anything.
TDAbleton Drum Sequencer.zip (301 KB)

Yeah this is crazy. Good find. Digging deeper. Might actually be a bug in Ableton Live.

Bugger, I was hoping to use this is as a feature in a project - can you think of another way to make a custom sequencer? I thought maybe ‘send notes’ could work?

I wonder why it only seems to happen when using more than three swapnotes. At least we found something though

Don’t give up yet. I’m just saying it’s not simple… I’ll have more time to spend on it in the next day or so.

Okay I figured it out. Ableton documentation is wrong about the way the remove notes function works. They are described as (timeStart, pitchStart, offsetToTimeEnd, offsetToPitchEnd) but are more properly: (timeStart, pitchStart, offsetToTimeEnd, offsetToPitchEnd). The last two arguments are added to the first two to determine the endpoints for deletion.

This means that RemoveNotes(1, 36, 0.1, 1) will remove a single note starting at beat 1 and at pitch 36. The problem is that on your third button you were doing RemoveNotes(2.0, 36, 2.25, 36) which makes sense with the way the documentation reads, but actually deletes all the notes from Pitches 36-51 and Beats 2 to 4.25!

I will correct the wiki, example, and argument names in TDAbleton. Nice find, thank you!

Ah brilliant, thanks Ivan, it works like a charm now.

The way the function works actually makes life easier for the task I’m trying to accomplish - now I only need to change the timeStart and pitchStart argument each time!

Thanks again