jtackaberry / reaticulate

An articulation management system for REAPER
Other
99 stars 45 forks source link

Allow inserting articulations by MIDI notes #52

Open fbeauvaisc opened 5 years ago

fbeauvaisc commented 5 years ago

Hi!

Great software! I'm new REAPER user coming from Cubase since their November Cubase 10 update was a fiasco. The only thing I was going to miss was Cubase's Expression Maps. Although Expression Maps have a decent custom mapping GUI and dedicated controller lanes, I feel Reaticulate is surpassing it in a few areas like chasing and the possibility of multiple maps on a same tracks and more. I've started to map a few of my libraries to Reaticulate. My only issue is I didn't figure out how to trigger the articulations using midi notes. My VEP6 templates are all using multi-timbral instances of ether Play 6 or Kontakt 5 with 16 articulations associated to 16 midi channels. I trigger the midi channels using a small secondary 25keys midi controller assigned to out of musical range midi notes starting at C-2. I've standardized my maps so the similar articulations like legato, long, staccato, marcato and so on, are always maped to the same midi channels and triggered by the same midi notes. Is there a way to assign notes to trigger Reaticulate? Would there be a way to do so in the Actions list?

Thanks!

jtackaberry commented 5 years ago

Hi François,

I replied to you over on the Reaper forum but just to follow up here as well, this use-case isn't very cleanly satisfied right now.

But I think it's quite a valid use-case that I'd like to support. So now it's just a question of how best to do it.

jtackaberry commented 5 years ago

Thinking that this is a common enough use-case that we might make note assignment to articulations a first-class citizen.

If an articulation as exactly 1 note output, then we can infer that as a keyswitch. (After all, when the note passes through to the patch it will trigger the articulation on the patch anyway.) Otherwise, or if there are no notes in the output event list, the articulation can be assigned new note attribute that defines the note that should be mapped.

Design

This means we need two additional functions:

  1. JSFX needs to maintain a mapping of user-defined notes to articulation for a given bank. This data can be stored in bits 0-7 of the currently-reserved-for-future-expansion slot 2 of v1+ articulations in the JSFX. (This means such articulations will need to be v1 instead of v0.) The existing source channel of the articulation can be used. This value will be the value of the note attribute. The note attribute will be implicitly set if the articulation has exactly 1 note-based output event.
  2. The JSFX will need a way to signal back to the main script that an articulation has changed by means of a note. We'll need to allocate another slider for this purpose, which will be a bitmap of which channels had a note-based articulation trigger. When the main scripts detects a note-based articulation activation, if the transport is set to record, or the MIDI editor is open with step-record enabled, then the script will look backward in the active MIDI item from the current ppq until it finds the note for the triggered articulation (probably with some upper limit like 1 or 2 bars, depending on amount of delay), remove the note event, and insert a PC event in its place.

However, this automagic replacement of notes to PCs will only work on one track, whichever is considered active in terms of the main UI. If multiple tracks are armed for recording, only the first selected one will have the notes replaced. It's unclear if this will be a real problem in practice, but #4 could mitigate.

Whether this replacement is feasible will need a proof of concept. Reaper might not like it when actively recording items are getting their MIDI data modified.

This is also related to #2 for UX.