DIY MIDI controller for the JD-Xi

Forum for the JD-Xi Keyboard.

DIY MIDI controller for the JD-Xi

Postby brakjoller » 22:45, 15 May 2016

Hi,

Yesterday I started up a small project at home with the aim of building a custom MIDI controller for my JD-Xi. If I ever get that far, I imagine it will end up being a bit similar to one of those Behringer MIDI controllers with a lot of knobs, but made to suit me and my JD-Xi :) Here's what I have right now:

Image

What you see is an Arduino Uno (or a compatible clone, actually) microcontroller, a breadboard, a few wires, a MIDI connector and some resistors. You cannot hear it through the image :), but it is actually playing a range of notes on the Xi, over and over again. All hard coded in the Arduino program (or sketch, as it is called). Of course, I am not going to send notes with it, it is just the first step to send more complex messages over the wire.

So why am I not just buying one of those Behringers then? Well, not sure, but I'm thinking that this I can get working exactly as I want it to, since I am controlling what it does. The next step is to experiment with sending some sysex or other complex MIDI messages that the MIDI implementation manual explains (I might post back here to get some hints on getting those messages correct, by the way, I have not yet understand how to "construct" them, with the manual as a guide). When I understand how that works I will add some buttons and knobs to turn, and perhaps a small display so that I can get some kind of "menu system" going. The Uno just has six analog inputs so six knobs will be the limit, unless I extend it some way (someone added some multiplexer to a similar project), so that is where the menu system will be needed, to switch "control banks" (there are digital inputs as well, to connect buttons to).

If I reach my end goal, I will have a small companion to the Xi that will let me reach deep into it and touch most of the interesting parameters with little effort, without having to attach the Xi to a proper computer. Let's see how far it goes. If it does not get further than what I have now, it will have been a fun experiment anyway... :) If someone has similar experiences, or tips on the sysex/MIDI messages part, don't hesitate to comment.

Now, wish me luck! :)

/Mathias
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden


Re: DIY MIDI controller for the JD-Xi

Postby gris » 15:12, 16 May 2016

Good Luck! :)

Wich six parameters vill you choose for the knobs?
gris
 
Posts: 33
Joined: 22:04, 18 January 2016

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 07:43, 17 May 2016

gris wrote:Good Luck! :)


Thanks! :)

gris wrote:Wich six parameters vill you choose for the knobs?


At first I will probably add an array of parameters, in batches of six. Then I can add two "arrow buttons" to switch back and forth between the different batches, or sets. Having only six fixed parameters on the knobs would be an enhancement to the Xi, but being able to switch between different sets of them will increase the usefulness even more.
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby arkham » 15:10, 21 May 2016

Cool project!! Will be checking in on this :) How much prior experience do you have of programming / electronics? Been thinking about getting into DIY synths and such for a while, and this was inspiring. Good luck and happy hacking :D
arkham
 
Posts: 3
Joined: 16:38, 23 April 2016

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 00:12, 22 May 2016

arkham wrote:Cool project!! Will be checking in on this :) How much prior experience do you have of programming / electronics? Been thinking about getting into DIY synths and such for a while, and this was inspiring. Good luck and happy hacking :D


Thanks! :) I have been programming computers since the late 80's but this is the first time I program a microcontroller like the Arduino. I have also fiddled with electronics a little bit in the past, at least so that I can handle a solder iron and things like that, but nothing more advanced than that. In fact, you do not need to solder anything to get up and running with this.

To get started, here is an excellent video tutorial on how to build your own MIDI controller:

https://www.youtube.com/watch?v=U9olJK3RYXg

That guide got me started, but once I got that up and running I am now mostly concentrating on learning how to encode the different MIDI messages. The basic stuff is simple (turning notes on/off, doing basic CC stuff), but right now I am struggling with the more advanced stuff from the Parameter Address Map section of the manual... When I know I can send all the messages I want, I will add more hardware (knobs and buttons) and eventually a case, if I don't tire before that :)
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby jay-mz » 05:59, 9 June 2016

