Track Input Transformer "Inside Range" Condition Error

Off-by-one error on Parameter 2 of “Inside Range”.

To Reproduce:

  1. Create a track filter where:
    Type is Equal Controller AND
    Midi Controller No. Inside Range CC 21 CC 38
    Action:
    Value 2 Set to Fixed Value 0

Result:
Sending CC 21 Sets value to 0 as expected.
Sending CC 38 DOES NOT set value 0

Workaround:
Set upper limit of “Inside Range” to expected + 1 (39).

Problem Statement:
Upper limit of “Inside Range” has off-by-one error on the comparison.

Other potential workaround: Use “Bigger or Equal” AND “Less or Equal”

Hi,

I can reproduce it in Cubase 14.0.30, 14.0.20, and 13.0.50. It will probably go down.

I believe this is by design. I can imagine there are some use cases where you need it like this. For example, if you select a position inside a range.

If you select MIDI Notes inside Range 4. 1. 1. 0 - 4. 2. 1. 0, also MIDI Notes starting on 4. 2. 1. 0 would become selected, if the upper value is included. At this moment, it isn’t what is expected behaviour.

Desired or not, the low-end of the range should behave the same as the high-end. If low is set to 21 and includes 21, then high set to 38 should include 38. Should be consistent, regardless of which solution you prefer.

This seems to be a distinction of “between” versus “inside range”.

The picture you posted is not of the Track Input Transformer. Not sure what you are describing

Hi,

I’m describing another use case for using “Inside Range”, where it makes sense, it doesn’t take the hi value into the range.


Use case 1

  • Add MIDI Track, MIDI Part.
  • Insert 2 MIDI Notes:
    – Note 1 Start: 4. 1. 1. 0
    – Note 2 Start: 4. 2. 1. 0
  • Make a Logical Editor Preset
    | Type is | Equal Note | And |
    | Position | In Range | 4. 1. 1. 0 | 4. 2. 1. 0 | PPQ |
    | Function: Select |
  • Click Apply
    => Only the 1st MIDI Note becomes selected. Which is the expected result.

Use case 2

  • Add MIDI Track, MIDI Part.
  • Insert 2 MIDI Notes:
    – Note 1 Velocity: 20
    – Note 2 Velocity: 100
  • Make a Logical Editor Preset
    | Type is | Equal Note | And |
    | Velocity | In Range | 20 | 100 |
    | Function: Select |
  • Click Apply

=> Only the 1st MIDI Note becomes selected. Which is not the expected result.

I agree that any use case using a similar comparison should be consistent. Ranges should consistently either include or exclude the end points.

For example: If I say pick a number from 2 to 5. I would expect both 2 and 5 to be valid. If I say pick a number BETWEEN 2 and 5, this could be confusing, but should be resolved in a consistent way.

Hi,

It is consistent, now. It always excludes the endpoint. But as we can see, if the Filter Target is Position, the current result is the expected one (as I showed on the screenshot above). If the Filter Target is something else, the current result is not expected.

I have to respectfully disagree. I set CC low to 21 and CC high to 38. 21 is included, 38 is not. I’ll post proof a bit later.

Hi,

Which is exactly, what I wrote.

The upper border is never included. But in case the Filter Target is set to “Position”, this behaviour is expected/wanted.

Sorry if I misconstrued, but it appeared that you were saying this is desired behavior. I don’t believe that is the case.

I would expect “Inside Range” 21 to 38 to behave exactly the same as:
“Bigger or Equal” to 21 AND “Less or Equal” to 38.

Hi,

Sorry, English is not my first language.

If the Filter Target is set to Position, then yes, this is desired behaviour. In other cases, this is not desired behaviour.

Note also, I’m still a bit confused with your examples. I’m referring to MIDI Channel: “Track Input Transformer”.
Again, I will post the exact dialogs after I get some lunch.