| Dear community, my csd-file works now! I can hear sound, when I play, and the controller number 64 has an audible effect: if I don't use it, the pitches of note number 61, 63, 66 are higher, but, if I press it down, I can't hear these notes. I guess I have to define, what has to happen, if the left pedal is down.
There is one more thing, I don't understand: What exactly does the line
icps = (ipedal > 0? icps - (icps * .9): icps + (icps * .1))
do? What do I have to do, if I want to change the pitch of a given note about e.g. 15 cents? Thanks again for Your patience, Stefan
2009/7/7 Art Hunkins <abhunkin@uncg.edu>
Stefan,
Without declaring massign, instr1 receives all the
channel 1 data; instr2 all of the channel 2 data.
In this scenario, you'll need to set channel 2
either on the foot controller itself, or set controller 64 (or whichever) to
channel 2 on your keyboard. (The keyboard
otherwise outputs on channel 1.)
If this is not possible, or doesn't work, next
try:
Put:
gkpedal ctrl7 1, 64, 0, 1
as the first line of instr 1.
Restore your
massign 0, 1
Remove instr 2 and its note
If these don't work, I'd advise going to the
alternate method I suggested previously. (I'll also do some actual
experimentation of my own at that point.)
Art Hunkins
----- Original Message -----
Sent: Tuesday, July 07, 2009 3:35
AM
Subject: [Csnd] Re: Re: Re: different
pitches during a live-midi performance
Dear Art, many thanks, again, for Your fast answer. There
is one more thing, I don't understand: How can I put the
foot-controller to channel two? Or is this already done with
gkpedal ctrl7 2, 64, 0, 1
2009/7/7 Art Hunkins <abhunkin@uncg.edu>
Hello, Stefan,
Iain is correct (he always is, and you can totally
count on his advice regarding realtime). My bad. *Controller* 64 is the foot
controller/switch for MIDI.
Suggestions:
Delete line 14 *as well as 13*.
In instrument 2, substitute:
gkpedal ctrl7 2, 64, 0, 1
Then play your keyboard on channel 1, but put the foot
controller on channel 2. (Alternately, put the foot controller on any
channel except #1; number the instrument the same as the channel and give
the controller the same number also (e.g., gkpedal ctrl7 10 for channel
10).) This should send all keyboard data to instr 1, pedal data to instr
2.
Frankly, I've always had trouble getting insnum to
trigger notes, and never use it. If the above doesn't work, I'd try another
approach: use an always-on instrument 1 that handles *all* midi input; when
noteon's are received, it schedules events (through event or
schedkwhen) for instrument 2. Working at k-rate, it also handles pedal-data
(as in your i2).
All of my live performance works use this principle;
you can look at many .csd's at my website, arthunkins.com, if you'd like.
Let us know how you get on.
Art Hunkins
-----
Original Message -----
Sent:
Monday, July 06, 2009 3:14 PM
Subject:
[Csnd] RE: Re: Re: Re: Re: Re: Re: different pitches during a live-midi
performance
Hi Stefan massign 64, 2 You are assigning
MIDI note events on channel 64 to instr 2; but MIDI channels only go from
1-16 (or 0-15). Bye, Iain
Date: Mon, 6 Jul 2009 20:01:16 +0200 From: kontrapunktstefan@googlemail.comTo: csound@lists.bath.ac.uk
Subject: [Csnd] Re: Re: Re:
Re: Re: Re: different pitches during a live-midi performance Dear
Art, thanks for Your anwer. I guess I changed something in my file,
but I dont know what. Now I get the following error message: INIT
ERROR in instr 0: ? [illegal channel number? [m ?[m massign 64, 2
When I erase the line number 14 in the file, I can hear a sound, but I
can't, off course, change any pitch. What I don't understand is: Is it
right, that 64 should be a number of controller, not of a channel? If
so, how can I tell csound this? Here is, again, the whole file, without
german comments. Thank You very
much, Stefan <CsoundSynthesizer> <CsOptions> -odevaudio
-M1
-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 && imnn != 63
&& imnn !=66 igoto skip icps = (ipedal >
0? icps - (icps * .9): icps + (icps *
.1)) skip: iamp
ampmidi 10000 ; now defining
the envelopes inach = 0.1 ;the volume at the end iend =
0.0000000001 ;the time, the partial needs until it reaches its
peak iein = 0.0030 ; the different decay times for each
partial iabkling1 = 4.5*2 iabkling2 = 7.22*2 iabkling3 =
9.26*2 iabkling4 = 9.42*2 ;the volume at the beginning ianfang =
0.001 ;the volume of the reverberation iweiterkling =
0.00000000000001 ;the individual peaks ilautfaktor = 0.8 imax1 =
1 imax2 = ilautfaktor imax3= ilautfaktor^2 imax4 =
ilautfaktor^3 ;and now: the individual envelopes 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 ;the frequencies for the
partials ifundamental = icps ipartialB =icps*2; partial
2 ipartialC = icps*3 ;partial 3 ipartialD = icps*4 ; partial
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> ; the
score <CsScore> f1 0 8193
10 1 f 10 0 256 -23 "17tet.cps" i1
0 3600 i2 0
3600 </CsScore> </CsoundSynthesizer>
2009/7/5 Art Hunkins <abhunkin@uncg.edu>
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 Hunkins
-----
Original Message -----
Sent:
Sunday, July 05, 2009 12:06 PM
Subject:
[Csnd] Re: Re: Re: Re: different pitches during a live-midi
performance
Dear 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@uncg.edu>
Hello, Stefan,
Here's what I'd try:
In header:
gkpedal init 0
and 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 2
gkpedal ctrl7 1, 64, 0, 1
endin
The above instrument is always
receiving foot controller data.
In the score, add:
i2 0 3600
In 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 Hunkins
-----
Original Message -----
Sent:
Friday, July 03, 2009 3:22 AM
Subject:
[Csnd] Re: Re: different pitches during a live-midi
performance
Dear 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@uncg.edu>
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 -----
Sent:
Thursday, July 02, 2009 11:57 AM
Subject:
[Csnd] different pitches during a live-midi performance
Dear 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?
Insert movie times and more without leaving Hotmail®. See how.
|