Is it possible to transpose Remapped notes?

Jagian

2015-03-14 05:53:24

Hi all:

i expose a problem unresolved for me until now, despite the good tips and help published in this forum. So i request help to anyone here to try to resolve this. To the point: i`ve made a custom MIDI controller with 32 notes (32 buttons) in a 4x8 layout array. The notes are ordered in a chromatic array. My wishes are to could change MIDI channels, transpose octaves and semitones in a dynamic way, and indeed i've achieve sucessfully thanks to the information i've read here. I've use 3 presets triggered by 6 buttons assigned to program changes in my MIDI controller. The details here (maybe nothing new for you):

A. Switch MIDI Channels

Code: Select all

Preset 0: SWITCH MIDI CHANNELS

Translator 0.0: 
Options: stop=true
Incoming: MIDI C0 04
Rules: 
  g0=g0-1
  if g0<144 then g0=144
Outgoing: (none)

Translator 0.1: 
Options: stop=true
Incoming: MIDI C0 05
Rules: 
  g0=g0+1
  if g0>159 then g0=159
Outgoing: (none)

Translator 0.2: 
Options: stop=true
Incoming: MIDI 90 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp qq

Translator 0.3: 
Options: stop=true
Incoming: MIDI 80 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp 00

B. Transpose octaves

Code: Select all

Preset 1: TRANSPOSITION OCTAVES

Translator 1.0: 
Options: stop=true
Incoming: MIDI C0 01
Rules: 
  gd=-12
  gt=gt+gd
Outgoing: (none)

Translator 1.1: 
Options: stop=true
Incoming: MIDI C0 02
Rules: 
  gu=12
  gt=gt+gu
Outgoing: (none)

Translator 1.2: 
Options: stop=false
Incoming: MIDI 90 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp qq

Translator 1.3: 
Options: stop=false
Incoming: MIDI 80 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp 00
C. Transpose semitones

Code: Select all

Preset 2: TRANSPOSITION SEMITONES

Translator 2.0: 
Options: stop=true
Incoming: MIDI C0 07
Rules: 
  gd=-1
  gt=gt+gd
Outgoing: (none)

Translator 2.1: 
Options: stop=true
Incoming: MIDI C0 08
Rules: 
  gu=1
  gt=gt+gu
Outgoing: (none)

Translator 2.2: 
Options: stop=false
Incoming: MIDI 90 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp qq

Translator 2.3: 
Options: stop=false
Incoming: MIDI 80 pp qq
Rules: 
  pp=pp+gt
Outgoing: MIDI g0 pp 00

But here beggins the problem. To use in a more musical way my controller i've decided to remap the notes to an "isomorphic layout" using simple translators. In this case i remap my buttons as the layout that use the "Harpejji" instrument:
http://www.marcodi.com/product/overview
and
http://www.marcodi.com/harpejji.html
Then the problems comes!...i can't use the previous translators anymore and keep the remapped layout, whenever ive try to switch channel or transpose. In other words is easy to do this things with "real" or "hardware" inputs, but is hard to do or maybe impossible (for me) with remapped notes.

Well, not all is darkness. After a lot of trial and error, i could find a way to switch channels in a "transparent" way for the remapped layout. This are the translators:

Code: Select all

Preset 0: SWITCH MIDI CHANNELS

Translator 0.0: 
Options: stop=true
Incoming: MIDI C0 04
Rules: 
  g0=g0-1
  if g0<144 then g0=144
Outgoing: MIDI g0 pp 00

Translator 0.1:
Options: stop=true
Incoming: MIDI C0 05
Rules: 
  g0=g0+1
  if g0>159 then g0=159
Outgoing: MIDI g0 pp 00
The 00 value in outgoing message "silence" any sound whenever i press this button in my system. The g0 variable is also used in the "outgoing" section of the translators for the remapped layout (only the first notes are shown):

Code: Select all

Preset 7: Harpejji layout Remapping: Notes ON

Translator 7.0: 
Options: stop=false
Incoming: MIDI 90 24 qq
Rules: 
Outgoing: MIDI g0 38 qq

Translator 7.1: 
Options: stop=false
Incoming: MIDI 90 25 qq
Rules: 
Outgoing: MIDI g0 3a qq

Translator 7.2: 
Options: stop=false
Incoming: MIDI 90 26 qq
Rules: 
 
Outgoing: MIDI g0 3c qq

Translator 7.3: 
Options: stop=false
Incoming: MIDI 90 27 qq
Rules: 
Outgoing: MIDI g0 3e qq ...

Code: Select all

Preset 8: Harpejji layout Remapping: Notes OFF

Translator 8.0: 
Options: stop=false
Incoming: MIDI 80 24 qq
Rules: 
Outgoing: MIDI g0 38 00

Translator 8.1: 
Options: stop=false
Incoming: MIDI 80 25 qq
Rules: 
Outgoing: MIDI g0 3a 00

Translator 8.2: 
Options: stop=false
Incoming: MIDI 80 26 qq
Rules: 
Outgoing: MIDI g0 3c 00

Translator 8.3: 
Options: stop=false
Incoming: MIDI 80 27 qq
Rules: 
Outgoing: MIDI g0 3e 00...
This simple translators works flawlessly with the remapped layout, meaning that the layout is keep intact as i switch channels.

Then finally the question and specific help (sorry for this long post): i've give up trying to implement Octaves (and semitones) tranposition. I couldn't until now, to change octaves and keep intact the remapped notes layout....so the question is: is this really possible? and if the answer is yes, could someone give me a hand and help with some hints or examples?. I'll appreciate any help.
Thanks in advanced.

DvlsAdvct

2015-03-16 14:55:50

Hi Jagian

Sorry for the delay, I've been fighting the plague all weekend.

I'm just trying to understand the problem, so forgive me if I repeat a bunch of what you already said. This stuff is usually very complex and I just want to drill down to the core issues.

You want to be able to remap your controller's output by channel, and then octave, and then semitone. You got that sorted, but then when you implement this new layout, or try to implement it, you run into various issues, correct?

Jagian

2015-03-16 16:11:07

Hi DVLSADVCT:

Thanks for answer. Well, yes. I would like to remap my controller and after that, change MIDI Channel (i've resolved this point already), and transposing octaves (or semitones, etc). The problem that i can't resolved yet, is to transpose octaves (semitones is essentially easy if i can resolve octaves first). With the usual translators and rules i can't do this, because they interact with the "incoming" message i guess (the real MIDI input), and not with the "outgoing" message (the remapped note) that's is what i'm interested.
I've been experimenting but i couldn't figure out how to implement it correctly. Specifically the usual problem with Octaves transposition is to observe 2 notes sounding at the same time: the remapped (doesn't change pitch) and the original note ON/OFF changing octaves any time i press the button. I requesting your kind help, if is exist any possibility to do this? maybe not?....i know that you are truly experts and genius in this, and i hope that you can give any hints or maybe give some examples. Any help will be appreciated.
Have a nice day, and i'll be waiting your news.

DvlsAdvct

2015-03-16 16:25:53

Hi Jagian

So what you want to do is definitely doable. What we should do, though, is assign global variables effectively to make sure everything cross references as we want.

Following what you've started with, we're going to expand on it so it updates as you're intending. (let me know if anything I say doesn't make sense, since I'm still kind of hazy from this terrible plague)

So you have the channel set up correctly, assigning it the global variable g0. The problem we have is that octave and semitone are the same root, so we need to use the same final global variable, as you've intended, but we're going to use some slightly different math to get there. We are also going to create an extra preset at the end to listen for the incoming and outgoing note messages. Each preset is only going to listen for the program changes, and then the last preset will process all of the math correctly.

I need to do this with MT in front of me, so I won't be able to look until I get home. But what you want to do is have each preset handle all of the complicated math, and then have the final preset just handle the translation as appropriate, with the outgoing message being made up almost entirely of global variables (except the velocity). Does that make sense?

J

Jagian

2015-03-16 16:45:23

Hi DvlsAdvct:

All make sense until now...you describe exactly the problem. The only thing that i'm almost sure is as you said, i need to use the same g0 variable with MIDI channel and octaves transposition...but i can't realize myself, the additional settings to achieve the goal perfectly. So take the time, and i'll be waiting any news from you after you get home :))

And the beauty of this, is that anyone could use your "magics skills" with MT here, to implement his owns "isomorphic layouts" in the future.

Have a nice day.

DvlsAdvct

2015-03-16 17:14:29

Just a quick note, you want to use g0 for the channel/note type (maybe set g1 for note off) and then ga (as an example) for the note itself. I'll set it up when I get home. :)

J

Jagian

2015-03-16 17:23:20

OK:

I'll wait your news...meanwhile i'll keep thinking in the problem.

Thanks a lot.

DvlsAdvct

2015-03-17 00:16:22

Alright, so here we go.

What we are going to do is breaking everything up into individual presets, and then have all of our triggers handled in their own preset. We are going to add a core translator to the first Preset, for setting all of our global variables correctly. We are going to use a variable for channel (g0), octave (g1) and Semitone (g2) which will all be set differently. In the final preset they will be combined for translation. So, preset 1 is for Channel shifts.

Code: Select all

Translator 0.0: Variable Set
Options: stop=true
Incoming: Special - On Project Load
Rules:
  g0=144
  g1=0
  g2=0
Outgoing: None  

Translator 0.1: Channel Down
Options: stop=true
Incoming: MIDI C0 04
Rules: 
  g0=g0-1
  if g0<144 then g0=144
Outgoing: (none)

Translator 0.2: Channel Up
Options: stop=true
Incoming: MIDI C0 05
Rules: 
  g0=g0+1
  if g0>159 then g0=159
Outgoing: (none)
Then we are going to have Octave Shifts. We are going to have this move up and down starting from 0, which we set in that initial translator.

Code: Select all

Translator 1.0: Octave Down
Options: stop=true
Incoming: MIDI C0 01
Rules: 
  g1=g1-1
  if g1<-4 then g1=-4
Outgoing: (none)

Translator 1.1: Octave Up
Options: stop=true
Incoming: MIDI C0 02
Rules: 
  g1=g1+1
  if g1>4 then g1=4
Outgoing: (none)
So for this I'm arbitrarily limiting it at 4, since I figure it isn't going to move more than that, but feel free to expand or contrast that as needed. Then our third preset is going to be for semitone shifts.

Code: Select all

Translator 2.0: Semitone Down
Options: stop=true
Incoming: MIDI C0 07
Rules: 
  g2=g2-1
  if g2<-12 then g2=12
Outgoing: (none)

Translator 2.1: Semitone Down
Options: stop=true
Incoming: MIDI C0 08
Rules: 
  g2=g2+2
  if g2>12 then g2=12
Outgoing: (none)
So from here we will create a new translator to handle your incoming and outgoing messages. In the rules we are going to process all of the math so the outgoing message is exactly where you want it.

Code: Select all

Translator 3.0: Note On
Options: stop=true
Incoming: 90 pp qq
Rules:
  ga=g1*12
  gb=ga+g2
Outgoing: g0 gb qq

Translator 3.1: Note Off
Options: stop=true
Incoming 80 pp qq
Rules: 
  gc=g0-12
Outgoing: gc gb qq
Try this and let me know if it works. It might give you an issue with the Note Off if you change channels while holding notes down, but it should work otherwise. Let me know if that helps.
J

Jagian

2015-03-17 06:50:26

Hi:

Thanks for the update and the effort. I've sending to you a PM to discuss my testing results. Please check it out.
I'll be waiting your news.

Have a nice day.