« Return to Thread: [csnd] Windcontroller Portamento with cpsmidib opcode

Re: Re: [csnd] Windcontroller Portamento with cpsmidib opcode

by jinku kim :: Rate this Message:

Reply to Author | View in Thread

Hello Tim

Thank you for your comment.

I am very interested in your works about WX-7 and other.

Tie-opcode and 'Legato & portamento handlings' will be useful for me.

It is my csd file which I came up with just before.(It was a simple way. Still have a minor problem -less effective than pitchbend. I don't know why.-)
 
Your recommendations will make it better.

Thank you so much.

Have a great days~

<CsoundSynthesizer>
<CsOptions>
-odac           -iadc     -d 
</CsOptions>
<CsInstruments>

sr       =  44100
ksmps    =  32
nchnls   =  2
0dbfs    =  1

giseed = .5
garev init 0
gicps init 440



gitable1 ftgen 1, 0, 4096, 10, 1
gitable2 ftgen 3, 0, 4097, -10, 2661, 87, 33, 18
gitable3 ftgen 4, 0, 4097, -10, 174, 12,
gitable4 ftgen 5, 0, 4097, -10, 314, 13,
gitable5 ftgen 6, 0, 16, -2, 40, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 10240


ctrlinit 1, 2, 0
ctrlinit 1, 1, 0

instr 1       ;This is based on Flute1.csd from Dr. Boulanger's csound library.
                   I modified it for Midi_Windcontoroller and Wiimote.
knoise chnget "noise"
kvib chnget "vibrato"
kport chnget "port"
kfilt chnget "filt"
kfilt2 chnget "filt2"
iportim chnget "portamento"


icpsb init gicps
icps cpsmidi

gicps = icps

kpitch midictrl 1, 0, 100
kport linseg icpsb, iportim, gicps
kport = kport - kpitch

kbreath midictrl 2, 0, 1
gkbreath = kbreath


kbreath port kbreath, 0.02
kbreath linenr kbreath, 0.02, 0.05, 0.1


kvibdepth = abs(kvib*kport/100.)
kvibdepth randi kvibdepth*.1, 1000,giseed
giseed  =       frac(giseed*105.947)
kport    =  kport + kvibdepth


iphase  = giseed

knfrq   =  kport

tigoto


kampr1  randi   .02*kbreath, 10, giseed                 
giseed  =       frac(giseed*105.947)
kamp1   =       kbreath + kampr1
kampr2  randi   .02*kbreath, 10, giseed                 
giseed  =       frac(giseed*105.947)
kamp2   =       kbreath + kampr2
kampr3  randi   .02*kbreath, 10, giseed              
giseed  =       frac(giseed*105.947)
kamp3   =       kbreath + kampr3


awt1    oscili  kamp1, kport, gitable3, iphase             
awt2    oscili  kamp2, kport, gitable4, iphase
awt3    oscili  kamp3, kport, gitable5, iphase


awnoise rand  20000, giseed
afiltn  butbp awnoise, knfrq,100

kbreath  = (knoise = 1 ? kbreath : 0)

asig    =       awt1 + awt2 + awt3+(afiltn*kbreath*.4)
asig    =       asig/3/4000
    

afilt   tone    asig, kfilt2
asig    balance afilt, asig



outs    asig, asig

garev   =       garev + asig
       


endin



instr 100
  
;printk 1, gkbreath                                                           

;krevenv linseg  2, p3, 2, 1.0, 0.1
arev   reverb  garev, 2.0;krevenv
;arev clip arev, 5              
                outs    arev*0.1, arev*0.1               
garev =         0                                               

endin




</CsInstruments>
<CsScore>
f 0 36000

i 100 0 3600



</CsScore>
</CsoundSynthesizer>

 

On Tue, Jun 30, 2009 at 9:01 PM, Tim Mortimer <timmortimer@...> wrote:

Steven Yi wrote an article in an early Csound journal (online) about legato &
portamento handling.

I wrote some code (featuring portomento) for somebody's wx7 wind controller,
& the easiest solution i came up with (utilising Steven Yi's tiestatus UDO
from the journal article) is to handle midi / user input in one csound
instrument, & then translate that into sending score events to a subsequent
sound generating instrument.

i dont have code to hand. if you are patient i may be able to dig out some
examples. but I dont have any experience with the wii.

Steven's article & tiestatus opcode however is/are highly recommended


jinku kim wrote:
>
> Hello! csounder.
>
> It is a question about Portamento and cpsmidib.
>
> This csd file is for woodwind instrument for Akai_Ewi and Wiimote.
>
> This csd use cpsmidib with i-rate as note input and Linseg opcode as a
> portamento funtion, in this case I can't control pitchbend, when I am
> blowing Ewi(noteon).
>
> Can you tell me what I miss, some hint or tips for using k-rate_cpsmidib
> and
> portamento together, Or another Idea for making portamento.
>
> Thank you in advance.
>
> <CsoundSynthesizer>
> <CsOptions>
> -odac           -iadc     -d
> </CsOptions>
> <CsInstruments>
>
> sr       =  44100
> ksmps    =  32
> nchnls   =  2
> 0dbfs = 1
>
> giseed = .5
> garev init 0
> gicps init 440
>
>
>
> gitable1 ftgen 1, 0, 4096, 10, 1
> gitable2 ftgen 3, 0, 4097, -10, 2661, 87, 33, 18
> gitable3 ftgen 4, 0, 4097, -10, 174, 12,
> gitable4 ftgen 5, 0, 4097, -10, 314, 13,
> gitable5 ftgen 6, 0, 16, -2, 40, 40, 80, 160, 320, 640, 1280, 2560, 5120,
> 10240, 10240
>
>
> ctrlinit 1, 2, 0
>
>
> instr 1 ; This is based on Flute1.csd from Dr. Boulanger's csound library.
>              I modified it for Midi_Windcontoroller and Wiimote.
>
> knoise chnget "breathnoise"
> kvib chnget "vibrato"
> kport chnget "port"
> kfilt chnget "filt"
> kfilt2 chnget "filt2"
> iportim chnget "portamento"
>
> icpsb init gicps
>
> icps cpsmidib
>
> gicps = icps
>
> kport linseg icpsb, iportim, gicps
>
>
> kbreath midictrl 2, 0, 1
> gkbreath = kbreath
>
>
> kbreath port kbreath, 0.02
> kbreath linenr kbreath, 0.02, 0.05, 0.1
>
>
> kvibdepth = abs(kvib*kport/100.)
> kvibdepth randi kvibdepth*.1, 1000,giseed
> giseed  =       frac(giseed*105.947)
> kport    = kport + kvibdepth
>
> iphase  = giseed
>
> knfrq   = kport
>
> kampr1  randi   .02*kbreath, 10, giseed
> giseed  =       frac(giseed*105.947)
> kamp1   =       kbreath + kampr1
> kampr2  randi   .02*kbreath, 10, giseed
> giseed  =       frac(giseed*105.947)
> kamp2   =       kbreath + kampr2
> kampr3  randi   .02*kbreath, 10, giseed
> giseed  =       frac(giseed*105.947)
> kamp3   =       kbreath + kampr3
>
> awt1    oscili  kamp1, kport, gitable3, iphase
> awt2    oscili  kamp2, kport, gitable4, iphase
> awt3    oscili  kamp3, kport, gitable5, iphase
>
>
> awnoise rand  20000, giseed
> afiltn  butbp awnoise, knfrq,100
>
> kbreath  = (knoise = 1 ? kbreath : 0)
>
> asig    =       awt1 + awt2 + awt3+(afiltn*kbreath*.4)
> asig    =       asig/3/4000
>
>
> afilt   tone    asig, kfilt2
> asig    balance afilt, asig
>
> outs    asig, asig
>
> garev   =       garev + asig
>
>
>
> endin
>
> instr 100
>
> ;printk 1,
> gkbreath
>
> ;krevenv linseg  2, p3, 2, 1.0, 0.1
> arev   reverb  garev, 2.0;krevenv
> ;arev clip arev, 5
>                 outs    arev*0.1, arev*0.1
> garev =         0
>
> endin
>
>
>
>
> </CsInstruments>
> <CsScore>
> f 0 36000
>
> i 100 0 3600
>
>
>
> </CsScore>
> </CsoundSynthesizer>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"
>


-----
http://www.timmortimer.net


--
View this message in context: http://www.nabble.com/-csnd--Windcontroller-Portamento-with-cpsmidib-opcode-tp24280381p24282467.html
Sent from the Csound - General mailing list archive at Nabble.com.



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

 « Return to Thread: [csnd] Windcontroller Portamento with cpsmidib opcode