A technical support community for Apple Logic Pro users.

 
User avatar
des99
Topic Author
Posts: 5904
Joined: Tue Jan 27, 2015 12:08 pm

Scripting, MIDI Output destinations & Sysex

Tue May 05, 2015 9:16 am

I think the indirect answer is "No" :) but is there anyway to output MIDI from a script to a MIDI destination *other* than the current channel strip the scripter plugin is loaded on?

Either to another environment object, or to a MIDI port directly?

I guess that you could have the "External Instrument" plugin on an instrument channel and set a direct MIDI output to that, and events generated will get sent to that MIDI port?

Only problem with this is that as far as I can remember (and I haven't yet checked) MIDI sysex events do not get passed through a channel strip. And possibly the MIDI scripter doesn't have javascript objects for sysex events as well...

I'm investigating a number of ways to achieve something (remote MIDI device editing) and while I can go the usual environment approach (which is what I'm doing first of all) there are some things where the more "programmey" environment of the MIDI scripter would be useful - so rather than using the environment to receive incoming CCs and output sysex, using a MIDI Script to process incoming CC's and output sysex to the hardware would be helpful.

(If sysex can't be passed, the MIDI scripter is less useful as I'd have to add something else on the back end to convert generated events back to sysex, and we defeat much of the point of the scripter plugin if we have to ultimately do this in the environment anyway).

Anyone have some practical tips on this?
mu:zines | music magazine archive | difficultAudio | Legacy Logic Project Conversion
 
User avatar
des99
Topic Author
Posts: 5904
Joined: Tue Jan 27, 2015 12:08 pm

Re: Scripting, MIDI Output destinations & Sysex

Wed May 06, 2015 9:12 am

Well, painful as it is to deal with some stuff in the environment, the real pain comes when needing checksums, as in my case, the available checksum routines don't sum the correct bytes I need.

You have to go through a painful routine to synthesize and insert checksum values, and at this point I looked into Ctrlr and had a working editor with some fairly sophisticated features in a couple of hours - I'd still be working out how to create checksums in the environment in this time.
mu:zines | music magazine archive | difficultAudio | Legacy Logic Project Conversion
 
studioj
Posts: 32
Joined: Tue Aug 06, 2013 10:45 pm

Re: Scripting, MIDI Output destinations & Sysex

Sun Dec 15, 2019 8:40 pm

Did you ever figure this out? Is it possible to send to other MIDI outputs with the scripter plugin? thx!
 
User avatar
Dewdman42
Posts: 3339
Joined: Tue Sep 09, 2014 3:01 pm

Re: Scripting, MIDI Output destinations & Sysex

Sun Dec 15, 2019 8:43 pm

its not possible. You can do it in the environment, not in scripter.
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 96gb ram
 
User avatar
ValliSoftware
Posts: 1211
Joined: Mon May 19, 2014 10:46 am

Re: Scripting, MIDI Output destinations & Sysex

Mon Sep 20, 2021 9:06 am

Using a MidiFX plug-in yes, Scripter no.

As I noted here, AUv3 handles incoming SysEx messages and you can send back to the host, which you need to do to contine the flow of the Midi Events down the MidiFx chain.


I havent worked on the SysEx part only because I've been writing/testing my other options in my Objective-C MidiFx plugin. The only reason I wouldn't put support for SysEx is because, I have no hardware to test this and to be able to make changes for updates. So it's a extremely low priority for my MidiFx plug-in.

What's great about this MidiFx plug-in is, it's a MidiFx plug-in, not an instrument so you can have a loaded instrument, but my MidiFx plug-in can redirect to a virtual port I create and in The Enviroment you can cable from the virtual port to a final instrument destination.

So yes it's possible.
One thing to keep in mind about a AUv3 app extension, it's a sandbox application. So API's that you normally would call in a regular application, won't work in a sandbox application and if you plan to write out files like I do with my capture Midi part of my MidiFx, you can only write a a sandbox folder location per your app extension.
So far, these aren't bad limits, I've been able to write the MidiFx plug-in that I want.
MacBook Pro 10.8.5 2.2 GHz Intel Core 2 Duo 6GB Ram - Logic Pro X (10.2)
MacMini 10.13.6 2GHz Intel Core i7 16GB Ram - GarageBand 10.4.5 Logic Pro X (10.4.8)
iPad Mini iOS 12 - iOS GarageBand 2.0.1
Qosimo X70-A 10.13.6 Intel® Core™ i7-4700MQ Processor 32GB DDR3L 1600MHz memory, 2-500GB 7200rpm hard drives - Logic Pro X (10.4.8)
MacMini M1 11.6 Apple M1 16GB Ram 1TB SSD Logic Pro X (10.7) Rosetta 2 not installed