Rescale 0-15 CC Value to 0-127 for Midi CH Remapping

Hi there,

I’m trying to convert a CC value of 0-15 (from an encoder I have setup to transmit within that range) to the equivalent value within the standard 0-127 range using the Rescale pipe. I am doing this because I want to change the output midi channel in a CH Remap pipe based on the value of the encoder.

I am already able to do this if I simply use the encoder as a 0-127 value, but I would love to scale the numbers up so I don’t have to do the maths in my head to figure out what channel I’m selecting.

I have included an image that shows the processed midi for both pipes:

  • On the left, you can see the Rescale Pipe is taking the value and converting it to the equivalent cc value, e.g. 1 becomes 8
  • On the right, you can see the CH Remap pipe receives the scaled-up vaue, yet it is still interpreting it as if it were the original value (e.g. instead of reading 8 as 68/127, which would be midi channel 8, it is reading it as 8/127, which would be midi channel 2)

Am I doing something wrong with my pipe logic? Or is this a bug?

Any help would be hugely appreciated!
Harry

I dont fully understand what you are trying to accomplish with the second part, but what i can see is you are taking every channel from 1-16 and turning it into 1 by restricting the max in and out to 1. Do you have some mapping involved that is changing that value? If you are using the rescale to control the mapping then I believe you have to hit a virtual or physical port first. Likely youll need to use 2 lines if that’s what you are after.

1 Like

You could do it using virtual mappings, like sending rescaled CC to a particular Virtual output and adding the mappings manually mapped to the matching Virtual output letter and CC id.

1 Like

Further to @Giedrius’ suggestion, your original issue is due to “external” mappings always taking the CC values as they arrive at the input.
SO, no matter how you modify it later, it won’t affect the mapped value.

Something like this, however, will work:

Screen Shot 2024-07-09 at 20.53.51

See how the Virtual H does not need to go anywhere, it “picks up” the scaled CC74 to be used in the Channel Remap pipe.


PS. use the + button to manually set the virtual mapping

2 Likes

Awesome, thank you all for these incredibly helpful responses, I ended up going for a physical routing from port A out to port A in.

As everyone suggested, breaking it into two rows worked brilliantly. Here’s what it looks like on my end (pretty much exactly the same as what resonotter showed):

image

In case anyone’s wondering why I wanted to do this, the example from my OP was a simplified version to show the area I was having difficulty with. In the full preset the idea is that I can play a chord on one synth (e.g. on midi channel 1) and have a parallel pipe that takes that same chord and arpeggiates it on midi channel 2 (or any other midi channel of my choosing).

Really fun for adding a little extra depth to chords!

I’ve only had this incredible box for a few days so I’m sure this is just scratching the surface - endless possibilities!

4 Likes

Hey, Harry @elwyrr, good to see you’re getting deep into MH.
A couple of extra points:

You’re using a “physical loopback” to get modified mappings. This was the only way to do it until @Giedrius brought us Virtual mappings with 1.15. The differences are subtle but worth knowing (Some links on this if you’re curious)

If you’re into chords → companion arpeggios, you might also have fun with Dispatcher’s new Chord modes. These allow you to split off say the bottom notes to process as an extra parallel stream & also let you choose how many notes to bring back together for an arp.
Very cool & powerful stuff.

1 Like