majjam Posted July 20, 2017 Report Posted July 20, 2017 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
FantomXR Posted July 20, 2017 Report Posted July 20, 2017 You can transpose the keyboard with using the bank-mechanism and the kb_transpose-function (see NGC manual). Actually I don't see a comfortable way doing what you are after...
majjam Posted July 24, 2017 Author Report Posted July 24, 2017 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 ;)
majjam Posted July 29, 2017 Author Report Posted July 29, 2017 (edited) 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 transpose2 RouterIncTranspose => increases the transpose value3 RouterDecTranspose => decreases the transpose value4 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 July 29, 2017 by majjam
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now