Can mxj watch a patcher for arbitrary events?


    Nov 29 2006 | 1:49 am
    Hello all,
    I'm trying to write an mxj kinda-alternative to autopattr and company. I want to interface max UI stuff with JMSL (algomusic.com) to record presets and play back my actions.
    I REALLY want to do this without wires. I can easily send messages to arbitrary MaxBoxes, but I can't seem to figure out how to make java respond when I click (for instance) a bangbutton that isn't wired to the mxj.
    Any ideas? I tried implementing MessageReceiver but it seems that it only receives events from AudioBuffer.
    best,
    Kevin

    • Dec 02 2006 | 6:02 pm
      No ideas? Topher (I think you're the most qualified!)?
      -kevin
    • Dec 06 2006 | 8:38 pm
      Hi Kevin,
      >From within some Java code I can't think of any way to get at the
      message (register a callback, or something like that) that a lonely,
      unconnected bang button sends out.
      Sorry,
      Ben
      On 11/28/06, Kevin Cox wrote:
      >
      > Hello all,
      >
      > I'm trying to write an mxj kinda-alternative to autopattr and company. I want to interface max UI stuff with JMSL (algomusic.com) to record presets and play back my actions.
      >
      > I REALLY want to do this without wires. I can easily send messages to arbitrary MaxBoxes, but I can't seem to figure out how to make java respond when I click (for instance) a bangbutton that isn't wired to the mxj.
      >
      > Any ideas? I tried implementing MessageReceiver but it seems that it only receives events from AudioBuffer.
      >
      > best,
      > Kevin
      >
    • Jan 13 2007 | 12:26 pm
      Quote: Kevin Cox wrote on Wed, 29 November 2006 02:49
      ----------------------------------------------------
      > Hello all,
      >
      > I'm trying to write an mxj kinda-alternative to autopattr and company. I want to interface max UI stuff with JMSL (algomusic.com) to record presets and play back my actions.
      >
      > I REALLY want to do this without wires. I can easily send messages to arbitrary MaxBoxes, but I can't seem to figure out how to make java respond when I click (for instance) a bangbutton that isn't wired to the mxj.
      >
      > Any ideas? I tried implementing MessageReceiver but it seems that it only receives events from AudioBuffer.
      >
      > best,
      > Kevin
      ----------------------------------------------------
      I have the same problem in javascript. The way I do this now is to put a pattr outside the js (in your case mxj) object, reserve a special inlet for it, bind it to the pattr where your input enters the patch. You know about the existence of pattrmarker? That one makes this more easy to bind to a remote place.
      Oh and make sure you have the latest incremental download of pattr. The default one doesn't update if its bound counterpart updates.
      Hth,
      Mattijs
    • Jan 13 2007 | 2:08 pm
      (wow, email notification is great! would've definitely missed this...)
      Thanks for the info, Mattijs! I'm not completely sure of what you mean, and I don't have time to mess around in Max (on holiday skiing - opened the computer to check the online ski report).
      do you mean
      [pattr]
      |
      [mxj or js MyThing]
      within a patcher?
      Could you maybe paste an example?
      thanks VERY much - this was great timing, by the way - I'm about to have a lot more time to Max.
    • Jan 13 2007 | 2:31 pm
      Oh.
      I thought about this a bit more. The pattr wouldn't be wired to the mxj/js.
      I don't know about pattrmarker. I feel like I've heard of it but I just did a quick search and didn't turn up anything obvious.
      time to suit up!
    • Jan 13 2007 | 4:32 pm
      Quote: Kevin Cox wrote on Sat, 13 January 2007 15:08
      ----------------------------------------------------
      > (wow, email notification is great! would've definitely missed this...)
      >
      > Thanks for the info, Mattijs! I'm not completely sure of what you mean, and I don't have time to mess around in Max (on holiday skiing - opened the computer to check the online ski report).
      >
      > do you mean
      >
      > [pattr]
      > |
      > [mxj or js MyThing]
      >
      > within a patcher?
      That's right.
      >
      > Could you maybe paste an example?
      Sure. I attached it.
      Mattijs
    • Jan 16 2007 | 12:43 am
      Is it possible to use either Java or JavaScript to copy a string from
      Max to the clipboard (Mac OS X and Windows XP)?
      Georg
    • Jan 16 2007 | 1:23 am
      Hi Georg,
      You can do it with Java:
      --
      Owen
      Georg Hajdu wrote:
      > Is it possible to use either Java or JavaScript to copy a string from
      > Max to the clipboard (Mac OS X and Windows XP)?
      >
      > Georg
      >
    • Jan 16 2007 | 7:35 am
      Hi Owen,
      Thank you for the hint.
      Georg
      On Jan 16, 2007, at 2:23 AM, Owen Green wrote:
      > Hi Georg,
      >
      > You can do it with Java:
      > http://www.javapractices.com/Topic82.cjp
      >
      > --
      > Owen
      >
      > Georg Hajdu wrote:
      >> Is it possible to use either Java or JavaScript to copy a string
      >> from Max to the clipboard (Mac OS X and Windows XP)?
      >> Georg
      >
    • Jan 16 2007 | 5:17 pm
      Hi Owen,
      Do you have an idea how to implement this code in mxj? I failed
      miserably, which is probably due to the fact that I'm far from being
      a Java, let alone MaxJava expert.
      Thank you,
      Georg
      On Jan 16, 2007, at 2:23 AM, Owen Green wrote:
      > Hi Georg,
      >
      > You can do it with Java:
      > http://www.javapractices.com/Topic82.cjp
      >
      > --
      > Owen
      >
      > Georg Hajdu wrote:
      >> Is it possible to use either Java or JavaScript to copy a string
      >> from Max to the clipboard (Mac OS X and Windows XP)?
      >> Georg
      >
    • Jan 16 2007 | 7:46 pm
      this should be close if you just want to copy To the system clipboard.
      topher
      import java.awt.datatransfer.Clipboard;
      import java.awt.datatransfer.ClipboardOwner;
      import java.awt.datatransfer.Transferable;
      import java.awt.datatransfer.StringSelection;
      import java.awt.Toolkit;
      import java.io.*;
      public class toclipboard extends MaxObject implements ClipboardOwner
      {
      public void setClipboardContents( String aString ){
      StringSelection stringSelection = new StringSelection( aString );
      Clipboard clipboard = Toolkit.getDefaultToolkit
      ().getSystemClipboard();
      clipboard.setContents( stringSelection, this );
      }
      /**
      * Empty implementation of the ClipboardOwner interface.
      */
      public void lostOwnership( Clipboard aClipboard, Transferable
      aContents) {
      //do nothing
      }
      }
      On Jan 16, 2007, at 09:17 AM, Georg Hajdu wrote:
      > Hi Owen,
      >
      > Do you have an idea how to implement this code in mxj? I failed
      > miserably, which is probably due to the fact that I'm far from
      > being a Java, let alone MaxJava expert.
      >
      > Thank you,
      >
      > Georg
      >
      > On Jan 16, 2007, at 2:23 AM, Owen Green wrote:
      >
      >> Hi Georg,
      >>
      >> You can do it with Java:
      >> http://www.javapractices.com/Topic82.cjp
      >>
      >> --
      >> Owen
      >>
      >> Georg Hajdu wrote:
      >>> Is it possible to use either Java or JavaScript to copy a string
      >>> from Max to the clipboard (Mac OS X and Windows XP)?
      >>> Georg
      >>
      >
    • Jan 16 2007 | 8:17 pm
      On 16 janv. 07, at 18:17, Georg Hajdu wrote:
      > Hi Owen,
      >
      > Do you have an idea how to implement this code in mxj? I failed
      > miserably, which is probably due to the fact that I'm far from
      > being a Java, let alone MaxJava expert.
      This is quickly made, but should give you enough information to start
      with.
      Best,
      ej
    • Jan 16 2007 | 9:37 pm
      Aww, I just made one and in the meantime Topher and Emmanuel beat me to it!
      Anyway, just for completeness; put the attached jar file somewhere
      useful and hack the source to your heart's content.
      Georg Hajdu wrote:
      > Do you have an idea how to implement this code in mxj? I failed
      > miserably, which is probably due to the fact that I'm far from being a
      > Java, let alone MaxJava expert.
    • Jan 17 2007 | 12:01 am
      Thanks Topher,
      Your solution works like a charm! Finally, I get to put my Max chat
      stuff on the clipboard.
      What about inclusion in Max v5?
      Best,
      Georg
      On Jan 16, 2007, at 8:46 PM, topher lafata wrote:
      > this should be close if you just want to copy To the system clipboard.
      > topher
      >
      >
      > import java.awt.datatransfer.Clipboard;
      > import java.awt.datatransfer.ClipboardOwner;
      > import java.awt.datatransfer.Transferable;
      > import java.awt.datatransfer.StringSelection;
      > import java.awt.Toolkit;
      > import java.io.*;
      >
      > public class toclipboard extends MaxObject implements ClipboardOwner
      > {
      >
      > public void setClipboardContents( String aString ){
      > StringSelection stringSelection = new StringSelection( aString );
      > Clipboard clipboard = Toolkit.getDefaultToolkit
      > ().getSystemClipboard();
      > clipboard.setContents( stringSelection, this );
      > }
      >
      > /**
      > * Empty implementation of the ClipboardOwner interface.
      > */
      > public void lostOwnership( Clipboard aClipboard, Transferable
      > aContents) {
      > //do nothing
      > }
      > }
      >
      > On Jan 16, 2007, at 09:17 AM, Georg Hajdu wrote:
      >
      >> Hi Owen,
      >>
      >> Do you have an idea how to implement this code in mxj? I failed
      >> miserably, which is probably due to the fact that I'm far from
      >> being a Java, let alone MaxJava expert.
      >>
      >> Thank you,
      >>
      >> Georg
      >>
      >> On Jan 16, 2007, at 2:23 AM, Owen Green wrote:
      >>
      >>> Hi Georg,
      >>>
      >>> You can do it with Java:
      >>> http://www.javapractices.com/Topic82.cjp
      >>>
      >>> --
      >>> Owen
      >>>
      >>> Georg Hajdu wrote:
      >>>> Is it possible to use either Java or JavaScript to copy a string
      >>>> from Max to the clipboard (Mac OS X and Windows XP)?
      >>>> Georg
      >>>
      >>
      >
    • Jan 17 2007 | 6:18 am
      Hi Emmanuel
      Thank you. For some reason, your solution won't instantiate on my
      computer.
      Best,
      Georg
      On Jan 16, 2007, at 9:17 PM, Emmanuel Jourdan wrote:
      > On 16 janv. 07, at 18:17, Georg Hajdu wrote:
      >
      >> Hi Owen,
      >>
      >> Do you have an idea how to implement this code in mxj? I failed
      >> miserably, which is probably due to the fact that I'm far from
      >> being a Java, let alone MaxJava expert.
      >
      > This is quickly made, but should give you enough information to
      > start with.
      >
      > Best,
      > ej
      >
      >
      >
    • Jan 17 2007 | 6:26 am
      Thanks to you too! It works.
      Regards,
      Georg
      On Jan 16, 2007, at 10:37 PM, Owen Green wrote:
      >
    • Jan 17 2007 | 7:47 am
    • Jan 17 2007 | 6:32 pm
    • Mar 15 2012 | 3:24 pm
      hello to all.
      anybody know where i can get the jar file mentioned here? ...seems to have been removed from this decrepit thread.
      much thanks.