LogicControl and Max/MSP initialization


    Feb 27 2007 | 2:37 pm
    Greetings to all.....
    Firstly - to save people's time... If you don't have a Logic Control (or Mackie Control) I don't think you will be able to help me here as the patch relies on such a unit to be connected to really do anything - but read on if it intrigues you..
    OK, to those who haven't now moved on to the next new forum post..........
    I wonder if someone can gelp me here, I have scoured the forum, and internet for information/solutions but drawn a complete blank. What am I trying to do? Connect to a Lofic Control/XT from within Max/MSP using the Logic Control Midi Implementation Guide from the Logic7.2.1 CS Support Manual (Appendix B, pp 239-242). I haven't included an excerpt from it as that quite probably infringes the copyright of the pdf, so here is the link to download it if you think you can possibly help. http://www.apple.com/support/logic/ on the right hand side 'control surfaces info'.
    Below is a patch which; A - Sends a 'Device Query' sysex string to Logic Control. B - Receives a 'Host Connection Query' in reply from Logic Control. C - Deconstructs the Host Connection Query sysex string, works out the response code from the challenge code contained in the last 4 bytes of the string. D - Recompiles a 'Host Conection Response' sysex string which is then sent out to Logic Control (within 300ms of Logic Control sending the 'Host Connection Query ' string. From this Response, I would expect to receive back from the Logic Control either a 'Host Connection Confirmation' or 'Host Connection Error' sysex string in reply, but although the Response is definitely sending to the Logic Control I receive no response at all. It is possible that my expression are incorrectly implemented, but I would still expect a 'Host Connection Error' reply even if no Response was sent. If anyone has any idea whatsever as to what I might be doing wrong here, I would be so grateful to hear from you. a workaround I have for now is to leave LogicPro running in the bacjground with the Logic Control connected, but all the controller assignments deleted.....a bit messy, although Logic seems to use virtually no cpu when audio is disabled, so not the end of the world, but it would be nice not to have to rely upon LogicPro running as well as Max/MSP. Thanks for your time in reading this - I do tend to prefer working things out for myself rather than firing questions here all the time but this one really has me stumped! regards leigh
    .and the patch

    • Feb 27 2007 | 4:11 pm
      Hello Leigh,
      I made some MXJ code (which you are welcome to) for talking to my MCU some time ago, based on the logic spec, so I can confirm that it's at least possible. Unfortunately my unit's been in storage for the last year due to being spatially condensed, so finishing it off hasn't happened, and testing your patch isn't possible.
      However, looking at your patch, I noticed that the bracketing in the [expr]s wasn't exactly as in the spec, in that you'd missed some out. I never remember about operator precedence, but there's every chance that it will mess with things. Corrected version pasted below.
      The patch as it stands seems a bit arcane to me (although you may find the Java approach equally so!) - it relies very heavily on ordering, having the same byte going to different inlets of different exprs makes debugging them difficult, and so forth. Not that I've tried it, but wouldn't it be easier to use zl.group to make a list out of the message, and then some triggers to guarantee well ordered computation and dispatch of the result? Worth a try perhaps.
      My MCU is currently next to me in its box. If I discover a clear horizontal surface ever again, I'll have it set up and hopefully be able to offer you more informed help.
      OTOH, I think, spec-wise, my MXJ implementation was pretty much complete (this could be rose-tinted memory though - I know it definitely worked, at least), and what was left was making a sensible max interface for it, a la the motormix objects. If you're interested, not knowing how much time you've sunk into it so far, we could finish it off together.
      Oh, and thanks also for posting the link to the spec - I'd lost my copy, somehow, and someone was asking about it just the other day.
      Anyway, see if the added brackets help:
      Leigh Hunt wrote: > Greetings to all..... > > Firstly - to save people's time... If you don't have a Logic Control > (or Mackie Control) I don't think you will be able to help me here > as the patch relies on such a unit to be connected to really do > anything - but read on if it intrigues you.. > > OK, to those who haven't now moved on to the next new forum > post.......... > > I wonder if someone can gelp me here, I have scoured the forum, and > internet for information/solutions but drawn a complete blank. What > am I trying to do? Connect to a Lofic Control/XT from within Max/MSP > using the Logic Control Midi Implementation Guide from the Logic7.2.1 > CS Support Manual (Appendix B, pp 239-242). I haven't included an > excerpt from it as that quite probably infringes the copyright of the > pdf, so here is the link to download it if you think you can possibly > help. http://www.apple.com/support/logic/ on the right hand side > 'control surfaces info'. > > Below is a patch which; A - Sends a 'Device Query' sysex string to > Logic Control. B - Receives a 'Host Connection Query' in reply from > Logic Control. C - Deconstructs the Host Connection Query sysex > string, works out the response code from the challenge code contained > in the last 4 bytes of the string. D - Recompiles a 'Host Conection > Response' sysex string which is then sent out to Logic Control > (within 300ms of Logic Control sending the 'Host Connection Query ' > string. >> From this Response, I would expect to receive back from the Logic >> Control either a 'Host Connection Confirmation' or 'Host >> Connection Error' sysex string in reply, but although the Response >> is definitely sending to the Logic Control I receive no response at >> all. > It is possible that my expression are incorrectly implemented, but I > would still expect a 'Host Connection Error' reply even if no > Response was sent. If anyone has any idea whatsever as to what I > might be doing wrong here, I would be so grateful to hear from you. a > workaround I have for now is to leave LogicPro running in the > bacjground with the Logic Control connected, but all the controller > assignments deleted.....a bit messy, although Logic seems to use > virtually no cpu when audio is disabled, so not the end of the world, > but it would be nice not to have to rely upon LogicPro running as > well as Max/MSP. Thanks for your time in reading this - I do tend to > prefer working things out for myself rather than firing questions > here all the time but this one really has me stumped! regards leigh > > .and the patch >
    • Feb 27 2007 | 5:30 pm
      At 2:37 PM +0000 2/27/07, Leigh Hunt wrote: >What am I trying to do? >Connect to a Lofic Control/XT from within Max/MSP using the Logic Control Midi Implementation Guide from the Logic7.2.1 CS Support Manual (Appendix B, pp 239-242).
      I created a patch called MaxieControl that allows the use of a Mackie Control from within Max.
      You might be able to look at it and either cobble bits from it, or at least figure out where you went wrong. I remember the "Secret Handshake" part of the protocol to be problematic. Look at my RouteSysex patcher to see how I did this.
      It's available at http://www.xfade.com/max
      -C
      -- Chris Muir | "There are many futures and only one status quo. cbm@well.com | This is why conservatives mostly agree, http://www.xfade.com | and radicals always argue." - Brian Eno
    • Feb 27 2007 | 5:39 pm
      Quote: owen wrote on Tue, 27 February 2007 16:11 Hi Owen
      > However, looking at your patch, I noticed that the bracketing in the > [expr]s wasn't exactly as in the spec, in that you'd missed some out. I > never remember about operator precedence, but there's every chance that > it will mess with things. Corrected version pasted below.
      You little star Sir - the patch, and Host Connection with LC and XT are now working wonderfully!!!!!!!! You really have made my day/week/month! If you are ever in Nottingham, do let me buy you a coffee/beer!
      > > The patch as it stands seems a bit arcane to me (although you may find > the Java approach equally so!) - it relies very heavily on ordering, > having the same byte going to different inlets of different exprs makes > debugging them difficult, and so forth. Not that I've tried it, but > wouldn't it be easier to use zl.group to make a list out of the message, > and then some triggers to guarantee well ordered computation and > dispatch of the result? Worth a try perhaps.
      It is a tad messy isn't it? Java approach for me is another learning curve I think (I hope) I can live without for my needs, but now I have the patch working I shall clean it up a bit. Thanks for the heads up on zl.group....I shall check it out shortly.
      > OTOH, I think, spec-wise, my MXJ implementation was pretty much complete > (this could be rose-tinted memory though - I know it definitely worked, > at least), and what was left was making a sensible max interface for it, > a la the motormix objects. If you're interested, not knowing how much > time you've sunk into it so far, we could finish it off together.
      Do you think your MXJ implementation would be so advantageous for others as opposed to a cleaned up patch version? I really haven't read anything about Java. Does the implementation you envisage include binding to objects/parameters and driving the control surface, or just the connecting procedure? I already have a patch driven setup reading colls to bind to objects/pass data to LCDs and encoders etc (Admittedly, the patch is rather spaghettied, and to a point still relying on position of objects for order, but it is very stable so far - something else I'm now going to clean up ? I think so!- hey - it was only today I got round to adding triggers to the orignal patch I posted!). Let me know what you think..you can email at 'myuseridhere' at mac dot com if you like.
      > Oh, and thanks also for posting the link to the spec - I'd lost my copy, > somehow, and someone was asking about it just the other day.
      No worries
      Thanks again dude Regards Leigh
    • Feb 27 2007 | 6:55 pm
      Leigh Hunt wrote: > You little star Sir - the patch, and Host Connection with LC and XT > are now working wonderfully!!!!!!!! You really have made my > day/week/month! If you are ever in Nottingham, do let me buy you a > coffee/beer!
      Happy to be helpful matey! I'll take you up on the beer though ;-)
      > Do you think your MXJ implementation would be so advantageous for > others as opposed to a cleaned up patch version?
      Not especially, it was done that way because it was, for me, easier :) It only has completeness (of protocol) and elegance going for it at the moment. What it doesn't have is any state management or persistence.
      -- O
    • Feb 27 2007 | 8:35 pm
      Hi Chris,
      Nice interface, I'll certainly take a look at your implementation. As you see from my crossing post, Owen spotted my expression errors, and now all works great. You certainly have done a comprehensive job on the initialization and preference options. I hadn't thought of using lbuild, though I have used a few lobjects in other areas of my (big) patch. I am beginning to think that I do rather alot more 'order by placement' programming than 'order by trigger order' than your average maxer, but it kind of works for my goals....for now! Thanks for sharing and taking the time to respond.
      Regards Leigh