Jump to content


Photo

Pressing the 'Drum Kit' button

lua copy instruments

  • Please log in to reply
2 replies to this topic

#1 tris

tris

    Advanced Member

  • Normal Members
  • PipPipPip
  • 89 posts
  • Gender:Male
  • Location:Brighton, UK
  • Interests:Noises and open source

Posted 19 September 2017 - 12:54

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 



#2 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6419 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 19 September 2017 - 13:41

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...


  • tris likes this

Tracking with Stuff. API wishlist | Soundcloud


#3 tris

tris

    Advanced Member

  • Normal Members
  • PipPipPip
  • 89 posts
  • Gender:Male
  • Location:Brighton, UK
  • Interests:Noises and open source

Posted 19 September 2017 - 19:50

Thanks for that man.

 

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







Also tagged with one or more of these keywords: lua, copy instruments