Csound Csound-dev Csound-tekno Search About

[Csnd] Re: MIDI controllers

Date2008-04-05 14:34
Fromvictor
Subject[Csnd] Re: MIDI controllers
-+rtmidi=virtual is the FLTK keyboard, you don't want that. Just run
the cSD without it. Csound will then use portmidi. Hopefully there are
no midi issues with 10.5 (binaries are for 10.4).
 
Victor
 
----- Original Message -----
From: Diego Saá
Sent: Saturday, April 05, 2008 9:20 AM
Subject: [Csnd] MIDI controllers

Hello, I just bought a M-audio keystation pro 88 MIDI controller keyboard which is connected via USB to my computer. I'm using MAC OS X version 10.5.2
I want to control Csound with this keyboard, so as a first test, I pasted the midiin.csd code provided in Csound's documentation. I ran it, but no messages are registered in the console when I turn the knobs or play the keyboard. Any help would be very appreciated.

This is the midiin.csd example code... Also, the virtual keyboard does not appear when I run this csd.

<CsoundSynthesizer>
<CsOptions>
-odac           -iadc     -d     -+rtmidi=virtual    -M0 
</CsOptions>
<CsInstruments>

sr        =  44100
ksmps     =  10
nchnls    =  1

      massign         0, 130  ; make sure that all channels
      pgmassign       0, 130  ; and programs are assigned to test instr


  instr   130

knotelength    init    0
knoteontime    init    0

kstatus, kchan, kdata1, kdata2                  midiin

if (kstatus == 128) then
knoteofftime    times
knotelength    =    knoteofftime - knoteontime
printks "kstatus= %d, kchan = %d, \\tnote#  = %d, velocity = %d \\tNote OFF\\t%f %f\\n", 0, kstatus, kchan, kdata1,kdata2, knoteofftime, knotelength

elseif (kstatus == 144) then
knoteontime    times
printks "kstatus= %d, kchan = %d, \\tnote#  = %d, velocity = %d \\tNote ON\\t%f\\n", 0, kstatus, kchan, kdata1, kdata2, knoteontime


elseif (kstatus == 160) then
printks "kstatus= %d, kchan = %d, \\tkdata1 = %d, kdata2 = %d \\tPolyphonic Aftertouch\\n", 0, kstatus, kchan, kdata1, kdata2

elseif (kstatus == 176) then
printks "kstatus= %d, kchan = %d, \\t CC = %d, value = %d \\tControl Change\\n", 0, kstatus, kchan, kdata1, kdata2

elseif (kstatus == 192) then
printks "kstatus= %d, kchan = %d, \\tkdata1 = %d, kdata2 = %d \\tProgram Change\\n", 0, kstatus, kchan, kdata1, kdata2

elseif (kstatus == 208) then
printks  "kstatus= %d, kchan = %d, \\tkdata1 = %d, kdata2 = %d \\tChannel Aftertouch\\n", 0, kstatus, kchan, kdata1, kdata2

elseif (kstatus == 224) then
printks "kstatus= %d, kchan = %d, \\t ( data1 , kdata2 ) = ( %d, %d )\\tPitch Bend\\n", 0, kstatus, kchan, kdata1, kdata2

endif

  endin

</CsInstruments>
<CsScore>
i130 0 3600
e
</CsScore>
</CsoundSynthesizer>
</CsScore>


Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN Spaces Hier klicken!

Date2008-04-05 16:49
From"Andres Cabrera"
Subject[Csnd] Re: Re: MIDI controllers
AttachmentsNone