problem with outlet()

Aug 15, 2006 at 2:34pm

problem with outlet()

Hi,

I am trying to create a Max extern that will parse a MusicXML document and send each pitch out an outlet every 250ms. I am having trouble though.

I have two classes. One class is the Max extern PlayXML (mxj PlayXML) and the other is used to parse the XML document. The Max extern PlayXML calls a method in PlayXMLParse called parseThis() which begins to parse the document. It works fine. When I want to display the pitches I first used the post() method of PlayXML. PlayXMLParse called PlayXML.post(pitch) and this would display a new pitch every 250ms. It worked fine. But, when I try to use the outlet() function of PlayXML this is where I’m having trouble. If I call PlayXML.outlet(0,pitch) it does nothing. Even if I call PlayXML.outlet(0,32) from within PlayXMLParse nothing gets sent out the outlet.

I hope someone can help!?!?!?!?

Thanks,
Keith…

#27166
Aug 15, 2006 at 8:49pm

Hi Keith,

post() is a static method of the MaxObject class, so is a static
method of your PlayXML class and can be called with PlayXML.post().
outlet() is not a static method – you must associate it with a
particular instance of MaxObject. You probably shouldn’t be calling
outlet() from within your PlayXMLParse class, but if you need to do
that for some reason you could pass the MaxObject in as an additional
argument.

Ben

On 8/15/06, Keith wrote:
>
> Hi,
>
> I am trying to create a Max extern that will parse a MusicXML document and send each pitch out an outlet every 250ms. I am having trouble though.
>
> I have two classes. One class is the Max extern PlayXML (mxj PlayXML) and the other is used to parse the XML document. The Max extern PlayXML calls a method in PlayXMLParse called parseThis() which begins to parse the document. It works fine. When I want to display the pitches I first used the post() method of PlayXML. PlayXMLParse called PlayXML.post(pitch) and this would display a new pitch every 250ms. It worked fine. But, when I try to use the outlet() function of PlayXML this is where I’m having trouble. If I call PlayXML.outlet(0,pitch) it does nothing. Even if I call PlayXML.outlet(0,32) from within PlayXMLParse nothing gets sent out the outlet.
>
> I hope someone can help!?!?!?!?
>
> Thanks,
> Keith…
>

#81983
Aug 16, 2006 at 2:14am

Hi Ben,

Thanks for the reply! I got it working :)

Keith…

#81984

You must be logged in to reply to this topic.