Can scripter work prior to channel input? Or is there a way to control an environment object from scripter?
fuzzfilth wrote:Can scripter work prior to channel input? Or is there a way to control an environment object from scripter?
There are some basic things that are missing from your desription and these have quite some impact on how to tackle that kind of problem.
- Scripter sits in a MIDI FX plugin slot which only ever deals with MIDI events coming from a Track, either already there or played live while that Track is selected. So it can't affect events before they reach a Track.
- Because of its location inside a virtual instrument MIDI>Audio stream, Scripter events cannot control the parameters (fader, mute, solo) of the very Track/Channel they live in, nor others, for that matter, at least not directly. Because of this, they also can't be routed to the Environment directly (although there is a way, just sit tight).
- Also, Scripter does not deal with MIDI Sysex Data or Logic's Meta Events or Fader Events, the latter being essential to control fader, mute and solo of a Track/Channel.
- The Environment is much more versatile as far as location of the process(es) goes. It can process live input (regardless of track selection), route MIDI, Meta and Fader data between Environment-, MIDI- and Audio-objects, branch off conditionally to other Environment-, MIDI- and Audio-objects, etc.
- However, Environment-objects can't be put between Scripter and virtual instrument, as that is inside the mentioned virtual instrument MIDI>Audio stream (again, there is a workaround).
- Also, Environment has no concept of time, so you can not have it "do x for y time" or "wait x time before doing y".
To route Scripter events back into the Environment, you use the External Instrument Plugin (EIP) as the VI after Scripter. EIP lets you choose a MIDI port. If you have activated the Inter Application Communication (IAC) driver in MacOS's Audio-MIDI-Setup, you can select that as the MIDI out port which will bring the data stream back into the Environment via an automatically created MIDI in port, ready for Environment tweaks.
Beware, there is the risk of a MIDI feedback loop if the Channel with the EIP is selected as the active track (again, ways around that).
Anyway, in your use case I'd not even bother thinking about Scripter and how to get data back and forth with all its complications. I'd dedicate a latching button (sending CC72 in this example) on the keyboard to manually control the Mute of the selected track, with just one Transformer:
Bildschirmfoto 2021-09-16 um 08.56.35.png
Bildschirmfoto 2021-09-16 um 08.59.05.png
Which does this when that button is pressed:
This way you can even choose to use the feature for extra tight funky clavinet for Jamiroquai or skip it when you need to create a soft and lush strings backdrop for "The long and winding road".
Make this your Template and you're set.
Granteus wrote:Fuzz and Val,
Thats an interesting direction that never occurred to me…sysex F9, F4, F5, and F253; as a way to map and trigger something in the environment and vice versa.
Thanks for the visuals, super helpful! And killer response!
So for playback events, scriptor sits after playback and before any Instruments. If record is set, the VSTi treats the received events just like playback. The environment however can intercept before it hits the Logic sequencer engine. Right?
I gather that when using the external midi instrument plug-in you can then get midifx scriptor to “sit in-front” of the environment when used on an external midi track?! Which is really cool, and I am going to try that to use midifx strummer to play some outboard gear. Then try the iac to play a standalone like kontact player or pipe back into logic.
Back to topic….So in my case that would still require two tracks, essentially making my no output midi track no longer needed. But you have to still select the external midi track and record enable the VSTi track you mean to record on. Not really hard to do, and I suppose that’s a much cleaner work flow without every instrument requiring two tracks. I would however still prefer a couple objects set in the environment, never to be looked at again…like your suggestion. And then just throwing a scriptor on the instrument track where you would want that functionality.
An environment cc trigger could allow midi to pass to the virtual instrument only when a conditional state is met. So the environment sets a special CC flag that isn’t recorded on the midi track. Sysex is a cool approach as that is not normally recorded. Having it as a track pluggin eliminates the no-output track. And you can just turn midifx off when your done recording with that track. Could even map the plug-in bypass function to some midi event or key press.
In the environment set up a global transformer to send F4 for all note on events and F5 for all note off events without filtering the source data.
In Scriptor when it sees F4/F5 events it filters all midi from reaching the VSTi. When it sees no F4/F5 events it just lets them play.
So the scriptor logic might be something like if F4 or F5 exists and Note on or Note off exists then run block output. If F4 or F5 do not exist and Note on or Note off exists then run stop block output. I think some type of window average and timer to smooth out a change of blocking state would be a good measure for sanity…but maybe not even needed.
Seems pretty simple. I see a potential for hung notes. So some type of dimensional array to track which note-ons have not been sent note-offs…for when going to the blocking state. But v1 could just send all note offs and value resets for the pedals, pitch and wheel with each blocking function state change. Maybe use a dictionary lookup for what things and values comprise a reset. A midi panic lite of sorts, I guess.
V2 could track live vs playback by comparison, you would have to duplicate one channel to a dedicated midi channel in the environment and maybe have all those velocities reset to zero. The idea being only the live events are the ones that get dropped. That would allow for overdub loop style of midi recording…even with external gear. But I still primarily punch in-out with both audio and midi.
Thanks for your detailed responses. Great stuff! You both rule!
Granteus wrote:So for playback events, scriptor sits after playback and before any Instruments. If record is set, the VSTi treats the received events just like playback. The environment however can intercept before it hits the Logic sequencer engine. Right?
when using the external midi instrument plug-in you can then get midifx scriptor to “sit in-front” of the environment
An environment cc trigger could allow midi to pass to the virtual instrument only when a conditional state is met.
Sysex is a cool approach as that is not normally recorded.
Could even map the plug-in bypass function to some midi event or key press.