Getting sync~ (run by phasor~) to send start


    Jun 15 2006 | 9:19 pm
    In trying to overcome the problems of midi sync timing on OSX, I've written a mini patch that receives the output from a phasor~ on another computer via SPDIF and converts that to midi sync. Naturally enough, I'm using sync~.
    phasor~ > dac~ > spdif > adc~ > sync~.
    The point of this, is that the first computer is pretty busy being a synth, and the midi beat clock it puts out is very unreliable (especially in front of audiences). The second computer is being a drum sequencer, and has plenty of time for generating midi notes and beat clock signals.
    It would be rather neat, if it only worked. But of course, I have no start/stop messages going into sync~, and so none coming out. The sequencing software is getting midi sync, and is champing at the bit, waiting for the starting pistol...
    I thought aboput using the other spdif channel to carry a signal of 0 or 1, and using edge~, which, however, only sends it output once per IO vector. If I understand it correctly.
    Any ideas ?

    • Jun 15 2006 | 10:06 pm
      I'll start again.
      You can't run a sync~ with a phasor~. Don't know why I thought you could.
      So the question would then be: Is there a way of producing reliable midi beat clock (that is, a succession of integer 248 messages)from an audio ramp signal that has been produced by a phasor~ or sync~ ?
    • Jun 16 2006 | 8:31 pm
      Midi? (just for start, stop and alike...)
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Jun 17 2006 | 10:01 am
      there use to be a patch in examples folder to create a midi clock from MSP. dunno if its still there since sync~ came along...
      anyway i remember it being something like:
      phasor~ (ramp time = 1 bar @ bpm)
      *~ 96 (24 tics per quarter note)
      pong~ 1 0. 1.
      change~
      ==~ -1.
      edge~
      int 248 (MIDI timestamp)
      the send start + stop message when needed.
      j
    • Jun 17 2006 | 11:06 am
      Quote: grimshaw@grimshaw.de wrote on Thu, 15 June 2006 16:06
      ----------------------------------------------------
      > I'll start again.
      >
      > You can't run a sync~ with a phasor~. Don't know why I thought you could.
      >
      > So the question would then be: Is there a way of producing reliable midi beat clock (that is, a succession of integer 248 messages)from an audio ramp signal that has been produced by a phasor~ or sync~ ?
      ----------------------------------------------------
      an audio signal itself aready has a "timecode" - its
      sampling rate.
      so connecting 2 computers via digital audio IOs alsready
      "syncs" them in a way.
      in another context (software2software communication)
      i have been making my own sync protocol by using a
      signal of 0, 1, 2, 3 ... where the numbers stand for
      bar, beat, event on, event off ...
      use sig~ or click~
      max v2;
    • Jun 20 2006 | 12:15 am
      The problem with this patch, in the original context at least, is that it relies on a metro, which under OSX is unreliable. It is this unreliability that prompted me to try audio signals as sync.
      My computer is under some strain, the timing of all midi stuff is extremely dodgy, but there's too much of it to bump it up into the high priority thread.
      The signal gets sent via spdif to a second computer, one that has a lot less to do. If it were to use only my software, then I would indeed already have my sync. But the man needs midi notes to be sent out to his sound thingy.It makes more sense to do the midi sync on his computer than mine.
      So what I'm looking for is the best way to turn an audio rate signal (pulse or whatever) into midi sync. Is there a better way than edge~ (or one of its relations) ?
    • Jun 20 2006 | 6:09 am
      Stuart,
      I don't know if this patch will help, but it does set an audio rate
      sync dependent on metronome settings fed to a phasor--but I imagine
      that's what your'e already doing. Is the problem how to supply the
      actual MIDI clocks--outputting system real time messages? Or would a
      seq object do the trick?
      Anyhow, this relies on edge~ for the final output.
      -- Paul
      --
      ----- |(*,+,#,=)(#,=,*,+)(=,#,+,*)(+,*,=,#)| -----
    • Jun 20 2006 | 8:51 am
      You could try Shigeto Wada's divider~ object which is
      at
      http://www.geocities.com/maxmsp/
      cheers
      Roger