Csound Csound-dev Csound-tekno Search About

[Csnd] midiamplitude, ifmindex

Date2010-05-24 09:41
FromStefan Thomas
Subject[Csnd] midiamplitude, ifmindex
Dear community,
I tried to constuct a connection between midi-velocity and ifm index in the following file.
I think, I suceeded in that way, that now a higher midi-velocity value corresponds to a higher ifm-index.
I used tablei and gen17 for this, is this the right way?
And there is one ohther thing, wich confuses me:
I have the feeling, that I can't really hear a difference in terms of loudness. It seems, that there is no really difference between pianissimo and fortissimo.
Do I hear wrong or is something wrong with the code?
Here is my example:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr     = 48000
kr     = 480
ksmps  = 100
nchnls = 2
massign 1, 101
instr 101
icps cpsmidi
  iamp    ampmidi     10000
iwave = 1
icar = 2
imod = 1
ifn = 2
ixmode = 0
imidiv veloc
indx = imidiv
ifmindex  tablei indx, ifn, ixmode
;ifmindex = 4
asig foscil iamp, icps, icar, imod, ifmindex, iwave
      outs      asig, asig
      endin
 
</CsInstruments>
<CsScore>
f0 3600
f1  0   8193  10   1 ;sinus
f 2 0 1025 -17 0 0  1 1 127 8 ; for imidivel =1 get ifmindex =1, for imidivel = 127 get ifmindex = 16
i101   0    3600

</CsScore>
</CsoundSynthesizer>


Date2010-05-24 10:15
FromIain McCurdy
Subject[Csnd] RE: midiamplitude, ifmindex
Or could you just use veloc's optional arguments for range setting?
imidiv veloc 1, 16

minimum key velocity will produce a value of 1 for imidiv, maximum velocity a value of 16. I don't think you need to use a table unless you require a more elaborate non-linear mapping.

Iain


Date: Mon, 24 May 2010 10:41:39 +0200
From: kontrapunktstefan@googlemail.com
To: csound@lists.bath.ac.uk
Subject: [Csnd] midiamplitude, ifmindex

Dear community,
I tried to constuct a connection between midi-velocity and ifm index in the following file.
I think, I suceeded in that way, that now a higher midi-velocity value corresponds to a higher ifm-index.
I used tablei and gen17 for this, is this the right way?
And there is one ohther thing, wich confuses me:
I have the feeling, that I can't really hear a difference in terms of loudness. It seems, that there is no really difference between pianissimo and fortissimo.
Do I hear wrong or is something wrong with the code?
Here is my example:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr     = 48000
kr     = 480
ksmps  = 100
nchnls = 2
massign 1, 101
instr 101
icps cpsmidi
  iamp    ampmidi     10000
iwave = 1
icar = 2
imod = 1
ifn = 2
ixmode = 0
imidiv veloc
indx = imidiv
ifmindex  tablei indx, ifn, ixmode
;ifmindex = 4
asig foscil iamp, icps, icar, imod, ifmindex, iwave
      outs      asig, asig
      endin
 
</CsInstruments>
<CsScore>
f0 3600
f1  0   8193  10   1 ;sinus
f 2 0 1025 -17 0 0  1 1 127 8 ; for imidivel =1 get ifmindex =1, for imidivel = 127 get ifmindex = 16
i101   0    3600

</CsScore>
</CsoundSynthesizer>



Get a free e-mail account with Hotmail. Sign-up now.

Date2010-05-24 15:52
FromStefan Thomas
Subject[Csnd] Re: RE: midiamplitude, ifmindex
Dear Ian,
my example isn't really a serious one.
I would like to create a more elaoberate non-linear mapping, and I would like to know how to do it!

2010/5/24 Iain McCurdy <i_mccurdy@hotmail.com>
Or could you just use veloc's optional arguments for range setting?
imidiv veloc 1, 16

minimum key velocity will produce a value of 1 for imidiv, maximum velocity a value of 16. I don't think you need to use a table unless you require a more elaborate non-linear mapping.

Iain


Date: Mon, 24 May 2010 10:41:39 +0200
From: kontrapunktstefan@googlemail.com
To: csound@lists.bath.ac.uk
Subject: [Csnd] midiamplitude, ifmindex


