Essentially what I’m making here is a Analog-Synth-Inspired Stand/MIdi-Controller for my Korg R3, and while I have a decent bit of it Figured out, and Planned, I’m a bit lost on how to acbieve a certain level of functionality.
Context: Arduino based (UNO R3) / Minimal programming knowledge, using this project to learn.
The issue: While I’ve mostly figured out sending CC’s to the Korg R3, I haven’t quite quite figured out how to ‘Probe’ the KorgR3 to ‘get’ the value of a Property/Setting. (Ex. Filter1 Cutoff is set to 127, this is CC#74 on MIDI Channel 1, I want the Arduino to Get that value, so it can comapare against [various stuff].
Info: The KorgR3 has this sort-of ‘value lock’ where the Value can;t be changed by it’s own Knobs until the ‘arrow’ on the Knob lines up with the already Saved value, and then it Catches it, and can adjust. I want to try to emulate this function.
The only way that I can think is if the Korg has some public facing sysex implementation that you can trigger via MIDI then read in the Arduino.
upon checking I don’t see any sysex documentation for the R3. Best bet might just be to use the midi controller itself as patch storage for the synth and send out a “bang” to change all the relevant CCs upon program change. That means that the Korg itself will always be on patch 1 (or whatever number you choose), and your Arduino will need EEPROM or an SD card to store the patches. The 24LC256 is a neat little i2c EEPROM chip that I’m currently using. There are bigger and smaller ones too.
if you go this route, make sure to add a slight delay when sending out whole patches worth of CC values. There’s no set size for serial buffers on synths, and overflowing the buffer with a ton of CCs may cause the synth to freak out. Sending messages slower, or in batches at a time, lets the MCU in the synth clear the serial buffer first.
Aye, so other than changing the whole scope of the project, it’s a no? That’s disheartening. I doubt I could managed to basically creat my won custom database. That’s way outside my wheelhouse.
It’s doable, even for a novice, because the first Arduino projects I ever did was a MIDI controller with patch storage. It took me a long time because I’m a very slow learner, and I should have done a little more pre-planning, but if you’re already sending MIDI CC’s via Arduino, you’re 75% of the way there. At that point it’s just pushing bytes around.
Just a lil encouragement in case Plan A didn’t work out ;). Synth DIY is just an endless string of learning leading to more possibilities, and a bunch of problem solving.
The Korg may also send the MIDI CC’s that is being changed. I think on my Minilogue, turning the cutoff knob sends its respective CC. You may be able to work with that.
I honestly don’t have the resources to make such a large shift to the project, and while I could get them, it doesn’t pan out with what my goals were. I really appreciate actually getting a helpful reply, though.
I’m gonna sit on this for a bit I suppose, but it may end up a dead project like all the others rofl. I always end up with gear that can’t do what I hoped. I do appreciate the vote of confidence, but not being able to use the R3 built in patch loading is a deal breaker for this whole thing. I wanted to Expand the tools, not replace them.
I get it. On the road to successful projects, are many ‘temporarily on long hiatus’ ones lol. This will be my last post of encouragement as not to be like overwhelming or anything.
If you google “Korg R3 sysex”, you’ll see some people who have made some diy software for their R3s, all relating to interpreting sysex messages. I didn’t find anyone directly posting Korg R3 sysex specs or anything, but it does tell me that people have figured it out. You’ll find some very useful and unexpected stuff in the bowels of google searches.
I’d jump on a few different forums like Modwiggler, Gearspace, maybe even the official Korg forum, make a post about the project generally (in case someone has an idea that doesn’t involve sysex messages), but add that sysex could be the key in case someone knows anything about the spec.
What your asking for is implemented in the TSynth and I stole it for some of my projects so that when the slider passes the current value it “picksup” that value and starts changing. Have a look at some of my github projects, one I know has it implemented is the OB-SX editor.
I took a look at your code, and I have to be honest.. I barely understand any of what I’m seeing. Perhaps the scope of this project is too ambitious for me at this stage. I’ve already begun re-direct how I’m ‘Expanding’ the R3 to something simpler. (Basically no Arduino, on account of sucking at programming right now)
I managed to grasp getChannel(); getData1(); and getData2(); via setHandleControlChange); which is great! This means I can actually reference the values to some degree. I just need to get a MIDI device to send out the values of a specific CC channel, without control change.
As I understand it.. CC isn’t sent ot constantly, so I’d need to ‘fake’ a CC change somehow?. I had an idea to send a Control change into the R3 via my cusom controls, but the R3 doesn’t send out a “I’ve experienced a Control Change!” message unless I use it’s own controls.
Something like this imaginary line of code
**
MIDI.getData1(74,1); - Where it grabs Data1 of CC 74 on Channel 1 and outputs it..**
anyways that’s where I stand currently. Minimal headway, but something at least.
Hi, as we’re all on the same journey most of us have been where you are now, struggling to balance a limited knowledge and experience with our vision we have for a finished project.
For me, my breakthrough moment with Arduino was reading a book called Arduino for Musicians.
Didn’t think there’d be a book on this topic, but sadly that’s.. A bit costly lol (nearly 80$ CAD, but suppose I couldn’t check some second-hand book shops. Thanks for the info (and positive reinforcement!)
I had no idea it’d be so costly. Keep an eye out on eBay or Amazon where used copies appear, ask your library (if you have one) or see if a PDF or Ebook version is available somewhere. The Art of Electronics is another superb book with a huge pricetag and for a while I used my local library (which has an ebook service) to read an ebook version until a saved search on eBay let me get a battered but legible copy for a fiver. Nothing beats a real book for me and re-covering the tatty binding with wallpaper took me back to my primary school days.
I very much doubt if you can probe the R3 for properties of values, what you could do is request a program dump from the R3, this will be shown in the MIDI implementation guide, lots of Korgs support patch dump messages, when you receive the sys ex dump you can decode it to get the values out and place them into your editor values.
This is one of the ways to keep the synth and editor in sync, I go around it in a slightly different way, I make the editor the master of the synth so I just send patches to the synth each time I want a new sound, this ensures the editor is always in sync with the sound in the synth. Other wise there is no way of knowing. I wrote an editor for the Korg DW6000 that can do this that is in my github pages.
Have a look at the sysex implementation on how to request a dump, the format of the dump and how to pull these values out, Korg are very sneaky and to save data they combine multiple values in a byte, so for example you have 7 possible bits in a sysex byte x0000000 and you could receive x1110111 which maybe two actual values in the one received byte. A Sysex Data byte can only be 0-127, as anything over would be a command and not data, so anything that needs to be 128 or more is transmitted as two bytes if that makes sense and you need to add these together as an MSB and LSB to get the real value.
It does have some info, but I really don’t understand it. This looks like Alien language to me rofl
This is what I see in the Docs.
HEX: 40 | CURRENT PROGRAM DATA DUMP | *4: R,D,Me
I made assumptions on how it works, suck as “MIDI.sendSysEx(40, 4);” and have a handler I assume would pick up on any SysEx return, but nada. Scuse my idiocy if the solution is obvious.
Not quite, you need a header to tell the R3 the message is for it, Sysex is difficult to follow, but at least you dont have to calculate checksums for Korgs. A message usually is built like this…
F0: exclusive status
42: Korg ID
3n: [n=0–F] MIDI channel
58: R3 model ID
ff: function ID (type of message) —
F7: end of exclusive
As I said, look at the header I create in my DW6000 editor to request a dump etc
Yeah, this is where my Dylexia kicks into overdrive. I really don’t understand any of that code (I looked through a lot more than I probably needed to). It looks like scribbles on a wall to me, other than a few words here and there. I’ve spent the last day trying to research and understand this stuff, but it’s not clicking. I see a lot of math being used, and misc code I don’t understand, and I feel far more than I did when I started this project.
You can see in the DW6000.ino file that I created 3 arrays of between 7 and 8 chars depending on what they were being used for and named them.
Each array is then populated with the sysex header required for the DW6000, the R3 would replace the DW model in those arrays.
I know what part of the array is used for the data, so I can update the bytes I want say in the parameter edit array and send that to the DW and the parameter will change.
The Dump request is standard and will not change, so define the array as a dump request and fire it at the R3 and it should respond with a sysex dump of the current patch with the sysex header and x amount of bytes and the sysex tail.
I see that, but I still don’t actually understand how to make of any of that. I appreciate pointing things out, but I have no idea how it’s actually used. I know what an array is, generally speaking, but yeah.
An array is just a drawer full of data, simplist type is a 1 dimensional array of x bytes defined as
byte dumpRequest[7];
Creates a 7 byte array called dumpRequest
Each cell in the array can be filled with data like this
dumpRequest[0] = 0xF0;
This loads a hex value of F0 into the first position of the array, F0 is the start byte of a Sysex message
dumpRequest[1] = 0x42;
This loads the manufacturer ID 42 (Korg) into the second cell of the array
Build the array with what you need for your R3 and then send the array to the R3 from the midi port if your editor, if you connect the midi out of your R3 to a computer and run MidiOx or pocket MIDI you should see the data coming from the R3 to the computer, then you know your command is working.
If I survive tonight’s onslaught of drones and missiles I can probably work out the dump request and how to send it just to place in the setup of your sketch to dump the memory