@neauoire at this point why not make it just "limit" the number, clamping it by a definable lower and higher boundary? so you can bang on "greater than" or "lower than" simply by putting an F to the output of L
@npisanti Do you mean like having an extra port for "from"?
@neauoire yes, something like
min max L input
with min default to 0 and max to z
something like this will bang if the variable a is less than 4
@neauoire you can also use it to keep the value inside the min-max range for other purposes
@neauoire PS: sorry it will bang on "less equal" and "greater equal"
@npisanti I'm testing that idea, will keep you posted :)
@neauoire glad to help!
@neauoire i don't understand how that reverse loop works, wouldn't L ( as lower than ) always output 1 ?
@npisanti the difficulty with this operator is that I feel like it has potential to be a lot more.
I'm trying to figure out if there wouldn't be an advantage to outputting '.' by default like F, instead of '0' like A.
It's frustrating sometimes that Orca's F doesn't compare nulls, I don't know how to do NOTNULL in orca.
@neauoire NOTNULL woudl have been the old banger, right?
@npisanti yeah, but I don't want to bring that behavior back because it makes the F operator almost unuseable in most cases.
@neauoire mmm with the limit i proposed something like this could flatten any variable to 0 and so bang
@npisanti logic and math operators only have 2 ports
@neauoire it could be something like
min L max
and operate on its output, like I and Z
@npisanti but that'll make it hard to use if you can't write it from the left?
@npisanti yeha that's too complicated, that might make it so I don't use it.
@npisanti maybe it's better like you said, that L is just a banger. What do you think the pros/cons for banging on equal might be?
@neauoire wait, you could just clamp to the max, like
max L input
this would be not null, but then would bang just on greater equal than max
@neauoire (obviously don't mind the extra marked ports, still on normal orca )
@neauoire maybe it would be visually nicer something like
input L max
@neauoire yes but also all the other numbers in the square would have been filled with 0, it should just just take the lower number between input and max
oh well it could be colled L "lower" and so it takes no difference between ports
@npisanti that's how I had it in the beginning but I was thinking maybe there's value in not outputting anything if there's a way to utilise that
@neauoire mmm yes but the working could be less clear, taking the lower of two input is a pretty clear operation and could be used to :
1 ) make the notnull banger
2 ) bang on greater equal than a value
3 ) clip a C counter to an upper value, it could be useful with T indexing
@neauoire yes!
@neauoire no wait i'm confused
@npisanti can you make me an example with a few associations of input values otherwise?
@neauoire i actually changed three proposal, i don't know what i'm talking about anymore, i now state that the best thing should be an L with the two inputs, leftmost and rightmost, and the output is the lower of the two
aL5 = 5
@neauoire yes, this, like in the picture, i think this implementation is the easier to grasp,
aL5 = 5 and also 5La = 5
and it can let you do all the three things i stated before ( notnull bang, greater than bang, clip indexing )
@neauoire yes, nothing
@neauoire perfect!
@neauoire @npisanti to be quite honest, I'd revert F to the old behavior (banging on .F. ). if you want to turn this off in a particular instance, you can put an A0 above one of the inputs of F so only numbers will be compared.
(but then again, I haven't understood yet why F banging on empty would make it unusable in the first place)
@neauoire for a notbang, it should be easier to treat bangs as 0, so the output would have been 0, and it would have been 0 in this case also with
2F2.
.*L5
..0..
but threating bangs as 0 is not that obvious to the user, so also just outputting nothing could be an option ( personally i'd prefer 0 as output in this case, i don't think it would do damage )
@neauoire PS: i say this also because in many cases orca-c already treats bangs as 0
@npisanti yeah I don't know why orcaJS treats bangs as -1, I'll change that and see what breaks.
@neauoire at this point, invert the output of F with another F
@npisanti gotcha :)
@npisanti in the first example, should .L0 output nothing?