> > Now I’ll start playing with soundfonts in csound5 and see whether my
> > problems there have also disappeared.
>
> What problems were you having with soundfonts? There are two important
> caveats to watch out for when compiling the soundfont opcodes. 1. You have
> to define WORDS_BIGENDIAN if you are on a non-Intel platform. 2. You have
> to make sure that the PACKED macro is properly defined in sf.h for your
> compiler (or that appropriate compiler settings are turned on) so that
> structures use single-byte packing.
Hi Anthony,
I am using GCC on NetBSD/i386, and I am having trouble getting soundfont
looping to release the way I want, even in csound5. For example:
http://terrorpin.net/~ben/docs/alt/music/csound/sf2loop/example.csd
http://terrorpin.net/~ben/docs/alt/music/csound/sf2loop/sf.sf2
http://terrorpin.net/~ben/docs/alt/music/csound/sf2loop/aif.aif
This example uses a sine wave sample table with sustain loop points at a
period before the audio fades. It is about 1/3 of a second long. The
same sound is used in both a soundfont and an AIFC file. The example
has two notes which are sustained for 1 second.
The first note uses a soundfont. At release time the note cuts off
abruptly, despite xtratim.
The second note uses loscil. At release time it plays into the release
loop (from the end of the sustain loop to the end of the table). This
is what I hoped the soundfont opcode would do.
I used a short xtratim value, so the release loop doesn’t actually loop.
It seems quirky for me to use xtratim for this purpose, because the
duration of the release “loop” will vary depending on pitch.
> If you cannot get the Maldonado soundfont opcodes to work, then you can try
> compiling the optional fluidsynth opcodes that also read and play
> soundfonts.
I will try the fluidsynth opcodes next. Thank you for the feedback,
Ben
—