awesome! im a fan of hardware controllers and if i can end up with a thousand knobs that control every aspect of this beautiful unit and not a PC in sight id be very happy - good luck man!
jay-mz
 
Posts: 25
Joined: 03:17, 8 March 2016

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 21:16, 9 June 2016

Hi all,

I thought I should post a small update on this. Things are progressing slowly but things are working well too :) It took some experimenting but I finally got sysex messages working, so now I can control any possible parameter on the Xi that it lets me control. I wish they would enable even more parameters though but I can at least tweak any kind of sound parameter that I can do via the menus, and perhaps more. Fortunately I can reuse some of the heavy work done by memorysplice, so I do not have to compile all sysex commands from scratch from the manual. Many thanks for that, @memorysplice!

I have just received on the mail a bunch of pots and knobs for those, and I have tested and got working one, at least. I can read the analog value of the pot and convert that to a 0-127 value range, which many of the MIDI parameters need.

One quite fun thing was to be able control the rate of the LFO by code. At some points it would generate interesting effects in that way. It was like having a LFO for the LFO :) Probably nothing I want to implement in the final controller, but a nice experiment. Similar things should be possible for other parameters as well. Pitch, ADSR, whatever...

The next step is to hook up more than one pot and have the program tweak the correct MIDI param as I turn each of the knobs. I already have working a small "algorithm" (it's really really basic) that notice when a pot value changes. Once that works I plan to implement some kind of "MIDI configuration banks" functionality, so that I can switch between different banks of controls. To make things simple I will try to cover all the analog synth parameters that supports sysex, which seems to be all of them. When it comes to the two digital parts things becomes messier, since each part have three partials and each partial has its own setting for each parameter.

I also bought a simple 4x3 keypad (like what you had on old DTMF-enabled phones at home), thinking it could be a compact way to switch banks and perhaps also input parameter values, or similar.

Soon I also have to start to think about what kind of enclosure I want and I guess there are many options for that...

/Mathias
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby jay-mz » 23:06, 9 June 2016

Well done man exciting stuff!
jay-mz
 
Posts: 25
Joined: 03:17, 8 March 2016

Re: DIY MIDI controller for the JD-Xi

Postby stejamtro101 » 11:24, 11 June 2016

Please, please try to implement this. I'd be interested in watching the development.
stejamtro101
 
Posts: 2
Joined: 11:13, 11 June 2016

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 22:59, 13 June 2016

Hi all, time for a small update again...

After playing with the user interface for a few days (meaning, to read the value from the pots and simulating switching parameters/commands using a single button) I decided to combine my earlier MIDI message experiments with the control stuff. I am pleased to announce that it works beautifully and more or less exactly as I planned :) (that doesn't happen often, so I'm quite happy with myself...)

Right now I have only four pots but I will extend that to six later on. I can already switch between different "banks" of parameters. Right now I have only eight parameters that I can control, in two banks, but that can be extended later on. To keep things simple I selected the amplitude ADSR parameters for the analog part as well as the ADSR for the analog filter. The latter does not seem to have any audible effect on the sound, at least not to my ears (and I know the parameters are affected) but the former works very well. Nice to be able to tweak the classic ADSR envelope stuff using physical knobs!

I recorded a small video of the little thing (I call it "MIDI Fly") in action, in case anyone is interested:

https://www.youtube.com/watch?v=kN3wBs4 ... e=youtu.be

I have more experimenting to do (trying out a keypad, as mentioned in the video description) but I really need to look into what kind of enclosure I want now. Perhaps I can strip some old piece of hardware I have lying around, and use that to begin with. It would feel nice to have the pots being secured in place.

