Controlling what's being played via MIDI

Joined
Feb 14, 2022
Messages
35
Reaction score
11
I try to add a self-contained modulation control to the SP-5600 that is based on Arduino and a MIDI Shield. For now I've coded the Arduino to send Control Change 1 (modulation --> vibrato) and 11 (expression --> volume) on channel 1 by turning the knobs on the shield (planned to be replaced by an X/Y pad). That works fine (checked with a USB/MIDI adapter and MIDI-OX), and it also works on the SP somewhat, yet:

What I'm currently playing on the keyboard is sent out on channel 1, but that "part" of the synth engine doesn't listen for incoming MIDI data for what's being played. Rather, that goes to another synth "instance" that could have a different Voice. The picture shows my understanding of how it works.

I use the buttons on the MIDI Shield to trigger a few Note On/Off on channel 1, just as a test, and those are affected by Control Change, but again not what I play on the keyboard, which takes away the modulation possibility for that.

Anyone that knows a way to get around this?

I also noticed that while a USB cable is connected to the SP, geezer MIDI is ignored. I guess that's just how it is.
 

Attachments

  • Thomann SP-5600 MIDI control.png
    Thomann SP-5600 MIDI control.png
    36.8 KB · Views: 15
Last edited:

SeaGtGruff

I meant to play that note!
Moderator
Joined
Jun 6, 2014
Messages
4,107
Reaction score
1,734
If you want MIDI messages you're sending to the keyboard to affect the notes and sounds you're playing on the keyboard, you will probably need to send the MIDI messages generated by your playing from the keyboard to an external MIDI router, then send them back to the keyboard on the same channel as the other MIDI data you're sending to it. It has to do with "parts"-- the keyboard parts (typically the left-hand part or voice and the right-hand part or voice) versus the song parts (typically 16 different voices that are used to play MIDI song data).

Some keyboards let you assign specific MIDI IN channels to specific keyboard parts, such that (for example) channel 1 of the MIDI IN port might be sounded using the right-hand part's voice. But other keyboards are less sophisticated so you need to resort to MIDI routing to achieve the same sort of result.

Basically, you would turn off the keyboard's Local Control so it doesn't generate any sounds when you play its keys, effectively turning it into a MIDI keyboard controller.

Then you send the MIDI generated by your playing from the keyboard to some other MIDI device and send it back to the keyboard so it can be sounded by the keyboard as though it were a MIDI sound module. You can merge other MIDI data into the keyboard's MIDI data, such that the Modulation or Expression messages will affect the notes you're playing on the keyboard.

This might sound complicated, but it's actually very simple to do using a DAW on a computer, or certain types of MIDI boxes that can merge the MIDI from two different MIDI IN ports to a single MIDI OUT port.
 
Joined
Feb 14, 2022
Messages
35
Reaction score
11
I understand the process, and have used that before on a Korg synth, but AFAIK the line between the keyboard and the synth engine can't be cut in the SP-5600, unless...

There are controls for Upper1, Upper2 and Lower (volume) in the Mixer. If those are set to 0 it should mean that what's being played shouldn't be heard, even though it's still "synthesized". I don't think there's any way to cut the line completely though, unless the SP simply treats 0 as a complete cut. Not that it matters in practice, as there are 128 voices.

I'll program the Arduino to forward everything it receives as well as insert Control Change data. There's a delay of minimum 2 ms on the notes due to this, but maybe not noticeable. I might try using USB later to fix that.

Thanks for the advice.
 
Joined
Feb 14, 2022
Messages
35
Reaction score
11
When I change at least Upper1 to 0 in the Mixer the keyboard-generated sound is silenced, simulating a cut.

What I didn't expect was that it's sent as Channel Volume on MIDI while changing the value, so with my gizmo connected (and forwarding everything it receives) it also silences the second synth instance! That can be controlled by not allowing Channel Volume to get forwarded of course, so there's more work to be done, but in principle it works.

I also noted that as everything is forwarded, so are Program Changes and the settings that come with it (Reverb Volume, Chorus Volume etc), that then affect the second synth instance, as it should.

The Control Change messages my code generates are then inserted in the data without conflicting with the Thru feature and correctly affects the second instance.

And as you say, this way the SP can be used as a basic piano-style MIDI keyboard as well, as long as Channel Volume and possibly other things are filtered out.
 
Joined
Feb 14, 2022
Messages
35
Reaction score
11
Filtering out Channel Volume fixed it. Then I can also change Voice without volume going to 0.

A box with a couple of rotary encoders (or only one and selection switches) would be a neat solution for easy use during performances. That way the code could use the current setting of any Control (if those used CCs are sent from the SP) and add or subtract to it rather than use an absolute value.

(Well aware such devices exist already)
 

SeaGtGruff

