Forums > Java

problem with outlet()

August 15, 2006 | 2:34 pm

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…


August 15, 2006 | 8:49 pm

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…
>


August 16, 2006 | 2:14 am

Hi Ben,

Thanks for the reply! I got it working :)

Keith…


Viewing 3 posts - 1 through 3 (of 3 total)