Dear community, in the below quoted snippet, the \unaCorda command has unfortunately no influence on the midi-performance. I use the midi file to trigger a csound-csd file. When the left pedal is down, another scale is chosen as if it is not. The idea is, to conquer the limitation of 12tones per octave. In live-midi performance it works fine, but it doesn't when I want to do it when playing a midi-file. When I type in the command-line csound -F test.midi xenodie.csd a wav-file is produced, but I can't hear any difference between the music with and without unaCorda. Is it possible to get the desired behavior of \unaCorda from Lilypond? Here is the snippet of the lilypond file and the csd-file.
\version "2.12.2"
music = {
c' 4 d' e' fis' g' 1
c' 4 \unaCorda d' e' fis' g' 1
}
\score {
\new Staff \music
\layout { }
\midi { }
}
%the csound file:
<CsoundSynthesizer>
<CsOptions>
;-odevaudio -M1 -b400 -m0d ; this is for live-midi performance, if You want
to try it, You should maybee choose M0 or M2 instead ;of M1
</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
;printk2 gkleftpedal
;printk2 gkmiddlepedal, 20
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/imnn^1.7 ; the louder, the higher the index
; making the envelope for the amplitude
inach = 0.1
iend = 0.0000000001 ;
ifac1 =20
ifac2 = 5
iein = ifac1/iamp + ifac2/imnn
ianfang = 0.1
iweiterkling = 0.00000000000001
imax1 = 1
iabkling1 = 14
kampenv linsegr ianfang, iein, imax1,0.1, imax1*0.75, iabkling1,
iend, inach, iweiterkling
;the envelope for the fmindex
kindexenv madsr 2*iein, 3, 0.2, 0.111, 0
; an lfo for the index:
klfo oscil (imnn+iamp)*0.000001, (imnn+iamp)*0.01, 1
; and now the whole sound
a1 foscil iamp*kampenv, icps, icar, imod, 0.4*kndx*kindexenv+klfo, 1
outs a1, a1
gasend1 = gasend1+a1
gasend2 = gasend2+a1
endin
instr 3 ;RECORDS ALL SOUND
;RECORD A Stereo 16 BIT SOUND FILE
fout "xenodie.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 "bartokaufAsundE.cps"
f 11 0 256 -23 "bartokaufCundGis.cps"
i1 0 3600
;i3 0 3600
</CsScore>
The two scaled are attached to the mail:
2009/12/22 Bertalan Fodor (LilyPondTool) <[email protected]>
> Yes, the unaCorda command does perform the appropriate midi event.
>
> I think the question is: is it possible to include custom MIDI controller
> commands in the MIDI output? I think it is not yet, though would be very
> useful.
>
> Bert
>
> Stefan Thomas wrote:
>
> Dear community,
> is it possible to define a \unacorda command that has an effect to the
> midi-output?
>
> ------------------------------
>
> _______________________________________________
> lilypond-user mailing
> [email protected]http://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
>
bartokaufCundGis.cps
Description: Binary data
bartokaufCundGis.cps
Description: Binary data
_______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
