Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: ignorance about MIDI

Date2009-07-22 16:01
From"Art Hunkins"
Subject[Csnd] Re: Re: ignorance about MIDI
I forget why, but for me (as for Mark), ctrl7 works - while midic7 doesn't.
 
Art Hunkins
----- Original Message -----
Sent: Wednesday, July 22, 2009 7:53 AM
Subject: [Csnd] Re: ignorance about MIDI


   I looked at your code and found a version that does not crash.  Changing your instrument to this will help:

instr 1
imax=1.0
imin=0.0
ichan = 1
ictlno=81
kamp ctrl7 ichan,ictlno, imin, imax
a1 oscil kamp,440,1
outs a1,a1

endin


    I changed the 'midic7' to 'crtl7' and then changed the kmax and kmin to imax and imin.  'Ctrl7' also requires the additional channel argument which may or may not be 1, depending on what channel you are using to send data from your beringer midi controller.  I hope this works for you, let me know. 

                                           Mark

 


From: ze luis <ze_luis2010@yahoo.com>
To: csoundlist <csound@lists.bath.ac.uk>
Sent: Wednesday, July 22, 2009 3:33:57 AM
Subject: [Csnd] ignorance about MIDI

Hello everyone.
I'm trying to use a behringer midi controller to control the amplitude of Csound (using QuteCsound frontend)
reading the online manual i believed the programming below should do. but it crashes csound.

and i really don't understand why kmin and kmax are floating points, shouldn't be 0-127? (and then I would have to convert them to amplitude, somehow... (ampmidi?))

thanks in advance!

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2


instr 1
kmax=1.0
kmin=0.0
ictlno=81
kamp midic7 ictlno, kmin, kmax
a1 oscil kamp,440,1
outs a1,a1

endin

</CsInstruments>
<CsScore>
f 1 0 4096 10 1
i1 0 20

e
</CsScore>
</CsoundSynthesizer>