Need help with coding something I have patched with factory objects


#1

Hello :slight_smile:

Lately I have begun to build some more advanced objects and I am now facing a problem that I don't know how to solve. I have build what I want to make with factory objects and now I want to try to code it. I have succesfully done this with other things, but this one I can not seem to wrap my head around coding.

I am trying to combine these 2 objects:

I think it comes down to the sum of the 2 inputs of the math/> object is converted into boolean signal, just by making the outlet bolean... But I cant do that in code, just change the outlet. Well, I dunno how to do that.

So I am wondering if there is a helpful soul that that could give a hint on how to do that internally in an object with code?

Thanks, Jaffa


#2

my guess, just change the bool outlet to a fractional outlet. let me know if it worked....


#3

Thanks man.

I was trying to do the routing within the object... It works as supposed when patched up like on the picture. BUT when I do the same internally in an object, with code, it does not work. I think because themath=> output is a boolean. And it ONlY outputs boolean because of the outlet itself is a yellow output. There is nothing in the code that converts the fradtional to boolean. SO I was looking for a way of converting the fractional value to a boolean.... To emulate what the output does.

I


#4


changed outlet to fractional .....


#5

AHHH yes will try it out right away :slight_smile:

THANKS @philoop


#6

0x07FFFFFF is the highest fractional value aka 64 ....i think ......maybe there is a more elgant way do it


#7

Yes that worked :slight_smile:

Thanks :slight_smile:


#8

I am not sure if this is needed, most bool outlet give out the highest value too...

what you can see i changed the order , should be ....?0:0x.........;
happy patching!


#9

I am comparing it to what I patched with factory objects and it look identical to me so I am happy :wink:


#10

Dig further , try to do it with only factory > object ...will work too?
would be usefull if u replace 0x0fffff with inlet_in1


#11

I just tried qiuckly but did not succed.. Will try again :slight_smile:

EDIT: Got it working.. But comparing it to the stuff i patched with fact objects it is not the same.. Now I need to test what is the best solution... :slight_smile:


#12


change to ?0:0x07FFFFFFF;