I meant to play that note!
Moderator
Joined
Jun 6, 2014
Messages
4,107
Reaction score
1,734
I'm glad you grokked what I was saying and were able to run with it. :)

Some of the more expensive arranger and workstation keyboards have sophisticated MIDI settings that let you assign specific keyboard parts (like Upper1, Upper2, and Lower) or specific style parts (like Rhythm1, Rhythm2, Bass, Chord1, Chord2, and so on) to specific MIDI OUT channels, often including the ability to filter out specific types of outgoing MIDI messages.

They may also have MIDI settings for assigning specific MIDI IN channels to specific keyboard parts or style parts, as opposed to being sent to the song parts as they usually are, often including the ability to filter out specific types of incoming MIDI messages.

From what I've seen in some of the owner's manuals of older keyboard, those sorts of MIDI settings apparently used to be more common on less-expensive models, but over the years that sort of sophistication seems to have been removed from a lot of keyboard models, possibly to help save money or so system resources can be used for other things, or possibly because these days it's much easier to find external MIDI boxes that can act as sophisticated MIDI routers, MIDI filters, MIDI mergers, MIDI splitters, etc., such that companies perceive it as better to let advanced users supply their own external third-party solutions rather than trying to incorporate a lot of advanced MIDI options into their less-than-premium-tier keyboards. I don't know what the reasons are.

Anyway, regarding your Channel Volume workaround, have you looked at the keyboard's MIDI implementation chart to see if the keyboard is capable of responding to Local Control messages? Even if there is no function in the keyboard's menu system for turning Local Control on and off, it's possible that the keyboard might still be designed to recognize and respond to Local Control messages. If it does, you can try turning Local Control on and off via the messages you're sending to the keyboard. That way, you wouldn't have to do so much external filtering of messages. :)
 
Joined
Feb 14, 2022
Messages
35
Reaction score
11
Officially Local Control (CC 122) is not there, but I've now inserted "Local Control off" at the start of the code anyway to see if it works. I imagine that the SP4200 etc uses a modified synth engine found in more synth-like keyboards from Medeli, so it's not impossible it's there and much more. E.g. MK401 has a touchpad that can control the filter. That said, MK401 might use a newer synth engine.

Interestingly, when changing a Voice/Program it will send CCs that are not officially supported, but the synth engine acts on them (see a complete Program Change below; note e.g. attack and release time, as well as brightness (filter cut-off?); not resonance though), so I'm sure I haven't explored everything yet.

00070BA5 1 -- B0 63 32 1 --- CC: NRPN MSB
00070BB2 1 -- B0 62 0C 1 --- CC: NRPN LSB
00070BB2 1 -- B0 06 00 1 --- CC: Data Entry MSB
00070BB2 1 -- B0 00 79 1 --- CC: Bank MSB
00070BB2 1 -- B0 20 00 1 --- CC: Bank LSB
00070BB2 1 -- C0 15 -- 1 --- PC: Accordian
00070BB2 1 -- B0 4B 40 1 --- Control Change
00070BB2 1 -- B0 4C 40 1 --- Control Change
00070BB2 1 -- B0 4E 40 1 --- Control Change
00070BB3 1 -- B0 4D 40 1 --- Control Change
00070BB3 1 -- B0 5B 32 1 --- CC: Reverb Depth
00070BB3 1 -- B0 5D 40 1 --- CC: Chorus Depth
00070BB3 1 -- B0 4A 40 1 --- CC: Brightness
00070BB3 1 -- B0 49 40 1 --- CC: Attack Time
00070BB3 1 -- B0 48 40 1 --- CC: Release Time
00070BB3 1 -- B0 07 47 1 --- CC: Volume
 
Joined
Feb 14, 2022
Messages
35
Reaction score
11
CC 71 (resonance) and 74 (cut-off) work, so it's very likely all Medeli keyboards use the same synth engine (even though they mention a new one for the AKX10).

The buttons now control what the knobs are used for:
  • Left: Modulation/Pan (CC 1, 10)
  • Middle: Reverb depth, Chorus depth (CC 91, 93)
  • Right: Timbre/Resonance, Brightness/Filter cut-off (CC 71, 74) also the default
 

Attachments

  • DSC_0022 s.JPG
    DSC_0022 s.JPG
    107.2 KB · Views: 7
Last edited:
Joined
Feb 14, 2022
Messages
35
Reaction score
11
I can now read out values from a Nintendo DS touchpad (that I had) using the same CC configurations as mentioned earlier, and in parallel to using the knobs. I need to press quite hard for it to sense where I press. When I release it stops sending CCs.

Practical use would require a proper mechanical build, but at least the software does what it's supposed to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
13,995
Messages
86,232
Members
13,100
Latest member
Su_uh Innocent Nelson

Latest Threads

Top