[PD-dev] flext & fiiwu~
Frank Barknecht
barknech at ph-cip.uni-koeln.de
Tue Oct 22 11:10:58 CEST 2002
Hi,
Michal Seta hat gesagt: // Michal Seta wrote:
> Now, fiiwu~... I seem to have made some progress. I can
> instantiate it now without crashing. I can load a soundfont and it
> reports that the soundfont was loaded OK. However, sending it a
> note message makes pd hang and I have to kill it.
>
> However, it also says (upon loading):
>
> WARNING: Current samplerate 0 != 44100
> WARNING: fiiwu~ might be out of tune!
>
> which is strange because I always run pd @ 44100.
This is indeed strange. I added this check for the samplerate, because
iiwu needs to know the samplerate as well. But the current samplerate
reported should never be 0. The code responsible snippet is:
float sr=Samplerate();
if (sr != 44100.f)
{
post("WARNING: Current samplerate %.0f != 44100", sr);
post("WARNING: fiiwu~ might be out of tune!");
}
And later iiwusynth is set to the detected samplerate:
pd_iiwu_settings.sample_rate = static_cast<int>(sr);
What happens to you is this: the detected samplerate is 0, for
whatever reasons, and iiwu tries to run with this samplerate. This
might disturb libiiwusynth and even if it didn't it wouldn't yield
correct results.
A quickfix would be to check for a reasonable samplerate, i.e. make
the second code part to:
if (sr != 0)
{
pd_iiwu_settings.sample_rate = static_cast<int>(sr);
}
like in the attached file. I also update the CVS now to include this
check.
ciao
--
Frank Barknecht _ ______footils.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 6519 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20021022/fcfd8605/attachment.cpp>
More information about the Pd-dev
mailing list