Dear community,
I tried to constuct a connection between midi-velocity and ifm index in the following file.
I think, I suceeded in that way, that now a higher midi-velocity value corresponds to a higher ifm-index.
I used tablei and gen17 for this, is this the right way?
And there is one ohther thing, wich confuses me:
I have the feeling, that I can't really hear a difference in terms of loudness. It seems, that there is no really difference between pianissimo and fortissimo.
Do I hear wrong or is something wrong with the code?
Here is my example:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr     = 48000
kr     = 480
ksmps  = 100
nchnls = 2
massign 1, 101
instr 101
icps cpsmidi
  iamp    ampmidi     10000
iwave = 1
icar = 2
imod = 1
ifn = 2
ixmode = 0
imidiv veloc
indx = imidiv
ifmindex  tablei indx, ifn, ixmode
;ifmindex = 4
asig foscil iamp, icps, icar, imod, ifmindex, iwave
      outs      asig, asig
      endin
 
</CsInstruments>
<CsScore>
f0 3600
f1  0   8193  10   1 ;sinus
f 2 0 1025 -17 0 0  1 1 127 8 ; for imidivel =1 get ifmindex =1, for imidivel = 127 get ifmindex = 16
i101   0    3600

</CsScore>
</CsoundSynthesizer>



Get a free e-mail account with Hotmail. Sign-up now.


Date2010-05-24 17:41
FromIain McCurdy
Subject[Csnd] RE: Re: RE: midiamplitude, ifmindex
Hi Stefan,

There are various options as regards what GEN routine to use, GEN 17 that you used will create a step function without any interpolation between break points - values are held until the next break point. GEN 7 will interpolate in linear fashion between break points - maybe this is the one that should have been using? Here is how you could implement non-linear mapping using GEN 7 and GEN 17.




-odevaudio -M0 -+rtmidi=virtual




; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
0dbfs    =    1


instr    1
;LINE BREAK-POINT FUNCTION
;RISES FROM 200(hz) TO 400, THEN FALLS TO 300
iT1    ftgen    0,0,128,-7,200,64,400,64,300
;STEP FUNCTION
;200 (hz) IS HELD UNTIL MIDWAY POINT THEN 400 UNTIL MIDI VALUE OF 100, THEN 300 UNTIL THE END
iT2    ftgen    0,0,128,-17,0,200,64,400,100,300
isine    ftgen    0,0,4096,10,1
;READ IN MIDI CONTROLLERS
k1    ctrl7    1,1,0,127
k2    ctrl7    1,2,0,127
;RE-MAP ACCORDING FUNCTION TABLES
k1    table    k1, iT1
k2    table    k2, iT2
;CREATE OSCILLATORS
a1    oscili    0.2,k1,isine
a2    oscili    0.2,k2,isine
;OSCILLATOR 1 TO LEFT CHANNEL, OSCILLATOR 2 TO RIGHT CHANNEL
outs    a1,a2
endin



i 1 0 3600




Date: Mon, 24 May 2010 15:52:53 +0100
From: kontrapunktstefan@googlemail.com
To: csound@lists.bath.ac.uk
Subject: [Csnd] Re: RE: midiamplitude, ifmindex

Dear Ian,
my example isn't really a serious one.
I would like to create a more elaoberate non-linear mapping, and I would like to know how to do it!

2010/5/24 Iain McCurdy 






Or could you just use veloc's optional arguments for range setting?
imidiv veloc 1, 16

minimum key velocity will produce a value of 1 for imidiv, maximum velocity a value of 16. I don't think you need to use a table unless you require a more elaborate non-linear mapping.


Iain

Date: Mon, 24 May 2010 10:41:39 +0200
From: kontrapunktstefan@googlemail.com
To: csound@lists.bath.ac.uk

Subject: [Csnd] midiamplitude, ifmindex

Dear community,
I tried to constuct a connection between midi-velocity and ifm index in the following file.
I think, I suceeded in that way, that now a higher midi-velocity value corresponds to a higher ifm-index.


I used tablei and gen17 for this, is this the right way?
And there is one ohther thing, wich confuses me:
I have the feeling, that I can't really hear a difference in terms of loudness. It seems, that there is no really difference between pianissimo and fortissimo.


Do I hear wrong or is something wrong with the code?
Here is my example:




sr     = 48000
kr     = 480
ksmps  = 100


nchnls = 2
massign 1, 101 
instr 101
icps cpsmidi 
  iamp    ampmidi     10000
iwave = 1
icar = 2
imod = 1
ifn = 2
ixmode = 0
imidiv veloc
indx = imidiv
ifmindex  tablei indx, ifn, ixmode


;ifmindex = 4
asig foscil iamp, icps, icar, imod, ifmindex, iwave
      outs      asig, asig
      endin 
 


