Announcement

Collapse
No announcement yet.

Getting isolated MIDI back from Logic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting isolated MIDI back from Logic

    So I've been working with TouchOSC for some time now, and only recently started using OSCulator as a bridge (when program changes didn't play nice with TouchOSC alone and I wanted better bidirectional support).

    I've converted my previously midi-only touchOSC template to OSC-only, and have successfully mapped the midi CC data. I've even read through the tutorials on setting up OSC in Logic via control surface automation learning (not how I'm doing things). I'm really working purely in MIDI CC and program changes. I've built a series of faders to control stuff like modwheel, expression, filters, etc.

    What I'd really like is to have them update visually in touchOSC in sync with what's been recorded in Logic. The only bidirectional tutorial is a bit overboard for what I need. I've already figured out a rudimentary way to simply pass the MIDI CC that's been recorded to a track back to OSCulator by simply creating an instrument set to the OSCulator port and cabling the output of an environment object to it. I've configured the return midi data in OSCulator, and my faders move in sync. It's wonderful!

    ...however...

    Logic is great at taking whatever MIDI data is coming into the sequencer and automatically mapping it to the currently selected arrange track - no matter what channel it's being transmitted on - making it dead simple for my touchOSC template faders to control *only* the track I have selected. The problem is the return MIDI - if I cable the output of a specific object to OSCulator in the logic environment, I only get midi feedback for that particular object - not to mention the problem that if it's a multi-channel midi instrument, I get all 16 channels, which includes CC data for 16 independent tracks. So if they're all reading CC data changes, they're all getting funneled to OSCulator, and all trying to move my touchOSC faders at the same time!

    So I don't think this is actually a problem that can be solved within OSCulator. Really I guess I'm asking if anyone knows how to limit/filter an output stream of MIDI data to *only the track currently selected/active in the arrange window* (just like all incoming midi data is only routed to that same track). This would allow my single bank of faders to display only the data from that particular track - mimicking the behavior of typical control surfaces that both input and display only the data for a selected track. I could switch tracks on the fly, and my visual display in touchOSC would reflect the current track, as well as allow input for that track.

    Anyone?

  • #2
    Hi Somatic,

    First off, thank you for this detailed post. Unfortunately, and this is has been often asked, there is no simple solution for bi-directional MIDI support in Logic. Bi-directional communications are either handled through a environment hack (like in your case), by using a standard control surface protocol (like Mackie), or by though a Logic MIDI plugin (something I would like to implement in the future).

    Logic is great at taking whatever MIDI data is coming into the sequencer and automatically mapping it to the currently selected arrange track - no matter what channel it's being transmitted on - making it dead simple for my touchOSC template faders to control *only* the track I have selected. The problem is the return MIDI - if I cable the output of a specific object to OSCulator in the logic environment, I only get midi feedback for that particular object - not to mention the problem that if it's a multi-channel midi instrument, I get all 16 channels, which includes CC data for 16 independent tracks. So if they're all reading CC data changes, they're all getting funneled to OSCulator, and all trying to move my touchOSC faders at the same time!
    I am at the same time surprised (because I find crazy that Logic still has no simple and well made mapping system), and not surprised (because of what I just said).

    So I don't think this is actually a problem that can be solved within OSCulator. Really I guess I'm asking if anyone knows how to limit/filter an output stream of MIDI data to *only the track currently selected/active in the arrange window* (just like all incoming midi data is only routed to that same track). This would allow my single bank of faders to display only the data from that particular track - mimicking the behavior of typical control surfaces that both input and display only the data for a selected track. I could switch tracks on the fly, and my visual display in touchOSC would reflect the current track, as well as allow input for that track.
    I think there is a mapping option that allows you to do that, but I've never had it working.
    For instance, in the "Controller Assignments" panel, isn't the "Channel Strip: 'Selected Track'" supposed to do just this?

    logic mapping.png


    Best,
    Cam

    Comment


    • #3
      Originally posted by camille View Post
      I think there is a mapping option that allows you to do that, but I've never had it working.
      For instance, in the "Controller Assignments" panel, isn't the "Channel Strip: 'Selected Track'" supposed to do just this?
      I've also seen this one option as the only clue anywhere in logic that this would be possible. However, this is still handling the input side of the equation, and not the output. This option menu lets you either hard-wire a particular control to a particular logic object or to whatever you have selected. But I've never been able to figure out how to use the "controller assignments" to get any data back from logic, let alone the "selected track".

      I have to believe this is possible somehow, as touchOSC has an OSC layout that works very much like a standard control surface, in that the faders reflect bank changes and even focus on the selected track. But my best guess as to how they do it is some kind of actual built-in support in Logic for touchOSC, where logic is recognizing touchOSC as a real control surface and sending OSC data to it somehow (I've examined the layout and it's no different than what I've built). The same setup does not seem possible for the user to create (at least not in controller assignments). I had hoped that I'd be able to get a little more control with OSCulator, but there's still something missing....

      Comment


      • #4
        Ah, that's correct, those controller assignments work only one way, which is annoying to say the least.

        As for the TouchOSC's Logic layout:

        It was done by Apple and is embedded into Logic as a MIDI plugin. The MIDI plugin works by converting a virtual control surface into OSC messages in both directions, unfortunately this is only compatible with TouchOSC as you can not change the OSC destination (hard coded into the control surface's code). You will notice that TouchOSC also automatically changes its layout to the Logic layout once activated.

        Comment


        • #5
          It was done by Apple and is embedded into Logic as a MIDI plugin.
          You have confirmed my suspicions ::sigh::

          Any clues as to what it takes to write such a midi plugin? Or is this a dead end, as only Apple can include this functionality in logic?

          Comment


          • #6
            I would like to explore that possibility but I can't promise when I'll have time to devote on this. Currently, I am working on new feature that I would like to include in the upcoming version (2.12), and beside updating the manual, I have lots of little things to polish. Would it be ok if you PM'ed me in a couple of weeks?

            Comment


            • #7
              Hi Somatic,

              I got your PM, thanks for pinging me back about this question.
              I started working on the Logic MIDI plugin, and have something that starts working.

              OSC can be used to control the fader level, mute status, solo status, etc.
              Most transport and mixer commands are implemented.

              I would like to work on this a little bit more before sharing with you, I will come back to you early next week.


              Best,
              Cam

              Comment


              • #8
                Hey somatic,

                First of all I would like to let you know that a release candidate of the upcoming version has been released, and that I suggest you try this latest release.

                So, I created a plugin for Logic Pro that sends and receives OSC data between Logic and OSCulator. This is cool because you can use it to communicate with any OSC enabled application as long as you know how to use OSCulator.

                I have bundled the plug-in, some initial documentation and an example OSCulator file here:

                Description The OSCulator Plug-in for Logic Pro is a "Control Surface Plug-in" allowing control of Logic Pro using the Open Sound Control protocol (OSC). The aim is to create a clean and documented API so OSC applications are easier to interface with Logic Pro. The plug-in is compatible with: Logic Pro 9.1.2 or


                Please note that the example file uses the LogicTouch layout from TouchOSC on iPhone to show how to use OSCulator as a bridge. Therefore you should not use TouchOSC as a control surface in Logic if you want to use OSCulator in between.

                There is some basic configuration to do when using the example file (something I forgot to explain in the README): Once OSCulator is setup as a control surface in Logic, open the Parameters Window go to the OSC Routing tab, then change the OSC target that is not the default target (not TouchOSC) and with the gear button, choose the OSC service that has the name of your computer. I will improve OSCulator so Logic is better recognized in the list of targets as right now it is not trivial to tell.

                Bi-directional communication should be much easier with this, please come back to me if you have any question.


                Best Regards,
                Camille

                Comment


                • #9
                  So excited!! Thank you so much for working on this!

                  But - I can't seem to download the beta version from the site - the download page (http://www.osculator.net/downloadthanks.php) just immediately redirects to the release notes. No download starts. I even checked your code - there's only a redirect to the stable and to the legacy version.

                  From within Osculator, I did get the sparkle update notice, and it updated to 2.12RC, but only the app - the "Samples Library" folder was unchanged by that update - I assume that only comes with the downloaded disk image :-(

                  How can I get the latest beta "Samples Library" folder?

                  Comment


                  • #10
                    Hey Somatic,

                    The download link is the first thing in the post.
                    The beta is stored there to make sure people read the notes.


                    Best,
                    Cam

                    Comment


                    • #11
                      ::facepalm::

                      in my defense, the interstitial page that says "your download will begin shortly, if not, click here" was just a *little* confusing...

                      So I have the plugin installed, logic control surface setup is working great, and I see dozens of new controls in Osculator for all the logic control surface commands! This will obviously make integrating our own control-surface-style templates MUCH easier!

                      However, while I can see how you've made it possible for "control" commands from logic to Osculator, I'm not sure if this new plugin actually supports *MIDI* data output from logic. This is central to the original purpose I had in mind - where my TouchOSC template sent MIDI CC data to be recorded on a given track, and then to somehow "hear" that same MIDI CC data upon playback so that my OSC faders would visually update with the current MIDI CC values.

                      Is there something not mentioned in your documentation?

                      Comment


                      • #12
                        Could you describe what "data" you would like to map?
                        Is it a plugin parameter? I guess it would not be a problem to generate MIDI from a OSC message coming back from Logic.
                        Also, the plugin may need some adjustments to do what you need, if at all possible.
                        If you can explain what you have in mind, I will try to see how that could be done.

                        Comment


                        • #13
                          Plain MIDI data. Not a plugin parameter or Logic control. My osc template is setup to translate incoming OSC messages (from ipad, wiimote, etc) to MIDI CC and program change data. That part works great, and gives me a consistent method of controlling various software instruments and samplers (orchestral scoring in particular). I "play" my faders, buttons in realtime and they get recorded to the tracks in Logic as MIDI data.

                          The quest to get bi-directional communication from logic, for me, came from the difficulty of getting that same MIDI data I generated with my virtual faders *back out of logic* and to my iPad so that my faders actually respond to the current values (of MIDI CC and program change data) being played back. This way, the faders would be not just "dumb" inputs, but actively show the current value (and even animate in real-time).

                          A common example is CC#1 (modwheel), which is frequently used for dynamics changes. I use it to "conduct" a sampled instrument's dynamics levels, completely separate from the *mixer track* level. Osculator does a great job translating my OSC data to MIDI CC data and passing it along to Logic. But I need to route the same CC#1 data back out from Logic thru OSCulator and out to my iPad (running touchOSC).

                          The really big catch, however, is that the *only* data I want to be routed back to touchOSC is the currently selected and active track in Logic. This is similar behavior to the "Channel Strip" tab view in touchOSC's LogicPad layout - where the screen reflects only the currently selected track. My MIDI controller layout is designed to only control one instrument at a time, with all commands being automatically routed by logic (regardless of MIDI channel) to the currently selected track. Thus the returning MIDI data needs to reflect only one track as well.

                          Another example is with MIDI program changes. I would like to have a text field that displays the string value of the currently active program change - which can change over time throughout a song. I have a grid of buttons to send MIDI program changes, but I have no visual feedback to show me which program is current when I jump around in the song or simply play it through.

                          I really don't know if it's at all possible to tap into the actual MIDI events being played back on a given track with the plugin architecture you're using. You've done a great job accessing Logic's "track based automation", which handles mixer faders, pan, even insert sends. I'm just hoping you can go just a bit further and route the MIDI events too...

                          Comment


                          • #14
                            A simpler way of describing what I'm after:

                            - Osculator currently allows me to input OSC messages, translates them to MIDI event data (notes, CC, program), and passes them along to Logic for recording.
                            - I need to reverse this flow: listen for MIDI event data being played back in Logic and translate it to OSC messages, which can be passed along to touch OSC objects for visual feedback.

                            Comment


                            • #15
                              Thank you for the details.
                              Unfortunately the Logic plugin will not allow to do exactly this. It is designed to display Logic as a Control Surface that speaks OSC.

                              - Osculator currently allows me to input OSC messages, translates them to MIDI event data (notes, CC, program), and passes them along to Logic for recording.
                              ok, this is working for you, right?

                              - I need to reverse this flow: listen for MIDI event data being played back in Logic and translate it to OSC messages, which can be passed along to touch OSC objects for visual feedback.
                              Does Logic sends the MIDI data being played back?
                              If so, OSCulator should see it as a MIDI input, and therefore automatically create an OSC routing back to TouchOSC. This what happens when using Live. I am really sorry but again I am not exactly sure to undersand what you need.

                              Comment

                              Working...
                              X