| victor wrote:
> No, just lazy and wanting to know how to do it without having to
> experiment. So how do you do this, please?
As you know, Csound makes its own MIDI connections, so if you want to
drive it from a sequencer you'll use aconnect to hook the sequencer to
the input port designated by the -M option (see below).
Here's an old and simple CSD for MIDI input. In this example I use an
external MIDI keyboard (connected to Live's hardware MIDI In port) to
play the synthesizer :
;;; Set -M to some ridiculous value to see a list of available numbered
MIDI input devices.
;;; At -M100 my system reports that these devices exist for use with
that option:
; The available MIDI in devices are:
; 0: EMU10K1 MPU-401 (UART) (ALSA)
; 1: VirMIDI 1-0 (ALSA)
; 2: VirMIDI 1-1 (ALSA)
; 3: VirMIDI 1-2 (ALSA)
; 4: VirMIDI 1-3 (ALSA)
;;; In the following instance I've selected the external MIDI port on my
SBLive
;;; for MIDI input and the default audio output device:
-+rtmidi=pm -M0 -o dac -d -m0
instr 1
iamp ampmidi 5000
kfreq cpsmidib
kmod midictrl 1,0,10 ; Mod wheel controls vibrato depth and rate.
irate veloc 1,10 ; This idea shamelessly stolen from J.
Bohn's Csound tutorial
kvib oscil kmod, irate, 1 ; at
http://www.bohnmedia.com/jbohn/csound/index.html.
a1 oscili iamp,kfreq+kvib,2
a2 oscili iamp,(kfreq*1.003)+kvib,3
a3 oscili iamp,(kfreq*.997)+kvib,4
asig = a1+a2+a3
kenv linenr 1,.07,.11,.01
out asig*kenv
endin
; ==============================================
f1 0 8192 10 .1 0 .2 0 0 .4 0 0 0 0 .8
f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .4
f3 0 8192 10 .5 0 .6 0 0 .3 0 0 0 .9
f4 0 8192 10 .9 0 .3 0 0 .6 0 0 0 .5
f0 10000
e
Victor, let me know if this example works for you or if I've
misunderstood your question. :)
Best,
dp
|