Other ideas are to switch to an Arduino Nano (https://www.arduino.cc/en/Main/ArduinoBoardNano) instead of the UNO I use. Even though it is much smaller it actually has more analog inputs, which means I could add more pots - yay! One is already on its way all the way from China to Sweden... :)

/Mathias

PS. Here are some pictures as well:

The controller, powered by a small "power bank":

Image

Hooked up to the Xi:

Image

PPS. Oh, and the code that controls it all is well under 200 lines, including comments...

PPPS. Here is a link to a zoomed image of the project:

https://lh3.googleusercontent.com/ssqc4 ... 23-h979-no
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 22:12, 19 June 2016

Hi again,

The last few days I have been adding this keypad to my little project:

Image

There are a lot of guides on how to make it work together with an Arduino so it was not hard to get working. Mostly I had to do a lot of soldering and copying pieces of code from the net :)

My initial plan was to use the keypad as a quick way to select "banks" on my MIDI Fly. So, instead of having to do arrow left/right to switch banks, I could just input a number (single or multiple numbers) and it would switch to that bank. It would be very efficient, I think. I could let the Fly autoselect the bank after I have input the number, or I could require that the user press # or *. Either way would work.

Today I played around adding a small piezo speaker to the project and that turned out to be very fun. It was easy to add beeps in a certain frequency on different keypad inputs. The most simple was to play a short beep for each key input. Then I got thinking that the beeps could actually guide the user in some simple kind of menu system (at least unless I add a LCD display to the project, but we'll see about that). One could imagine that a certain number or # or * would let the user entere different "modes" in which the keypad would have different effects on the Fly. One mode could be to select banks, as mentioned above, another might be some way to control different parameters programatically, so to speak. For example, it might be fun to play with some mode that lets the user control how a certain parameter should change, automatically, over time, and things like that. I don't know how useful it would be, but my earlier experiments with code that controls the rate of the LFO was quite interesting. Perhaps that could be generalized into something the user could control? Controlling things like detune for different parts or partials might be cool as well. The possibilities are really endless, as long as you can figure out a clever and not too messy way to implement it, that is...

I also think how I can extend the number of analog inputs required to read the pots: use a multiplexer. I thought about it initially but for some reason did not think it would work, but now I am quite convinced that it will work. The plan is to use two multiplexer chips that has 8 inputs each. That should allow me to connect 16 pots to the Fly, using only two of the analog input pins on the Arduino UNO. Controlling the multiplexer require three digital pins though, but I have some over (the keypad uses 7 of the 13 digital pins and the MIDI communication uses one), so it should work. I could connect even more pots using more multiplexers (I did order a few extra, they are only a dollar each), but if I need a I2C-based LCD later on, that would need at least two analog pins, so... We'll see. Things are progressing, at any rate, and it's quite fun :)

This is how the little project looks right now:

Image

To make things easier to experiment with I have temporarily removed the MIDI communication stuff as well as the pots, but they will be added back later, of course.

By the way, I discussed the project with a friend and he suggested I build the box/enclosure such that it can be attached to the Xi in some way. I think it was a cool idea. Imagine having a row of 16 extra pots right there, on the backside of the Xi, to control it. It would be good to find a way that does not require any drilling. Perhaps velcro will work well, as it did for the battery...

Over and out!

/Mathias
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 15:15, 27 June 2016

Hi,

I think I can now safely conclude that a multiplexer will solve my analog input problem. I was able to add two multiplexer chips to the board and I can now read the values from 16 pots using only two analog pins on the Arduino. If needed, I can add more and the code is written so that it will make use of those more or less automatically. I have also seen that I can use the same three digital control pins on the Arduino to control all the multiplexers. In theory I could add at least two more multiplexers (for a total of 32 pots) without risking to "steal" analog input pins that might be needed for other things, like for example an I2C-based LCD display. And, let's not forget about the "banks" of settings I can switch between...

In this picture you can see the two multiplexer chips hooked up with two pots each (for testing only, my little board does not fit more):

Image

Happy happy, joy joy!

/Mathias
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 10:11, 8 July 2016

