« Return to Thread: different pitches during a live-midi performance
Stefan,Please tell us which lines are #30 and #31, and what the specific error messages are.If any German commentary is involved, please translate for me; ich verstehe deutsch nicht so gut.I do see one error:icps = (ipedal > 0? icps - (icps * .9): icps + (icps * .1))
(This may be the problem - or one of them.)Art HunkinsSent: Sunday, July 05, 2009 12:06 PMSubject: [Csnd] Re: Re: Re: Re: different pitches during a live-midi performanceDear Art,
thanks very much!
I tried out what You suggested to me, but I get always error messages in line 30 and 31.
I don't know what I'm doing wrong, I have to admit, that I don't have enough experiences with the syntax.
It would be great, if You could gove me a hint, one more time!
Thanks,
Stefan
Here is, again, the file ( a little smaller now):
<CsoundSynthesizer>
<CsOptions>
-odevaudio -M2 -b400
</CsOptions>
<CsInstruments>
sr = 44100
kr = 2205
ksmps = 20
nchnls = 2
gkpedal init 0
ipch = 8.02
iequal = 12
massign 0, 1 ; assign all midi events to instr 1,
massign 64, 2 ;
pgmassign 0, 1 ; also all program changes
instr 1
ipedal = i(gkpedal)
ituningtable = 10 ; the number of the f-table
imnn notnum
indx = imnn * 2 + 1 ; values in table alternate between
; Midi note nums and frequencies
icps table indx, ituningtable
if imnn != 61 and imnn != 63 and imnn !=66 igoto skip
icps = (ipedal > 0? icps - (icps * .9): icps + (icps * .1)
skip:
iamp ampmidi 10000
; Hüllkurven definieren
;nachklingzeit
inach = 0.1
;Ende der Lautstartekurve
iend = 0.0000000001 ; für alle die gleiche Endlautstärke
; die Einschwingzeit für jeden Teilton
iein = 0.0030
;die unterschiedlichen ausschwingzeiten
iabkling1 = 4.5*2
iabkling2 = 7.22*2
iabkling3 = 9.26*2
iabkling4 = 9.42*2
;die anfangslautstaerke
ianfang = 0.001
;wie laut klingt der Ton am Ende, nach dem loslassen der Note
iweiterkling = 0.00000000000001
;die unterschiedlichen Maxima der Hüllkurven
ilautfaktor = 0.8
imax1 = 1
imax2 = ilautfaktor
imax3= ilautfaktor^2
imax4 = ilautfaktor^3
;die Individuellen Hüllkurven für jeden einzelnen Teilton
kenv1 expsegr ianfang, iein, imax1, iabkling1, iend, inach, iweiterkling
kenv2 expsegr ianfang, iein, imax2, iabkling2, iend, inach, iweiterkling
kenv3 expsegr ianfang, iein, imax3, iabkling3, iend, inach, iweiterkling
kenv4 expsegr ianfang, iein, imax4, iabkling4, iend, inach, iweiterkling
;die Frequenzverhältnisse
ifundamental = icps
ipartialB =icps*2; teilton2
ipartialC = icps*3 ;teilton 3
ipartialD = icps*4
a1 oscil kenv1*iamp, ifundamental, 1
a2 oscil kenv2*iamp, ipartialB, 1
a3 oscil kenv3*iamp, ipartialC, 1
a4 oscil kenv4*iamp, ipartialD, 1
aton = a1+a2+a3+a4
;velocity controlled tone control
icutoff_oct veloc 6, 14
;lowpass filter our audio signal
alautfilter tone aton, cpsoct(icutoff_oct)
;k1 linenr 0.01, 0.03, 0.1, 0.01
outs alautfilter, alautfilter
endin
instr 2
gkpedal ctrl7 1, 64, 0, 1
endin
</CsInstruments>
; die Partiturereignisse werden definiert
<CsScore>
f1 0 8193 10 1
f 10 0 256 -23 "17tet.cps"
i1 0 3600
i2 0 3600
</CsScore>
</CsoundSynthesizer>
2009/7/3 Art Hunkins <abhunkin@...>
Hello, Stefan,Here's what I'd try:In header:gkpedal init 0and after your massign:massign 64, 2(or whatever controller # your foot pedal is, assign its data to instr 2. The massigns may be tricky.)You should be able to use any type of foot pedal your MIDI keyboard will accept.Make a completely new instrument that receives MIDI data only on controller 64 (or whichever # you choose):instr 2gkpedal ctrl7 1, 64, 0, 1endinThe above instrument is always receiving foot controller data.In the score, add:i2 0 3600In your instr1, add (at beginning):ipedal = i(gkpedal)and later (after icps computed):if imnn != 60 and imnn != 62 and notnum ...... igoto skip ; this is a list of *all your black MIDI key numbers*!icps = (ipedal > 0? icps - (icps * .1): icps + (icps * .1)skip:In the above, ".1" is the percentage of the frequency you wish to add or subtract from your "basic pitch" (12tet).You may want to make some other kind of pitch adjustment. For example you might put the low version (freq) of the black key pitch in your table, then multiply it by some factor if the pedal were up (gkpedal == 0):icps = (ipedal > 0? icps + (icps * .1): icps)Or perhaps you want different groups of "igoto" branches, where for example all F#'s modify in one way, all G#'s in another.Let me know how it works out for you.Art HunkinsSent: Friday, July 03, 2009 3:22 AMSubject: [Csnd] Re: Re: different pitches during a live-midi performanceDear Art,
thanks for Your answer. I have attached a small example to this mail.
I use there a scale with 17 pitches per octave but (as You all know)I do have only 12 pitches per octave on the keyboard.
I would like to allocate the black key two pitches and I would like to change this with the pressure of the una-corda-pedal (the left pedal). While pressing the left pedal down, I would like to get a lower pitch, in the other case, the higher pitch.
But I have no idea, how to do it with csound. So, I really need Your help!
At least I hope, that my idea of negotiating the limitation of 12 pitches per octave in this way will be interesting for other musicians to.
Thanks
Stefan
:
2009/7/2 Art Hunkins <abhunkin@...>
Yes, certainly. But tell us more what you have in mind.I assume your keyboard would be a MIDI controller, correct?An obvious choice would be a MIDI foot controller input through the keyboard, or a MIDI footswitch in conjunction with a foot controller or a portamento pedal.If you need specific pitches from the pedal(s) - even from a standalone portamento pedal, Csound could "round" the pedal to the nearest pitch, or indeed add a rounded percentage to the current keyboard pitch.There are many possibilities.Art Hunkins----- Original Message -----From: kontrapunktstefan@...To: csound@...Sent: Thursday, July 02, 2009 11:57 AMSubject: [Csnd] different pitches during a live-midi performanceDear community,
I want to know, if it could be possible, to get different pitches for e.g. fis and ges during a live-midi performance.
What I desire, is to influence the pitch by a controller, e.g. the left piano-pedal.
I'm not speaking of pitch-bending, I really mean an exact, clearly regognizable pitch, when You press a key with od without this controller.
Is it possible?
« Return to Thread: different pitches during a live-midi performance
| Free embeddable forum powered by Nabble | Forum Help |