hola chicos,
I have a flext question. I want to add a simple float message to the first inlet of a flext external.
I have an AddInAnything() inlet already, pluse some methods such as:
FLEXT_ADDMETHOD_ (0, "start", m_start);
but when I add a method that only takes a float, such as:
FLEXT_ADDMETHOD (0, m_start_f);
where m_start_f is a simple function: void m_start_f( float f) { if (f == 0.0) post("got a zero"); else post("got a non-zero"); }
now, when I send a message with a "0" in it to the first inlet, nothing happens. all the other messages work fine. If I add a second inlet and put the method on the second inlet with FLEXT_ADDMETHOD (1, m_start_f); it works fine. but, I need it on the first inlet.
any ideas?
-august.
Hey August, actually i can't reproduce the problem. Maybe you can give me some more info concerning the whereabouts. Following is the code for the external "test" that works for me.
best greetings, Thomas
#include <flext.h> class test: public flext_base { FLEXT_HEADER_S(test,flext_base,setup) public: test(); static void setup(t_classid c);
void m_start_f(float f) { if (f == 0.0) post("got a zero"); else post("got a non-zero"); }
FLEXT_CALLBACK_F(m_start_f) }; FLEXT_NEW("test",test)
void test::setup(t_classid c) { #ifdef INSETUP FLEXT_CADDMETHOD(c,0,m_start_f); #endif }
test::test() { #ifndef INSETUP FLEXT_ADDMETHOD(0,m_start_f); #endif AddInAnything(); }
----- Original Message ----- From: "august" august@alien.mur.at To: pd-dev@iem.at Sent: Saturday, March 06, 2004 4:47 PM Subject: [PD-dev] flext question
hola chicos,
I have a flext question. I want to add a simple float message to the first inlet of a flext external.
I have an AddInAnything() inlet already, pluse some methods such as:
FLEXT_ADDMETHOD_ (0, "start", m_start);
but when I add a method that only takes a float, such as:
FLEXT_ADDMETHOD (0, m_start_f);
where m_start_f is a simple function: void m_start_f( float f) { if (f == 0.0) post("got a zero"); else post("got a non-zero"); }
now, when I send a message with a "0" in it to the first inlet, nothing happens. all the other messages work fine. If I add a second inlet and put the method on the second inlet with FLEXT_ADDMETHOD (1, m_start_f); it works fine. but, I need it on the first inlet.
any ideas?
-august.
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
Hey August, actually i can't reproduce the problem. Maybe you can give me some more info concerning the whereabouts. Following is the code for the external "test" that works for me.
best greetings, Thomas
Thomas,
attatched is a test.tar.gz with some source code that demonstrates my problem. All the messages work except for the single "0" and "1" float messages. see test.pd
danke -august.
Hi August, i didn't know that it's a DSP object. With those, the float messages into the leftmost inlet get converted into a signal (even if there's no signal inlet). It's not a general PD restriction, but a flext restriction for now. I'll try to find a solution, though.
best greetings, Thomas
----- Original Message ----- From: "august" august@alien.mur.at To: "Thomas Grill" t.grill@gmx.net Cc: pd-dev@iem.at Sent: Sunday, March 07, 2004 4:34 AM Subject: Re: [PD-dev] flext question
Hey August, actually i can't reproduce the problem. Maybe you can give me some more
info
concerning the whereabouts. Following is the code for the external "test" that works for me.
best greetings, Thomas
Thomas,
attatched is a test.tar.gz with some source code that demonstrates my problem. All the messages work except for the single "0" and "1" float messages. see test.pd
danke -august.