So, yesterday I decided to try to build all the stuff into some kind of box to see how that would work out. I had an old Netgear WiFi Router lying around, which I emptied. Here is the result:

Image

(the MIDI OUT port is on the top, not visible in this image)

It looks a bit ugly right now with the duct tape and all, but I messed up with the placement of the keypad so I cannot slide on the lid/side of the box. I will keep the tape there until I decide to screw it together properly. One good think with having the stuff in a box is that the pots are fixed and when I turn one it does not move the others, which happened earlier this week, affecting the pot readings.

So, things are looking pretty good :) I am still waiting for more pots to arrive from China and I have also ordered some cheap LCD displays to play with. For now I will concentrate again on the software and how I want to switch between banks of settings in the most efficient way. The keypad is really nice to have for different kinds of user input. You could use it to input numbers as numbers (values for certain messages), you could use it for executing "commands" and to switch banks. I am thinking of having it work in different "modes", so that it can have multiple uses. One mode could be to actually send values where the pots does not work or does not work as well as you would like to. One mode could be to select banks, one could be to... well, you get the idea.

Time to dig into the code again! :)
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Re: DIY MIDI controller for the JD-Xi

Postby stejamtro101 » 22:44, 10 August 2016

Brilliant job pal, keep it up and let us know the state of play.
stejamtro101
 
Posts: 2
Joined: 11:13, 11 June 2016

Re: DIY MIDI controller for the JD-Xi

Postby brakjoller » 09:38, 11 August 2016

stejamtro101 wrote:Brilliant job pal, keep it up and let us know the state of play.


Thanks! :)

I got the LCD by mail some time back and it worked out quite well. I can switch banks and the display shows what bank you have selected. When the user turns one of the pots, the display shows what parameter (say, filter cutoff) the user is affecting, and its value, and what bank he is currently in. I only have a 16x2 character LCD though, so there is very little space. I have ordered a 20x4 LCD as well, and that I think will be enough. Two extra lines (plus two chars per line extra) should be enough for a good "user interface", I think.

Right now I have only added the analog part parameters to the controller, since they are not that many. I have organized them in 8 banks. It feels quite good, actually. I switch banks with * and # (back and forth) or by entering the bank number directly. Works well. I am a bit worried that the number of banks will increase too much to be managable when I add all the parameters for the digital parts. The things is that each of the two digital parts have three partials, and each partial has its own parameter for, say, filter cutoff. So, imagine that I now have 8 banks for the analog part only. That will most probably add upp to 2 (digital parts) times 3 (partials) times 8 (because the digital parts have similar parameters as the analog part) = 48 banks, for the digital parts. And then I have not counted in that the digital parts have more parameters than the analog parts and I have also not counted in the drums. So, the challenge is to make it practical for the user to browse the banks. Entering the number for a bank will always work, so it is quick if the user knows what bank to activate. But the browsing, how to let the user discover each bank, is what will be cumbersome.

If anyone has comments on this it would be very helpful. Perhaps someone with more experience in using other synths menu systems has seen some system that works well? Because, that is basically what I am doing here, "lifting out" the sucky menu system in the JD-Xi and making it easier to access all parameters via the pots. I guess the main advantages are really:

1. Most values are nicer to tweak using a pot instead of the left/right of the menu system.
2. Since I have 8 pots I can change 8 parameters at the time, instead of only one. It works really nice for the ADSR params, for example. I could easily add at least 8 more pots but I feel it does not give that much more benefit, since it is hard to organize banks with 16 pots per bank.

Right now I am working on moving all the parts from the experimental/bread board to a strip board, where they are soldered, and thinking about a new enclosure that is not that crammed. And, I am constantly tweaking the software (I guess it should be called "firmware", but for me, being a software guys, it is just software...)

/Mathias
User avatar
brakjoller
 
Posts: 41
Joined: 11:33, 16 January 2016
Location: Gothenburg, Sweden

Next

Return to JD-Xi Keyboard

Who is online

Users browsing this forum: No registered users and 2 guests