Previous topicNext topic

"Range" Modifier (if x >A && x < B )

Suggestions for new features for Magic.
Post Reply
directordash
Posts: 4
Joined: Sun Jul 23, 2017 9:16 pm

"Range" Modifier (if x >A && x < B )

Post by directordash »

I have MIDI notes doing different things on the same channel, essentially changing the colour of a mask on the video output.

The problem is that I want the modifier that deals with colour to only respond to MIDI notes from my 'colour' buttons, and nothing else on the same MIDI channel. The ideal solution would be for a modifier than allows for a thru-put range to be set. Sadly, an expression can't do this as I've tried tirelessly; I just keep getting NaN returned as it doesn't know how to do nothing if the result is false. I figure a modifier that can go in sequence would be far simpler anyway...

One A value. One B value. If X input value lies between A and B, carry on processing the output... otherwise, the output value remains unchanged and hence the module doesn't respond to any MIDI values outside A and B in this case.

Ta muchly,

D.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: "Range" Modifier (if x >A && x < B )

Post by Magic »

The ideal solution would be for a modifier than allows for a thru-put range to be set.
That might not be the ideal solution ;). As I mentioned in my reply to your other post (viewtopic.php?f=2&t=1343#p6244), I don't think you want to be using the Note Number feature. You're making things more difficult for yourself :? . If you want to control a parameter, only use one note (the Note Velocity feature). Then you don't have to worry about other notes getting in the way.

The issue with your solution is that modifiers don't work backwards. In other words, they can't filter the values going to the module in the first place -- only to the subsequent modifiers. Thus, the module would still be receiving the full range of initial values, which means that there isn't an "unchanged" output value, because the output value has already changed before it gets to the Expression modifier.

Theoretically what you could do is edit your MIDI controller such that only the notes you want to use are on the selected channel. But this depends on how editable your controller is, and whether you can assign different notes to different channels.
Post Reply