How to delete Samples + Sample Slots in Note-Off Layer?

I’m wondering how to accomplish this deal? I’d prefer to be able to wipe all Samples and Sample Slots in the Note-Off Layer, before I use my script to copy current-sample to Note-Off Layer sampleSlot1 and do little things to it.

I can’t seem to figure out the path for deleting the sample buffer or the sample slot.

do i really need to move the note-off layer sample to note-on layer before being able to delete it?

figured it out.

  for i = #instrument.samples, 1, -1 do
    if instrument.samples[i].sample_mapping.layer == 2 then
      instrument:delete_sample_at(i)
    end
  end

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.