Hi Thomas, Frank and al.
Following Thomas' directions I got xsample 2.4 and pyext working. I ended up reverting to gcc 2.95 (and g++, too, of course) just to be on the safe side as all of my system is built with those... Thanks Thomas.
xsample is working great. Pyext is as well.
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.
pd 0.35, as usual... (NOT the CVS version)
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
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.
Hi Frank, the Samplerate() method relies on a pd function that should reflect the sample rate given on the pd command line. It's really strange that it doesn't give a meaningful sample rate - i haven't had such a situation yet. However, it's possibly more secure (or just another possibility) to grab the sample rate at initialization of the DSP chain. This is possible by overriding the flext_dsp::m_dsp virtual method, which freshly queries the sample rate out of the signal vector structure - it is called on every dsp chain rebuild. It has the same parameters as flext_dsp::m_signal.
best greetings, Thomas
On Tue, 22 Oct 2002 11:10:58 +0200 Frank Barknecht barknech@ph-cip.uni-koeln.de wrote:
pd_iiwu_settings.sample_rate = static_cast<int>(sr);
ok. now it works. It should keep me happy for a while.
Thanks alot.