vstmidiout
Prev | Orchestra Opcodes and Operators | Next

## vstmidiout

vstmidiout — Sends MIDI information to a VST plugin.

## Syntax

    vstmidiout instance, kstatus, kchan, kdata1, kdata2

## Description

vstmidiout is used for sending MIDI information to a VST plugin.

## Initialization

instance - the number which identifies the plugin, to be passed to other vst4cs opcodes.

## Performance

kstatus - the type of midi message to be sent. Currently noteon (144), note off (128), Control Change (176), Program change (192), Aftertouch (208) and Pitch Bend (224) are supported.

kchan - the MIDI channel transmitted on.

kdata1, kdata2 - the MIDI data pair, which varies depending on kstatus. e.g. note/velocity for note on and note off, Controller number/value for control change.

## Examples

Example 1029. Example for vstmidiout

    /* orc */
    sr     = 44100
    kr     = 4410
    ksmps  = 10
    nchnls = 2

    gihandle1 vstinit "c:/vstplugins/cheeze/cheeze machine.dll", 1

    instr 3
    ain1      =           0
    ab1, ab2  vstaudio    gihandle1, ain1, ain1
              outs        ab1, ab2
    endin

    instr 4
              vstmidiout  gihandle1, 144, 1, p4, p5
    endin

    /* sco */
    i 3 0 21

    i 4  1 1 57  32
    i 4  3 1 60 100
    i 4  5 1 62 100
    i 4  7 1 64 100
    i 4  9 1 65 100
    i 4 11 1 67 100
    i 4 13 1 69 100
    i 4 15 3 71 100
    i 4 18 3 72 100
    e

## Credits

By: Andrés Cabrera and Michael Gogins

Uses code from Hermann Seib's VSTHost and Thomas Grill's vst~ object.

VST is a trademark of Steinberg Media Technologies GmbH. VST Plug-In Technology by Steinberg.

Prev | Up | Next
vstinfo | Home | vstnote