Skip to content

mclock

Sends a MIDI CLOCK message.

Syntax

mclock ifreq

Initialization

ifreq -- clock message frequency rate in Hz

Performance

Sends a MIDI CLOCK message (0xF8) every 1/ifreq seconds. So ifreq is the frequency rate of CLOCK message in Hz.

Examples

Here is an example of the mclock opcode. It uses the file mclock.csd.

Example of the mclock opcode.
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-Q0   ;;;midi out
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1 ;let csound synchronize a sequencer

mclock 24

endin

</CsInstruments>
<CsScore>

i 1 0 30
e
</CsScore>
</CsoundSynthesizer>

See Also

mrtmsg

System Realtime Messages

Credits

Author: Gabriel Maldonado
Italy

New in Csound version 3.47