sync~ outputs a 0-1 ramp, like phasor~. The frequency of the ramp can be specified in beats per minute (BPM), or by sending sync~ a tempo reference via tap tempo, MIDI beat clock, or an audio signal containing a 'click track.' Also, sync~ generates MIDI beat clock to synchronize external devices.
Common Box Attributes
A sequence of bang messages is used to set the tap tempo. A bang message is interpreted as one tap. If the sync~ object receives three taps in a row with reasonably consistent timing, it changes the tempo to match them.
MIDI beat clock. Integer input is interpreted as MIDI data - you can directly connect the output of an rtin object. sync~ responds to MIDI beat clock start/stop (int 250 and 252), and tick (248). All other values are ignored.
Sets the BPM for the clock.
The word bpm, followed by a number, sets the rate of the current output ramp to a frequency corresponding to the specified beats/minute.
The word offset, followed by a floating point number in the range 0.-1.0, adjusts the MIDI output "phase" of the current output ramp.
The word offset, followed by a floating point number in the range 0.-1.0, adjusts the "phase" of the current output ramp.
The word ppq (parts per quarter), followed by a number, specifies the number of ticks output for each quarter note. By default, MIDI beat clock specifies a PPQ of 24. The ppq message is useful mainly for doubling or halving the tempo for an external device that is set to a different time signature. The ramp signal generated by the sync~ object can be scaled for output further by using the rate~ object.
The sync~ object will set its tempo to match an audio click track input. The click track should contain amplitude peaks at quarter-note intervals of the desired tempo. Signal input will affect the tempo only if sync~ detects peak values greater than 0.1 and within the tempo range of approximately 30-240 BPM.
The word start causes the current output ramp to halt, and resets the ramp to 0. The start message has the same effect as receiving the MIDI beat clock start value (250). When the start message is received, sync~ outputs the number 250 from the MIDI beat clock output so that any external devices will also start.
The word stop causes the current output ramp to halt, and to remain stationary until a start message is received. It is equivalent to sending the MIDI beat clock stop value (252). When the stop message is received, the sync~ object sends the number 252 from its MIDI beat clock output. The sync~ object does not send MIDI beat clock ticks while it is stopped.
Out middle outlet: Whenever the tempo changes, sync~ outputs the message bpm, followed by a float value that specifies the new tempo.
Out middle outlet: When the sync~ object receives an audio click, it sends a click message out the middle outlet.
Out right outlet: sync~ generates a MIDI beat clock stream that matches its output ramp. Typically, when needed, this outlet is connected directly to a midiout object.
Out middle outlet: When the sync~ object receives a MIDI beat clock tick, it sends a midi message out the middle outlet.
Left outlet: Like the phasor~-object, the sync~ object generates a sawtooth waveform that increases from 0 to 1 for each quarter note of the current tempo. This ramp can be scaled as necessary with the rate~ object, for use with wave~ and other objects.
Out middle outlet: When the sync~ object receives a tap, it sends a tap message out the middle outlet.