<CsoundSynthesizer>
<CsOptions>
</CsOptions>

<CsInstruments>
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

#ifndef VOLUME
#define VOLUME #70000#
#end

giengine  fluidEngine
isfnum    fluidLoad "d:/devel/surmulot/soundfonts/Claudio_Piano.SF2", giengine, 1
          fluidProgramSelect giengine, 1, isfnum, 0, 0
instr 1

  imfloat   =      (17.31234049066757 * log (p4)) - 36.376316562296
  ikey	    =      round (imfloat)
  isemitones   =   100 * (imfloat - ikey)
  ipbend    =      round (8192 * (1 + (isemitones / 200)))
  ivel	    init      p5
	    print     imfloat
	    print     ikey
	    print     isemitones
	    print     ipbend

  idata1    =  ipbend & 127
  idata2    =  ipbend >> 7
	    print     idata1
	    print     idata2

  itest	    = cpsmidinn(69)
print itest

	    fluidControl giengine, 224, 1, idata1, idata2 
	    fluidNote	giengine, 1, ikey, ivel

  imvol	    init      $VOLUME
  asigl, asigr fluidOut	  giengine
	    outs      asigl * imvol, asigr * imvol
endin
</CsInstruments>
<CsScore>
i 1 0 2 440 120
i 1 + 2 448 120
i 1 + 2 438 120
</CsScore>
</CsoundSynthesizer>
