Pressing the 'Drum Kit' button

Hi,

I’ve written a tool which copy’s the selected sample to a particular instrument.

Once copied the sample is spread mapped across the keyboard. I’d like for it to be added to the next unmapped key - i.e. have it copied as a new sample in a drum kit.

Can the ‘Drum Kit’ button be called from the API?

Cheers,

Tristan

Can the ‘Drum Kit’ button be called from the API?

No, you can only read or modify the “raw” sample mappings. You can put something together that effectively does the same thing, but beware: the drum kit mode is a bit special.

If you, as a user, has pressed the ‘generate drum kit’ button, the sampler actually switches to a special mode in which mappings are restricted to the selected drum-kit layout, in realtime.

You can check this e.g. by creating a new sample in the instrument - it should be assigned to a key range instead of spanning the entire range.

This also means that, if the user has activated this mode, you would not have to do anything to achieve what you want. But, unfortunately, this is not a a “proper” solution because, as you pointed out, you can’t activate the drum-kit mode using the API. You can however detect if the mode is active - based on the fact that a newly generated sample will occupy a small key range, and not the full key-zone.

So, bottom line is: for now, you will have to generate/maintain those layouts yourself…

Thanksfor that man.

Managing things my self is working ok for what I’m doing.