Thursday, July 13, 2017

ex2C03. Midi All In

# ex2C03.py
# Midi All In

from moduleCsound import *

add(startSyn)

add(startOpt)
add("-+rtmidi=virtual -Ma -odac")
add(stopOpt)

add(startIns)

header(ksmps=32)

add("""
instr 1
kStatus, kChan, kData1, kData2 midiin

if kStatus != 0 then ;print if any new MIDI message has been received
    printk 0, kStatus
    printk 0, kChan
    printk 0, kData1
    printk 0, kData2
endif

endin
""")

tags(2)

add("i1 0 3600")

tags(3)

writeRun(__file__, False)

No comments:

Post a Comment

ex3A05. Audio Vector