Logical AND in filters

From: Cam Webb <cw_at_camwebb.info>
Date: Fri, 25 Nov 2022 04:33:06 -0900
Is there any way to create logical ANDs among filter rules?

Use case: I would like to map chords of notes to other chords of
notes. E.g.,

# single note, the more general case:
fmap { note {1 0} 60 } { note {0 0} 60 }
fmap { note {1 0} 60 } { note {0 0} 64 } # and more output notes ...

# chord of two notes, the more specific case:
fmap { note {1 0} 60 AND note {1 0} 63 } { note {0 0} 60 }
fmap { note {1 0} 60 AND note {1 0} 63 } { note {0 0} 63 } # and more notes ...

I.e., `non {0 0} 60 x` would be triggered if there was a `non {1 0} 60 x`
AND `non {1 0} 63 y` before a `noff {1 0} 60 0`.

According to the filtering section in the manual I’m guessing this is
not a standard capability, but the section on language and if/then
suggests there may be a way to combine filters.  If there is not, please
consider this a feature request. Thanks for the fantastic tool that
midish already is!

Cam
Received on Fri Nov 25 2022 - 14:33:06 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 26 2022 - 01:30:01 CET