metro
Prev | Orchestra Opcodes and Operators | Next

## metro

metro — Trigger Metronome

## Description

Generate a metronomic signal to be used in any circumstance an isochronous trigger is needed.

## Syntax

    ktrig  metro  kfreq [, initphase]

## Initialization

initphase - initial phase value (in the 0 to 1 range)

## Performance

ktrig - output trigger signal

kfreq - frequency of trigger bangs in cps

metro is a simple opcode that outputs a sequence of isochronous bangs (that is 1 values) each 1/kfreq seconds. Trigger signals can be used in any circumstance, mainly to temporize realtime algorithmic compositional structures.

## Examples

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

Example 220. Example of the metro opcode.

    <CsoundSynthesizer>
    <CsOptions>
    -odac -B441 -b441
    </CsOptions>
    <CsInstruments>

    sr     =        44100
    kr     =        100
    ksmps  =        441
    nchnls =        2

           instr    1
    ktrig metro 0.2
    printk2 ktrig
    	endin

    </CsInstruments>
    <CsScore>
    i 1 0 20

    </CsScore>
    </CsoundSynthesizer>

## Credits

Written by Gabriel Maldonado.

Example written by Andres Cabrera.

New in Csound 5 (Previously available only on CsoundAV)

Prev | Up | Next
mdelay | Home | midic14