| Sorry for the example in the previous note. It inserted spurious "3D"
everywhere.
-------- Original Message --------
Subject: SoundFont opcodes in Csound
Date: Tue, 08 Nov 2005 13:17:44 -0800
From: Prent Rodgers
To: Csound List
Does anyone have an example of the sfinstr or sfplay opcodes producing
sound? I can't get them to generate a sound.
-W -G -m2 -+y -o sflib\soundfont.wav
sr = 44100
ksmps = 10
nchnls = 2
gir sfload "WST25FStein_00Sep22.SF2"
sfilist gir ; Instrument list of "WST25FStein_00Sep22.SF2"
; 0) WST_F44S-Baseline
sfplist gir ; Preset list of "WST25FStein_00Sep22.SF2"
; 0) WST44FGrand prog:0 bank:0
instr 1
inotnum = 0 ; assign frequency directly in Hz
ar1, ar2 sfinstr p4, inotnum, 10000, p5 , 0 , gir, 1
outs ar1, ar2
endin
;Inst Start Dur Vel freq
i1 0.0000000000 3 10000 440
This results in the following console output:
SECTION 1:
new alloc for instr 1:
end of score. overall amps: 0.0 0.0
overall samples out of range: 0 0
0 errors in performance
peak CH 1: 0.000000 (written: 0.000000) at 0
peak CH 2: 0.000000 (written: 0.000000) at 0
166 3200-byte soundblks of shorts written to sflib\soundfont.wav (WAV)
Total processing time: 0.140 seconds
I've also tried sfplay, but get similar results. Any ideas?
Prent Rodgers
--
Music that's "Fake but Accurate"!
Web page: http://prodgers13.home.comcast.net
Podcast: http://podcast1024.libsyn.com
Another Podcast: http://BumperMusic.blogspot.com
Music: http://www.soundclick.com/PrentRodgers |