|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceDear community,
unfortunately I have still problems with my idea of changing the pitch with the pressure of the left or the sostenuto-pedal. When I use the left pedal, I'd never had problems with changing the pitch, but the when I using the middle-pedal, it works only sometimes, and most of the time the desired change of pitch doesn't appear. I'm quite aware of the fact, that it could be a mechanical problem with the midi pedal, but, before I buy I new one, I want to kindly ask You, if You could have a look on the code. Maybee the problem is here, but I can't see. Here the file: <CsoundSynthesizer> <CsOptions> -odevaudio -M0 -b400 -m0d </CsOptions> <CsInstruments> sr = 48000 kr = 2400 ksmps = 20 nchnls = 2 gkleftpedal init 0 gkmiddlepedal init 0 ipch = 8.02 iequal = 12 massign 0, 1 ; assign all midi events to instr 1, pgmassign 0, 1 ; also all program changes ;;;;;;; defining the 1st instrument ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; instr 1 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal ileftpedal = i(gkleftpedal) gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal imiddlepedal = i(gkmiddlepedal) if (ileftpedal>0) then ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down elseif (imiddlepedal>0) then ituningtable = 12 else ituningtable = 10 ; when the left and the mittle pedal are not used, use tuningtable numer 10 endif imnn notnum indx = imnn * 2 + 1 ; values in table alternate between ; Midi note nums and frequencies icps table indx, ituningtable iamp ampmidi 10000 icar = 1 imod = 1; kndx = iamp/2000 ; the louder, the more index it will have ; making the overall amplitude envelope kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 ;the envelope for the fmindex ; att, decay, isl, ausklingzeit ;kindexenv madsr 3000/iamp, 3, 0.2, 0.111, 0 kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 ; and now the whole sound a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 ;making a softer amplitude envelope with linenr ;klinen linenr 1, 0.2, 0, 0.01 ;outs klinen*a1, klinen*a1 outs a1, a1 endin </CsInstruments> <CsScore> f1 0 8193 10 1 f 10 0 256 -23 "bartokaufCundGis.cps" f 11 0 256 -23 "bartokaufCundFes.cps" f 12 0 256 -23 "bartokaufGisundDisis.cps" i1 0 60 ;play one minute </CsScore> |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceIt seems there might be an "override" if both pedals are down, the
middle pedal signal will be ignored, as you use if ..elseif. Maybe this is not a problem in practice. You could also try putting the ctrl7 opcodes in a separate instrument (always on), maybe this is safer than turning the midi input on and off with the instrument. Then you could also put a prinktk2 statement in the always-on-midi-input instrument to see if the signal from the middle pedal is consistent. best Oeyvind 2009/9/29 Stefan Thomas <kontrapunktstefan@...>: > Dear community, > unfortunately I have still problems with my idea of changing the pitch with > the pressure of the left or the sostenuto-pedal. > When I use the left pedal, I'd never had problems with changing the pitch, > but the when I using the middle-pedal, it works only sometimes, and most of > the time the desired change of pitch doesn't appear. > I'm quite aware of the fact, that it could be a mechanical problem with the > midi pedal, but, before I buy I new one, I want to kindly ask You, if You > could have a look on the code. Maybee the problem is here, but I can't see. > Here the file: > > <CsoundSynthesizer> > <CsOptions> > -odevaudio -M0 -b400 -m0d > </CsOptions> > <CsInstruments> > > sr = 48000 > kr = 2400 > ksmps = 20 > nchnls = 2 > gkleftpedal init 0 > gkmiddlepedal init 0 > ipch = 8.02 > iequal = 12 > > massign 0, 1 ; assign all midi events to instr 1, > pgmassign 0, 1 ; also all program changes > > > > ;;;;;;; defining the 1st instrument ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > instr 1 > gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal > ileftpedal = i(gkleftpedal) > gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal > imiddlepedal = i(gkmiddlepedal) > > if (ileftpedal>0) then > ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down > elseif (imiddlepedal>0) then > ituningtable = 12 > else > ituningtable = 10 ; when the left and the mittle pedal are not used, use > tuningtable numer 10 > endif > > imnn notnum > indx = imnn * 2 + 1 ; values in table alternate between > ; Midi note nums and frequencies > icps table indx, ituningtable > iamp ampmidi 10000 > > icar = 1 > imod = 1; > kndx = iamp/2000 ; the louder, the more index it will have > > ; making the overall amplitude envelope > kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 > ;the envelope for the fmindex > ; att, decay, isl, ausklingzeit > ;kindexenv madsr 3000/iamp, 3, 0.2, 0.111, 0 > kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 > ; and now the whole sound > a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 > ;making a softer amplitude envelope with linenr > ;klinen linenr 1, 0.2, 0, 0.01 > ;outs klinen*a1, klinen*a1 > outs a1, a1 > endin > </CsInstruments> > > <CsScore> > f1 0 8193 10 1 > f 10 0 256 -23 "bartokaufCundGis.cps" > f 11 0 256 -23 "bartokaufCundFes.cps" > f 12 0 256 -23 "bartokaufGisundDisis.cps" > > i1 0 60 ;play one minute > > > </CsScore> > > > > > Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound" |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceDear Oeyvind,
thanks for Your fast reply! You told me Then you could also put a prinktk2 statementCould You be please so kind and give me an short code-example, how I can do this? The other things, I guess, I've understand. I will try co create a second instrument, consisting only of the three pedals
2009/9/29 Oeyvind Brandtsegg <obrandts@...> It seems there might be an "override" if both pedals are down, the |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceYes,
the following instrument should be "always on", like this in the score: i1 0 9999 ; play for 9999 seconds instr 1 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal printk2 gkleftpedal, 0 printk2 gkmiddlepedal , 10 ; the number 10 in the line above, ; makes 10 spaces at the start of the printed line, ; so it's easier to differentiate between the two prints endin Hope this helps best Oeyvind 2009/9/29 Stefan Thomas <kontrapunktstefan@...>: > Dear Oeyvind, > thanks for Your fast reply! > You told me >> >> Then you could also put a prinktk2 statement >> in the always-on-midi-input instrument to see if the signal from the >> middle pedal is consistent. > > Could You be please so kind and give me an short code-example, how I can do > this? > The other things, I guess, I've understand. I will try co create a second > instrument, consisting only of the three pedals > > 2009/9/29 Oeyvind Brandtsegg <obrandts@...> >> >> It seems there might be an "override" if both pedals are down, the >> middle pedal signal will be ignored, as you use if ..elseif. Maybe >> this is not a problem in practice. >> You could also try putting the ctrl7 opcodes in a separate instrument >> (always on), maybe this is safer than turning the midi input on and >> off with the instrument. Then you could also put a prinktk2 statement >> in the always-on-midi-input instrument to see if the signal from the >> middle pedal is consistent. >> >> best >> Oeyvind >> >> 2009/9/29 Stefan Thomas <kontrapunktstefan@...>: >> > Dear community, >> > unfortunately I have still problems with my idea of changing the pitch >> > with >> > the pressure of the left or the sostenuto-pedal. >> > When I use the left pedal, I'd never had problems with changing the >> > pitch, >> > but the when I using the middle-pedal, it works only sometimes, and most >> > of >> > the time the desired change of pitch doesn't appear. >> > I'm quite aware of the fact, that it could be a mechanical problem with >> > the >> > midi pedal, but, before I buy I new one, I want to kindly ask You, if >> > You >> > could have a look on the code. Maybee the problem is here, but I can't >> > see. >> > Here the file: >> > >> > <CsoundSynthesizer> >> > <CsOptions> >> > -odevaudio -M0 -b400 -m0d >> > </CsOptions> >> > <CsInstruments> >> > >> > sr = 48000 >> > kr = 2400 >> > ksmps = 20 >> > nchnls = 2 >> > gkleftpedal init 0 >> > gkmiddlepedal init 0 >> > ipch = 8.02 >> > iequal = 12 >> > >> > massign 0, 1 ; assign all midi events to instr 1, >> > pgmassign 0, 1 ; also all program changes >> > >> > >> > >> > ;;;;;;; defining the 1st instrument ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> > instr 1 >> > gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal >> > ileftpedal = i(gkleftpedal) >> > gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal >> > imiddlepedal = i(gkmiddlepedal) >> > >> > if (ileftpedal>0) then >> > ituningtable = 11 ;choose tuningtable number 11, if the left pedal is >> > down >> > elseif (imiddlepedal>0) then >> > ituningtable = 12 >> > else >> > ituningtable = 10 ; when the left and the mittle pedal are not used, use >> > tuningtable numer 10 >> > endif >> > >> > imnn notnum >> > indx = imnn * 2 + 1 ; values in table alternate between >> > ; Midi note nums and frequencies >> > icps table indx, ituningtable >> > iamp ampmidi 10000 >> > >> > icar = 1 >> > imod = 1; >> > kndx = iamp/2000 ; the louder, the more index it will have >> > >> > ; making the overall amplitude envelope >> > kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 >> > ;the envelope for the fmindex >> > ; att, decay, isl, ausklingzeit >> > ;kindexenv madsr 3000/iamp, 3, 0.2, 0.111, 0 >> > kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 >> > ; and now the whole sound >> > a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 >> > ;making a softer amplitude envelope with linenr >> > ;klinen linenr 1, 0.2, 0, 0.01 >> > ;outs klinen*a1, klinen*a1 >> > outs a1, a1 >> > endin >> > </CsInstruments> >> > >> > <CsScore> >> > f1 0 8193 10 1 >> > f 10 0 256 -23 "bartokaufCundGis.cps" >> > f 11 0 256 -23 "bartokaufCundFes.cps" >> > f 12 0 256 -23 "bartokaufGisundDisis.cps" >> > >> > i1 0 60 ;play one minute >> > >> > >> > </CsScore> >> > >> > >> > >> > >> > >> >> >> Send bugs reports to this list. >> To unsubscribe, send email sympa@... with body "unsubscribe >> csound" > Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound" |
|
|
Re: Re: different pitches during a live-midi performanceThen, at the start of each "real" instrument, put:
ileftpedal = i(gkleftpedal) imiddlepedal = i(gkmiddlepedal) if this is what you want. Art Hunkins ----- Original Message ----- From: "Oeyvind Brandtsegg" <obrandts@...> To: <csound@...> Sent: Tuesday, September 29, 2009 7:51 AM Subject: [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performance Yes, the following instrument should be "always on", like this in the score: i1 0 9999 ; play for 9999 seconds instr 1 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal printk2 gkleftpedal, 0 printk2 gkmiddlepedal , 10 ; the number 10 in the line above, ; makes 10 spaces at the start of the printed line, ; so it's easier to differentiate between the two prints endin Hope this helps best Oeyvind 2009/9/29 Stefan Thomas <kontrapunktstefan@...>: > Dear Oeyvind, > thanks for Your fast reply! > You told me >> >> Then you could also put a prinktk2 statement >> in the always-on-midi-input instrument to see if the signal from the >> middle pedal is consistent. > > Could You be please so kind and give me an short code-example, how I can > do > this? > The other things, I guess, I've understand. I will try co create a second > instrument, consisting only of the three pedals > > 2009/9/29 Oeyvind Brandtsegg <obrandts@...> >> >> It seems there might be an "override" if both pedals are down, the >> middle pedal signal will be ignored, as you use if ..elseif. Maybe >> this is not a problem in practice. >> You could also try putting the ctrl7 opcodes in a separate instrument >> (always on), maybe this is safer than turning the midi input on and >> off with the instrument. Then you could also put a prinktk2 statement >> in the always-on-midi-input instrument to see if the signal from the >> middle pedal is consistent. >> >> best >> Oeyvind >> >> 2009/9/29 Stefan Thomas <kontrapunktstefan@...>: >> > Dear community, >> > unfortunately I have still problems with my idea of changing the pitch >> > with >> > the pressure of the left or the sostenuto-pedal. >> > When I use the left pedal, I'd never had problems with changing the >> > pitch, >> > but the when I using the middle-pedal, it works only sometimes, and >> > most >> > of >> > the time the desired change of pitch doesn't appear. >> > I'm quite aware of the fact, that it could be a mechanical problem with >> > the >> > midi pedal, but, before I buy I new one, I want to kindly ask You, if >> > You >> > could have a look on the code. Maybee the problem is here, but I can't >> > see. >> > Here the file: >> > >> > <CsoundSynthesizer> >> > <CsOptions> >> > -odevaudio -M0 -b400 -m0d >> > </CsOptions> >> > <CsInstruments> >> > >> > sr = 48000 >> > kr = 2400 >> > ksmps = 20 >> > nchnls = 2 >> > gkleftpedal init 0 >> > gkmiddlepedal init 0 >> > ipch = 8.02 >> > iequal = 12 >> > >> > massign 0, 1 ; assign all midi events to instr 1, >> > pgmassign 0, 1 ; also all program changes >> > >> > >> > >> > ;;;;;;; defining the 1st instrument ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> > instr 1 >> > gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal >> > ileftpedal = i(gkleftpedal) >> > gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal >> > imiddlepedal = i(gkmiddlepedal) >> > >> > if (ileftpedal>0) then >> > ituningtable = 11 ;choose tuningtable number 11, if the left pedal is >> > down >> > elseif (imiddlepedal>0) then >> > ituningtable = 12 >> > else >> > ituningtable = 10 ; when the left and the mittle pedal are not used, >> > use >> > tuningtable numer 10 >> > endif >> > >> > imnn notnum >> > indx = imnn * 2 + 1 ; values in table alternate between >> > ; Midi note nums and frequencies >> > icps table indx, ituningtable >> > iamp ampmidi 10000 >> > >> > icar = 1 >> > imod = 1; >> > kndx = iamp/2000 ; the louder, the more index it will have >> > >> > ; making the overall amplitude envelope >> > kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 >> > ;the envelope for the fmindex >> > ; att, decay, isl, ausklingzeit >> > ;kindexenv madsr 3000/iamp, 3, 0.2, 0.111, 0 >> > kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 >> > ; and now the whole sound >> > a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 >> > ;making a softer amplitude envelope with linenr >> > ;klinen linenr 1, 0.2, 0, 0.01 >> > ;outs klinen*a1, klinen*a1 >> > outs a1, a1 >> > endin >> > </CsInstruments> >> > >> > <CsScore> >> > f1 0 8193 10 1 >> > f 10 0 256 -23 "bartokaufCundGis.cps" >> > f 11 0 256 -23 "bartokaufCundFes.cps" >> > f 12 0 256 -23 "bartokaufGisundDisis.cps" >> > >> > i1 0 60 ;play one minute >> > >> > >> > </CsScore> >> > >> > >> > >> > >> > >> >> >> Send bugs reports to this list. >> To unsubscribe, send email sympa@... with body "unsubscribe >> csound" > Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound"= Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound" |
|
|
Re: Re: Re: different pitches during a live-midi performanceDear community,
I tried it now with the following file, but without success. I can hear sound, but the pitch doesn't change. <CsoundSynthesizer> <CsOptions> -odevaudio -M2 -b400 -m0d </CsOptions> <CsInstruments> sr = 48000 kr = 2400 ksmps = 20 nchnls = 2 gkleftpedal init 0 gkmiddlepedal init 0 ipch = 8.02 iequal = 12 massign 0, 1 ; assign all midi events to instr 1, pgmassign 0, 1 ; also all program changes instr 1 ileftpedal = i(gkleftpedal) imiddlepedal = i(gkmiddlepedal) gkleftpedal init 0 gkmiddlepedal init 0 gasend1 init 0 gasend2 init 0 imnn notnum indx = imnn * 2 + 1 ; values in table alternate between ; Midi note nums and frequencies ituningtable = 10 icps table indx, ituningtable iamp ampmidi 10000 icar = 1 imod = 1; ;kndx = iamp/3000 ; the louder, the more index it will have kndx = iamp/2000 ; the louder, the more index it will have ; making the overall amplitude envelope kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 ;the envelope for the fmindex ; att, decay, isl, ausklingzeit ;kindexenv madsr 3000/iamp, 3, 0.2, 0.111, 0 kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 ; and now the whole sound a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 outs a1, a1 asend1 = gasend1+a1 gasend2 = gasend2+a1 endin instr 2 ; modifies the pitch via the left and the right pedal ituningtable = 10 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal ileftpedal = i(gkleftpedal) gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal imiddlepedal = i(gkmiddlepedal) if (ileftpedal>0) then ituningtable = ituningtable+1 ;choose tuningtable number 11, if the left pedal is down elseif (imiddlepedal>0) then ituningtable = ituningtable+2 else ituningtable = ituningtable ; when the left pedal is not used, use tuningtable numer 10 endif endin instr 3 ;RECORDS ALL SOUND ;RECORD A Stereo 16 BIT SOUND FILE fout "soneartklarinette.wav", 4, gasend1, gasend2 ;CLEAR GLOBAL VARIABLE (I.E. ASSIGN IT TO ZERO) gasend1 = 0 gasend2 = 0 endin </CsInstruments> ; die Partiturereignisse werden definiert <CsScore> f1 0 8193 10 1 f 10 0 256 -23 "bartokaufCundGis.cps" f 11 0 256 -23 "bartokaufCundFes.cps" f 12 0 256 -23 "bartokaufGisundDisis.cps" i1 0 600 i2 0 600 </CsScore> |
|
|
Re: Re: Re: Re: different pitches during a live-midi performanceStefan,
Your two ctrl7 lines (in instr 2) need to be in
instr 1, replacing
ileftpedal = i(gkleftpedal)
imiddlepedal = i(gkmiddlepedal) Art Hunkins
|
|
|
Re: Re: Re: Re: Re: different pitches during a live-midi performanceDear community,
sorry for bothering You all, but I still have the same problem. I have to admit, that I don't understand, how I can try putting the ctrl7 opcodes in a separate instrument I tried it with the following code, but without succes:
<CsoundSynthesizer> <CsOptions> -odevaudio -M0 -b400 -m0d </CsOptions> <CsInstruments> sr = 48000 kr = 2400 ksmps = 20 nchnls = 2 ipch = 8.02 iequal = 12 massign 0, 1 ; assign all midi events to instr 1, pgmassign 0, 1 ; also all program changes instr 1 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal gkleftpedal init 0 gkmiddlepedal init 0 gasend1 init 0 gasend2 init 0 imnn notnum indx = imnn * 2 + 1 ; values in table alternate between ; Midi note nums and frequencies ituningtable init 10 icps table indx, ituningtable iamp ampmidi 10000 icar = 1 imod = 1; kndx = iamp/2000 ; the louder, the more index it will have ; making the overall amplitude envelope kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 ;the envelope for the fmindex ; att, decay, isl, ausklingzeit kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 ; and now the whole sound a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 outs a1, a1 asend1 = gasend1+a1 gasend2 = gasend2+a1 endin instr 2 ; modifies the pitch via the left and the right pedal ileftpedal = i(gkleftpedal) imiddlepedal = i(gkmiddlepedal) if (ileftpedal>0) then ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down elseif (imiddlepedal>0) then ituningtable = 12 else ituningtable = 10 ; when the left pedal is not used, use tuningtable numer 10 endif endin instr 3 ;RECORDS ALL SOUND ;RECORD A Stereo 16 BIT SOUND FILE fout "soneartklarinette.wav", 4, gasend1, gasend2 ;CLEAR GLOBAL VARIABLE (I.E. ASSIGN IT TO ZERO) gasend1 = 0 gasend2 = 0 endin </CsInstruments> <CsScore> f1 0 8193 10 1 f 10 0 256 -23 "bartokaufCundGis.cps" f 11 0 256 -23 "bartokaufCundFes.cps" f 12 0 256 -23 "bartokaufGisundDisis.cps" i1 0 15 i2 0 15 </CsScore> |
|
|
Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceI tried to move stuff around a bit in your example, to set it up the
way I described earlier. Beware, I haven't tested this code. Let's hope it runs at all. Anyway, it should provide a hint of what I did mean. Note that the only thing happening in instr 1 is the ctrl7 inputs, writing to global signals. This instrument should be "always on". Instr 2 should not be always on as it is triggered from midi. best Oeyvind <CsoundSynthesizer> <CsOptions> -odevaudio -M0 -b400 -m0d </CsOptions> <CsInstruments> sr = 48000 kr = 2400 ksmps = 20 nchnls = 2 ipch = 8.02 iequal = 12 massign 0, 2 ; assign all midi events to instr 1, ;pgmassign 0, 1 ; also all program changes gkleftpedal init 0 gkmiddlepedal init 0 gasend1 init 0 gasend2 init 0 ;******************* instr 1 gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal endin ;******************** instr 2 ; modifies the pitch via the left and the right pedal ileftpedal = i(gkleftpedal) imiddlepedal = i(gkmiddlepedal) ituningtable init 10 if (ileftpedal>0) then ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down elseif (imiddlepedal>0) then ituningtable = 12 else ituningtable = 10 ; when the left pedal is not used, use tuningtable numer 10 endif imnn notnum indx = imnn * 2 + 1 ; values in table alternate between ; Midi note nums and frequencies icps table indx, ituningtable iamp ampmidi 10000 icar = 1 imod = 1; kndx = iamp/2000 ; the louder, the more index it will have ; making the overall amplitude envelope kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 ;the envelope for the fmindex ; att, decay, isl, ausklingzeit kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 ; and now the whole sound a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 outs a1, a1 asend1 = gasend1+a1 gasend2 = gasend2+a1 endin instr 3 ;RECORDS ALL SOUND ;RECORD A Stereo 16 BIT SOUND FILE fout "soneartklarinette.wav", 4, gasend1, gasend2 ;CLEAR GLOBAL VARIABLE (I.E. ASSIGN IT TO ZERO) gasend1 = 0 gasend2 = 0 endin </CsInstruments> <CsScore> f1 0 8193 10 1 f 10 0 256 -23 "bartokaufCundGis.cps" f 11 0 256 -23 "bartokaufCundFes.cps" f 12 0 256 -23 "bartokaufGisundDisis.cps" i1 0 15 </CsScore> Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound" |
|
|
Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceDear Oeyvind,
thanks for Your support. I tried it, but, unfortunately, I still have problems. The left pedal works all the time, but the sostenuto-Pedal only sometimes. Maybee it is a problem with the pedal itself. I guess, I will try a different one, to see what will happen. 2009/10/1 Oeyvind Brandtsegg <obrandts@...> I tried to move stuff around a bit in your example, to set it up the |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceOk,
did you try sticking in some print statements in instr 1? Like this gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal printk2 gkleftpedal printk2 gkmiddlepedal, 20 The argument with value 20 to printk2 offsets the printing 20 spaces, so it's easier to differentiate between the two printing actions. If it prints correctly according to your actions on the pedal, then the pedal is fine. all best Oeyvind 2009/10/1 Stefan Thomas <kontrapunktstefan@...>: > Dear Oeyvind, > thanks for Your support. > I tried it, but, unfortunately, I still have problems. > The left pedal works all the time, but the sostenuto-Pedal only sometimes. > Maybee it is a problem with the pedal itself. > I guess, I will try a different one, to see what will happen. > > 2009/10/1 Oeyvind Brandtsegg <obrandts@...> >> >> I tried to move stuff around a bit in your example, to set it up the >> way I described earlier. >> Beware, I haven't tested this code. Let's hope it runs at all. Anyway, >> it should provide a hint of what I did mean. >> Note that the only thing happening in instr 1 is the ctrl7 inputs, >> writing to global signals. This instrument should be "always on". >> Instr 2 should not be always on as it is triggered from midi. >> >> best >> Oeyvind >> >> <CsoundSynthesizer> >> <CsOptions> >> -odevaudio -M0 -b400 -m0d >> >> </CsOptions> >> <CsInstruments> >> >> sr = 48000 >> kr = 2400 >> ksmps = 20 >> nchnls = 2 >> >> ipch = 8.02 >> iequal = 12 >> >> >> >> massign 0, 2 ; assign all midi events to instr 1, >> ;pgmassign 0, 1 ; also all program changes >> >> gkleftpedal init 0 >> gkmiddlepedal init 0 >> >> gasend1 init 0 >> gasend2 init 0 >> >> ;******************* >> instr 1 >> >> gkleftpedal ctrl7 1, 67, 0, 1 ; controller 67 is the left pedal >> >> gkmiddlepedal ctrl7 1, 66, 0, 1 ; controller 66 is the middle pedal >> >> endin >> ;******************** >> >> instr 2 ; modifies the pitch via the left and the right pedal >> >> ileftpedal = i(gkleftpedal) >> imiddlepedal = i(gkmiddlepedal) >> >> ituningtable init 10 >> >> if (ileftpedal>0) then >> ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down >> elseif (imiddlepedal>0) then >> ituningtable = 12 >> else >> ituningtable = 10 ; when the left pedal is not used, use tuningtable numer >> 10 >> >> endif >> >> imnn notnum >> indx = imnn * 2 + 1 ; values in table alternate between >> ; Midi note nums and frequencies >> >> icps table indx, ituningtable >> iamp ampmidi 10000 >> >> icar = 1 >> imod = 1; >> >> kndx = iamp/2000 ; the louder, the more index it will have >> >> ; making the overall amplitude envelope >> kampenv mxadsr 100/iamp, 0.0402, 0.785, 0.102, 0.001 >> ;the envelope for the fmindex >> ; att, decay, isl, ausklingzeit >> >> kindexenv madsr 4000/iamp, 3, 0.2, 0.111, 0 >> ; and now the whole sound >> a1 foscil iamp*kampenv, icps, icar, imod, kndx*kindexenv, 1 >> outs a1, a1 >> asend1 = gasend1+a1 >> gasend2 = gasend2+a1 >> endin >> >> >> instr 3 ;RECORDS ALL SOUND >> ;RECORD A Stereo 16 BIT SOUND FILE >> fout "soneartklarinette.wav", 4, gasend1, gasend2 >> ;CLEAR GLOBAL VARIABLE (I.E. ASSIGN IT TO ZERO) >> gasend1 = 0 >> gasend2 = 0 >> endin >> >> >> </CsInstruments> >> >> <CsScore> >> f1 0 8193 10 1 >> f 10 0 256 -23 "bartokaufCundGis.cps" >> f 11 0 256 -23 "bartokaufCundFes.cps" >> f 12 0 256 -23 "bartokaufGisundDisis.cps" >> >> >> i1 0 15 >> >> >> </CsScore> >> >> >> Send bugs reports to this list. >> To unsubscribe, send email sympa@... with body "unsubscribe >> csound" > > Send bugs reports to this list. To unsubscribe, send email sympa@... with body "unsubscribe csound" |
|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: different pitches during a live-midi performanceDear Oeyvind,
thanks again for Your support. I did as You suggested. I could see, that the message for the sostenuto pedal goes sometimes to number zero, although my foot still stays on the pedal. I'm quite sure now, that it is a mechanical problem of the pedal itself. But the code itself seems to work perfectly! 2009/10/1 Oeyvind Brandtsegg <obrandts@...> Ok, |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |