Jump to content

Master Keyboard MidiRouter Transpose


majjam

Recommended Posts

Hello midibox community,

I am working on a concept for a master keyboard router.

The master keyboard should be routed to predefined midi outs (1-4).
Each target can be transposed indiviually by an adjusted value. (octave up/down ; sem up down ,  Setting shown in the corresponding display)
Each target  can be enabled / disabled  individually. (ONOFF button )

Unfortunately i cannot find any transpose function for the router targets within the scripting documentation. Or do i have to alter the source for this functionality ?
Could somebody give me a hint where to search for any transpose settings?(I only found it for CV values.)

Attached you 'll find a scetch of my setup.

Many thanks

Max

 

 

 

 

 

 

Router.png

Link to comment
Share on other sites

Thanks FantomXR for your response.

If i understood right kb_transpose  is for a directly to a Midibox connected keyboard. I want to use a alreay miditized-keyboard with the router functionality of Midibox.

I think i will hack the midi_router.c MIDI_ROUTER_Receive(mios32_midi_port_t port, mios32_midi_package_t midi_package) to my needs or hook me into APP_NotifyReceivedEvent.

Lets see how this works. Unfortunately i don't see any way to implement my idea into TKs nice scripting framework.

So will be more a bad hack than something i can give back  to the community.

Wish me luck ;)

 

 

 

 

 

Link to comment
Share on other sites

Hallo Community,

I started to change the source code towards my needs and thanks to the nicely written software structure the progress better than i thought.
If you want to know what i am doing have a look to my first request.This is a short explanation and a reminder for myself.

So far I added 4 new MetaEvents :

Event commands:

1   RouterTranspose  = > Sets the transposition to an absolute value (offset is -64 ) means a value of 64 is no transpose
2   RouterIncTranspose => increases the transpose value
3   RouterDecTranspose => decreases the transpose value
4   RouterSetDstChn  => set the dst channel of a router node

usage :

type=Meta meta=E_CMD:x
Where x is the node number and E_CMD is the Event commands

NGC Example  :

EVENT_BUTTON id=4  hw_id=4  type=Meta meta=RouterIncTranspose:1 button_mode=OnOnly range=0:12
EVENT_BUTTON id=3  hw_id=3  type=Meta meta=RouterDecTranspose:2 button_mode=OnOnly range=0:6
EVENT_ENC id=1 hw_id=1 type=Meta meta=RouterTranspose:0 meta=RouterTranspose:1 meta=RouterTranspose:2 label="^std_enc" range=0:127 offset=-64 value=64
EVENT_BUTTON id=5 hw_id=5   type=Meta  meta=RouterSetDstChn:0  button_mode=Toggle range=0:17 lcd_pos=1:1:1  label="^std_btn"

Button 4 increases the midi notes of node1 target port by 1 Octave (12 Semitones)
Button 3 decreases the midi notes of node2 target port by 1/2 Octave (6 Semitones)
ENCODER: 1 Sets nodes 0-2 to the same transpose value (stored within the encoder)
Button 5 activates/deactivates the router node. (Channel 0 = off ; channel 17 = all Channels are forwarded)

The Problem :
If you hold a key and change the transpose or channel setting, the release event(NoteOff/Velocity=0) will end up on the wrong note/channel. (the tone hangs)
Solution :
I had to remember every NoteOnEvent and alter the forwarded package of each NoteOff to the corresponding note number (instead of the actual settings)
It is working very well and i hadn't any issues so far.
At the moment max 64 notes per node can be memorized (adjustable by define)
The costs are very high: RAM consumption  3bytes * 16nodes * 64 events > 3072 Bytes of Ram usage

ToDo:
Make a switch to disable this feature.

 

 

 

 

 


 

 

 

Edited by majjam
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...