ROUTE numbers bigger than a selected amount?

Jason Charney's icon

This seems incredibly elementary, but I can't figure out how to do it.

I want to allow someone to record into a buffer by holding a key, but to not allow recordings under 500 ms. I hooked up a key and keyup to both inlets of a timer. I can use split or > or something like that to report bangs of recordings falling above 500 ms, but I want to be able to route the numbers that are bigger than 500. Would be helpful if I could use >500 as an argument in route or something.

I can think of several workarounds such as clearing the buffer immediately with a bang if it's too short but it seems like there should be an easy way to ROUTE numbers larger or smaller than a specific value.

protocol's icon

cant you use just a simple if statement? "if $i1>500 then $i1"

Luke Hall's icon

It sounds to me like you're describing exactly what [split] does anyway?

Jason Charney's icon

Wow, thanks to both of you. Guess I should have slept last night. Or tried just hooking up a number box to the split outlets. :)