Hi,
I'm trying to get familiar with the flext C++ interface to PD. For that, I ported Millers dspobj~ example to flext. The attached source should create a "mydsp" object with in inlet and one outlet. But I can't load this object, PD complains about a missing symbol "__5mydspf". Does someone know, why this simple external doesn't work?
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
am 24.03.2002 19:29 Uhr schrieb Frank Barknecht unter barknech@ph-cip.uni-koeln.de:
Hi,
I'm trying to get familiar with the flext C++ interface to PD. For that, I ported Millers dspobj~ example to flext. The attached source should create a "mydsp" object with in inlet and one outlet. But I can't load this object, PD complains about a missing symbol "__5mydspf". Does someone know, why this simple external doesn't work?
Thanks,
Sorry but i can't figure it out now - neither why the compiler complains about FLEXT_TILDE_NEW, nor why it doesn't load. Which platform/compiler do you use?
I would suggest that you have a bit of patience for a few days until i will release version 0.2.0 which has changed in some aspects and which has a few more features. With that version (which shall constitute a basis to do real work with) i'd like to discuss all problems, work out a usable documentation, and make it bugfree and more portable.
greetings, Thomas
am 24.03.2002 19:29 Uhr schrieb Frank Barknecht unter barknech@ph-cip.uni-koeln.de:
Hi,
I'm trying to get familiar with the flext C++ interface to PD. For that, I ported Millers dspobj~ example to flext. The attached source should create a "mydsp" object with in inlet and one outlet. But I can't load this object, PD complains about a missing symbol "__5mydspf". Does someone know, why this simple external doesn't work?
Thanks,
Hi, i found a few problematic things in your source code:
hence you should use FLEXT_TILDE_1ARG("mydsp~", mydsp, float) because pd won't find the setup routine otherwise
This is likely the reason for pd complaining. Therefore (if your constructor and destructor do nothing) you should either omit them (and use FLEXT_TILDE_NEW without a creation argument) or implement them, by stating mydsp(float notused=0) {} ~mydsp() {} at least.
The complaint about the static variable flext_obj::m_name is not clear to me, though.
greetings, Thomas
Ooops, another thing: (sorry for spamming the list)
Therefore (if your constructor and destructor do nothing) you should either omit them (and use FLEXT_TILDE_NEW without a creation argument) or implement them, by stating mydsp(float notused=0) {} ~mydsp() {} at least.
If you use 1 signal in and 1 out, your constructor has to look like
mydsp::mydsp(float notused=0) { add_in_signal(); // audio in add_out_signal(); // audio out setup_inout(); // set up inlets and outlets }
I promise i will write some documentation soon.....
Thomas
Hi Thomas, Thomas Grill hat gesagt: // Thomas Grill wrote:
Ooops, another thing: (sorry for spamming the list)
Therefore (if your constructor and destructor do nothing) you should either omit them (and use FLEXT_TILDE_NEW without a creation argument) or implement them, by stating mydsp(float notused=0) {} ~mydsp() {} at least.
Oh, yes, those were stupid errors. Back to "Learning C++ in 21 Days"...
If you use 1 signal in and 1 out, your constructor has to look like
mydsp::mydsp(float notused=0) { add_in_signal(); // audio in add_out_signal(); // audio out setup_inout(); // set up inlets and outlets }
Including the changes of your mailings I now get a new error:
error: Bad arguments for message 'mydsp~' to object 'objectmaker' ... you might be able to track this down from the Find menu. mydsp~ ... couldn't create
But don't bother trying to figure out why, I'll just wait for flext 0.2 now.
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
Frank Barknecht schrieb:
Including the changes of your mailings I now get a new error:
error: Bad arguments for message 'mydsp~' to object 'objectmaker' ... you might be able to track this down from the Find menu. mydsp~ ... couldn't create
This usually means that you have to set creation arguments for the objec to be created. They're just missing or in wrong format...
Olaf
Hi, Olaf Matthes hat gesagt: // Olaf Matthes wrote:
This usually means that you have to set creation arguments for the objec to be created. They're just missing or in wrong format...
You're right: if I use [mydsp~ 1] everything works fine.
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\