f0 3600
f1  0   8193  10   1 ;sinus
f 2 0 1025 -17 0 0  1 1 127 8 ; for imidivel =1 get ifmindex =1, for imidivel = 127 get ifmindex = 16


i101   0    3600




 		 	   		  
Get a free e-mail account with Hotmail. Sign-up now.


 		 	   		  
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-05-24 20:52
FromStefan Thomas
Subject[Csnd] Re: RE: Re: RE: midiamplitude, ifmindex
Dear Ian,
thanks very much for Your help.
I now understand it much better!

2010/5/24 Iain McCurdy <i_mccurdy@hotmail.com>

Hi Stefan,

There are various options as regards what GEN routine to use, GEN 17 that you used will create a step function without any interpolation between break points - values are held until the next break point. GEN 7 will interpolate in linear fashion between break points - maybe this is the one that should have been using? Here is how you could implement non-linear mapping using GEN 7 and GEN 17.

<CsoundSynthesizer>

<CsOptions>
-odevaudio -M0 -+rtmidi=virtual
</CsOptions>

<CsInstruments>

; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
0dbfs    =    1


instr    1
;LINE BREAK-POINT FUNCTION
;RISES FROM 200(hz) TO 400, THEN FALLS TO 300
iT1    ftgen    0,0,128,-7,200,64,400,64,300
;STEP FUNCTION
;200 (hz) IS HELD UNTIL MIDWAY POINT THEN 400 UNTIL MIDI VALUE OF 100, THEN 300 UNTIL THE END
iT2    ftgen    0,0,128,-17,0,200,64,400,100,300
isine    ftgen    0,0,4096,10,1
;READ IN MIDI CONTROLLERS
k1    ctrl7    1,1,0,127
k2    ctrl7    1,2,0,127
;RE-MAP ACCORDING FUNCTION TABLES
k1    table    k1, iT1
k2    table    k2, iT2
;CREATE OSCILLATORS
a1    oscili    0.2,k1,isine
a2    oscili    0.2,k2,isine
;OSCILLATOR 1 TO LEFT CHANNEL, OSCILLATOR 2 TO RIGHT CHANNEL
outs    a1,a2
endin

</CsInstruments>
<CsScore>
i 1 0 3600
</CsScore>
</CsoundSynthesizer>


Date: Mon, 24 May 2010 15:52:53 +0100
Subject: [Csnd] Re: RE: midiamplitude, ifmindex

Dear Ian,
my example isn't really a serious one.
I would like to create a more elaoberate non-linear mapping, and I would like to know how to do it!

2010/5/24 Iain McCurdy <i_mccurdy@hotmail.com>






Or could you just use veloc's optional arguments for range setting?
imidiv veloc 1, 16

minimum key velocity will produce a value of 1 for imidiv, maximum velocity a value of 16. I don't think you need to use a table unless you require a more elaborate non-linear mapping.


Iain

Date: Mon, 24 May 2010 10:41:39 +0200
From: kontrapunktstefan@googlemail.com
To: csound@lists.bath.ac.uk

Subject: [Csnd] midiamplitude, ifmindex

Dear community,
I tried to constuct a connection between midi-velocity and ifm index in the following file.
I think, I suceeded in that way, that now a higher midi-velocity value corresponds to a higher ifm-index.


I used tablei and gen17 for this, is this the right way?
And there is one ohther thing, wich confuses me:
I have the feeling, that I can't really hear a difference in terms of loudness. It seems, that there is no really difference between pianissimo and fortissimo.


Do I hear wrong or is something wrong with the code?
Here is my example:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr     = 48000
kr     = 480
ksmps  = 100


nchnls = 2
massign 1, 101
instr 101
icps cpsmidi
  iamp    ampmidi     10000
iwave = 1
icar = 2
imod = 1
ifn = 2
ixmode = 0
imidiv veloc
indx = imidiv
ifmindex  tablei indx, ifn, ixmode


;ifmindex = 4
asig foscil iamp, icps, icar, imod, ifmindex, iwave
      outs      asig, asig
      endin
 
</CsInstruments>
<CsScore>
f0 3600
f1  0   8193  10   1 ;sinus
f 2 0 1025 -17 0 0  1 1 127 8 ; for imidivel =1 get ifmindex =1, for imidivel = 127 get ifmindex = 16


i101   0    3600

</CsScore>
</CsoundSynthesizer>


Get a free e-mail account with Hotmail. Sign-up now.



_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now

Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"