We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Gerson Ardila Verjel • 2 years ago

hi cody, do you think it is possible to implement this with a conventional fader, a dc motor and a small bearing system to move the fader? Motorized faders are quite expensive on this side of the world. and if possible, would they be the same implications?

codyhazelwood • 2 years ago

Hi, it sort of is, but it would be a lot more difficult. You couldn't pass audio through it, because you'd need to use the resistor part of the fader to measure the fader's position. The main issue would be that you wouldn't have a touch track to know that you need to shut the motors off when the fader is being touched. I'm not sure if there would be a way around that or not.

The Scientist • 4 years ago

Good day Coby ,Have you ever used the ATA6836C-TIQW I2c motor driver in a midi controller ? to avoid using too many digital out pins
https://www.mouser.com/data...

Please contact me to talk about a paid project
thescientistdubmaster@gmail.com

codyhazelwood • 4 years ago

Hi The Scientist,

Based on the spec sheet you attached and my (limited) understanding of these electronics, I don't think it would work. That chip is a "half-bridge" which is distinct from an "h-bridge". I think a half-bridge will only move the motor in one direction, where an h-bridge will move it in both directions.

There is a PWM driver chip from Texas Instruments that I experimented with. I think something like that would work. It acts as a shift register, but can provide different pulse-widths per pin. You could use one of those to control the h-bridges, but I think you still need one h-bridge per motor.

Léo piontek • 7 years ago

Hello Cody,
congrat for your awsome job!
I tried to make my own with your code but coding is new for me... I have some issues with the new library.
Can you or somone give me the older once?
Thanks

NadeemRajesh • 7 years ago

Hi Cody,

Can you explain how can I test the code using Hairless midiserial

codyhazelwood • 7 years ago

Sorry, but I haven’t used that library. It should be fairly similar, except you won’t need the MIDI library or pins that are used in my code.

Jonathan • 7 years ago

Hey Cody,
Do you think it would be possible to use one arduino nano, or so, for a channelstrip with for example One Motor Fader, 3 non motorized potis, 4 Buttons and maybe an led array(may need a bigger controller) and then connect several of thoos channel strips to a master controller over i2c or so and the master talks to the DAW or will the latencys be to big?
If this would work my plan would be to make a 19" rack build out of it with 10 channelstrips and maybe one day if I want to, I would have the possibilety to extend this.
Sorry for my bad writing.

codyhazelwood • 7 years ago

It’s definitely possible to do that. I don’t think you’d have latency issues as long as the code is written well. As far as the LEDs go, there are some chips you can use to make that easier (and it will use less pins to drive the circuit).

Sebastian Coudijzer • 7 years ago

Hello Cody,
FIrst of all thanks for this awesome work!
I want to try make one motorized fader whit arduino.
I loaded you code. only one problem... I downloaded the capsens libery but its been updated by arduino the new name is CapacitiveSensor so it doesn't work in the code anymore...Do you know any solution to this ? Thanks allot !!!!

codyhazelwood • 7 years ago

Hi Sebastian, sorry, but I haven't had time to look into updating the code sample with the new library. Some other people have mentioned in the comments that they got it to work, but no one has posted updated code. If you want to work on updating it and submit a PR to GitHub, feel free, and I'll break out my Arduino and try to do a bit of testing and merge it.

Sebastian Coudijzer • 7 years ago

Hello! I finally got the fader to work. By the usb port if arduino. I have some issues. The fader sometimes jumps around after i toutched it. Also when i select mackie control the fader works fine but when a click play button it stops immidiatly... an off note a#6 is received directtely when I click the play button of my daw (fl studio) did you have this sort of issues? Thanks allot Cody!

codyhazelwood • 7 years ago

Nice job! I didn't notice those issues myself. You might want to play with the padding here: https://github.com/codyhaze.... Try changing the 10 to something larger. That can vary based on your power supply and the stability of it. You can also try adding some capacitors (small values) to smooth out any noise that might be causing the faders to jitter.

Sebastian Coudijzer • 7 years ago

Hi back,
Thank you for the fast answer! I’m really novice to coding so I wil try my best to replace capsense.h by capacitivesensor.h ... 😛 any suggestions for how I can do it best? Thanks!

Marcos Profes • 7 years ago

Hey Cody! Awesome work!
I've been planing to make a midi table mixer with arduino uno to control DAW for a while now, but as I'm not someone that understands much about coding, etc, I was going to use non-motorized faders. But, now I guess I could upgrade and use the motorized ones. So, do you think is possible to make one with 4 or 5 faders (due to the amount of analog ports of arduino) and a few other push buttons to automation that uses only the usb connection of arduino to the computer (no midi phisical port)? Also, would you be whiling to help me along the way?? Many thanks!!

codyhazelwood • 7 years ago

It's certainly possible to do with one Arduino, but you'd need some extra hardware to drive that many faders (2 PWM pins per fader are needed to control the H-Bridge). I would definitely try doing just one fader first, and once you get that working, move up to 2 faders, then 4.

You could do 4-5 non-motorized faders fairly easily with no external hardware, since you would just need 4-5 analog pins, +V and GND.

It is possible to re-flash the USB controller in the Arduino to use its USB interface as a MIDI controller, but I haven't done this myself. Note that once you do that, you can't upload firmware changes without flashing it back.

I'll answer questions where I can, but it's been a while since I finished this project. Good luck!

Marcos Profes • 7 years ago

It's true about the non-motorized faders...that was my plan until I found your info. But with non-motorized faders I'll probably have to deal with jumps in the DAW due to the real position of the fader and the software fader. If there is a workaround that I would be fine with those.

I could use a single one and having a push button to change the banks... this could work as well. Then I would need only one H-bridge. But instead of using the midi port...could I use the solution that he describes in his video?

https://youtu.be/6ex-j_NPVEs

I know it is for non-motorized faders, but I guess it could work and then I don't need re-flashing the USB controller, right?

Many thanks for the help!!

codyhazelwood • 7 years ago

Yes I think the method he describes in the video should work. Nice find!

Using 1 fader with buttons to change channels definitely works (and the code to do that is included here).

If you use non-motorized faders, one idea to keep the faders from jumping would be to not send messages to the DAW until the fader crosses the previous value. So basically, you'd have to move the fader to the previous value before it started to move on the screen. I believe the PreSonus Studio Live does something similar (but with an LED to show the position).

Marcos Profes • 7 years ago

Good news! So, I can apply this code directly and should work? Do I need to calibrate anything?

What if I want to add more buttons, so I can configure in the DAW later. How should I change the code for that? (Sorry, I'm a biologist with coding aspirations... lol )

About the jumping, how can I code the faders to not send the message until reached the previous value? Is there any way?

Lastly, which H-Bridge do you recommend? So I can keep the same specs.

Many thanks again!!
Marcos

Joe Below • 8 years ago

After automation is recorded in the DAW and played back the fader will move accordingly?

codyhazelwood • 8 years ago

Yes, it will.

AWind • 9 years ago

Dear Cody!
I liked this MIDI control, but it is built on the other controllers (not Arduino). It's difficult for me.
http://www.midibox.org/midi...

I want to build a MIDI-controller console with motorized faders on 32 channels (not once, but gradually) to control the DAW. I think to use Mackie protocol.
I have two major initial questions:
1. Is it possible to use a Teensy 3.2 in your example project? If possible, is it better to use a controller: Arduino Due or Teensy 3.2?
2. I want to build on two indicators for each channel: peak LED and arrow VU. Will I be able to receive MIDI-data on the volume level for the indicator, using the Mackie protocol (not to fade, namely for the indicator)? If it is possible, in which direction to look for a solution?
Please help in the beginning. I would make at least one channel.
Thank you! Yours faithfully, Alexander.

codyhazelwood • 9 years ago

Hi Alexander,

Sure a Teensy 3.2 could work. As far as which one is better, you'll have to look at the specs and compare them.

I don't see a way to show the peak LED and VU meter with basic HUI control (the protocol I used). You may need to look at the full Mackie Control with SysEx Messages over MIDI. I decided not to do it at the time.

This link should help:
http://web.archive.org/web/...

- Cody

Moti Elbilya • 8 years ago

HI Cody ,
Great blog !

The VU Meter can be implemented by Channel after touch messages.
The mackie VU meter consist of 12 leds.
The message is:
Channel : 1 (0xD0)
Data1: xy (x - the channel , y - the VU value in the range of 0x00-0x0C).
Data2: empty.
for example : When the value is 7 turn on 7 LEDs , can be simply implemented with two shift registers.

Your code is great for basic implementation, but as you mentioned in order to achieve faster response you will need to remove those digitalWrite for the H-Bridge and go more low level addressing , control the motor VIA PWM for close values , and also use an external ADC chip to get more precise reading resolution.

As for AWind question.
I've fully Implemented and built a 24 channels mackie controller with 3 teensy 3.6 (and a network of 6 arduinos for each) , so , it's possible , but not with one MCU , since it can't handle mutliple tasks at once.

Cheers ! :)

Daniel Cunningham • 9 years ago

Hi Cody! This is great. I was wondering if you have any experience with usbMIDI and how these Serial.write messages might translate? I'm using teensy's LC.

codyhazelwood • 9 years ago

Hi Daniel, I've never used USB MIDI on one of my own projects, although I've owned a keyboard that used it. Your `Serial.write` messages shouldn't change at all. On the Arduino, you can replace the USB chipset's firmware with some that makes the USB connection of the Arduino show up as an HID compliant device - that can pass MIDI. It will still pass through the serial information to the Arduino's micro controller in the same way. I've never used it before though, so let me know how it goes!

Leo Seewald • 9 years ago

Hey Cody!
Pretty awesome Blog you got there!
I'm trying to build a small MIDI controller with Fader control for my studio!
I just have a problem with the MIDI I/O: I get a MIDI signal if i touch the Fader but it seems there is no signal/info if i move the fader.. i just used your code for figuring it out..
Now my question: How did u set up the Fader/Pushbuttons in Cubase and is this code the latest (working) version?

cheers, Leo!

codyhazelwood • 9 years ago

Hi Leo, I picked Mackie HUI in Cubase when I was using the project. I implemented the code based on the HUI spec, so it should work with no configuration. This code is the latest version, and it worked when I completed the project a couple of years ago. I know the Capsense library was upgraded, and it's possible that it broke the code. Try taking out the references to to touch and see if it starts to work. If so, you'll need to update the code to handle the new Capsense API.

Jay R • 9 years ago

Hi Cody, I would love to make a midi control motorized fader just like yours ! with the option to change channels on a daw (logic) and possibly the addition of buttons to play/pause & forward/rewind & mute & solo ! Im considering this for my university undergraduate major project (I study Audio Engineering). Would you be willing to help me ?

codyhazelwood • 9 years ago

Jay, I will answer any questions you have as I have a chance to get to them. Just post them on here. Your project shouldn't be too difficult - just follow the Mackie HUI spec to add the additional buttons. Good luck!

Jay R • 9 years ago

Hey Cody ! Hope your well. How long did it take you to build your controller ? & in your opinion do you think it would be a good final project ? Im curious as to whether ill be able to write enough about the controller and its building process (roughly around 10,000 words)

codyhazelwood • 9 years ago

Jay, It depends on your major, I would think. I would expect this to be a project for a Computer Engineering student (as it requires writing firmware and working with circuitry). I did this as a final project for a micro-controller class (Computer Science). It wasn't a large project and I didn't have to write a paper. I think if you add the buttons and then rewrite my Arduino code to add PID control for the fader (so it runs smoother), then it should be a good final project.

Jay R • 9 years ago

ok ! Thanks for the advice !

Jay R • 9 years ago

Great ! Thanks ! Where can i find the Mackie HUI spec ?

codyhazelwood • 9 years ago
Jay R • 9 years ago

Thank you !

Raúl Moller Jensen • 10 years ago

Hi Cody, how are you? Im traying to do an 8 motorized faders controller for Pro Tools. How many motorized faders can i connect to an Arduino One? Are you using pwm? If you can update your post with more information i will be gratefull. Thanks.

codyhazelwood • 10 years ago

Hi Raúl. You can connect hundreds of faders to an Arduino, but it takes some work. I would recommend that you first follow this project and do one fader. Once you have it working and are comfortable with it, you can add a multiplexer to scan through and read the values from each of the faders, and you can add a PWM driver to control the H-Bridges for each fader. I did use PWM to control the speed of the fader, but I used the H-Bridge to control the direction and braking.

Lee • 10 years ago

Hi Cody
I'm finding that my motor faders are jumping around when they are released.
The amount varies, and sometimes in both directions. Setup is as per my previous post.

Have you seen this at all? Do you have any ideas what could prevent it?

Thanks

codyhazelwood • 10 years ago

I did a project soon after this one where I occasionally saw issues with the power supply causing faders to jump around. I would check to make sure your power supply is providing enough power for all of the faders and that the power provided is fairly smooth.

Another issue could be that the faders are moving too fast and overshooting the position they should be stopping in. Try playing with the padding (currently 10 in the updateFader function) and making the numbers larger. Really, that function should have been implemented using a PID algorithm that slows the motor down or stops it early when approaching the target value.

Kyle Sunderland • 3 years ago

Sorry to pull this out from the dust... but I was wondered how you'd add
in a PID algorithm. If using a motor driver like the L293D, how do you
vary the voltage from an arduino to slowly bring it to a stop?

codyhazelwood • 3 years ago

To vary the voltage, you could use PWM (similar to dimming LEDs with the Arduino). For adding in PID - I would take a look at a prebuilt library like: https://www.arduino.cc/refe.... It would take some work to add it in to my example code, but it should be doable.

Sorry I don't have more specifics - it's been quite a while since I've thought about this project. :)

Lee • 10 years ago

Hi Cody. I'm trying to get multiple fader channels working with Apple Logic Pro X. Logic seems to send out MIDI E0/XX/XX regardless of which fader is moved on screen. Not E1, E2, etc. for each of the 8 faders. Can you help please?

codyhazelwood • 10 years ago

I'm not extremely familiar with Logic Pro. Have you selected Mackie HUI Control as the midi controller? It sounds like what you have selected may be sending out sysex packets, which my example code doesn't attempt to parse.

Lee • 10 years ago

Thanks for the quick reply Cody

I tried Baby HUI, HUI and HUI strips only (all 3 use the ‘HUI’ module) with no joy.
Currently I use Mackie Control which uses the ‘Logic Control’ module. This seems to work best for my setup.
If I want to monitor all MIDI messages reliably, is there a good program to use. Or maybe an Arduino sketch? Hopefully then I can find out what the messaging is.

codyhazelwood • 10 years ago

I found this app to be really useful when I was doing development:
http://www.snoize.com/MIDIM...

It looks like it offers sysex message parsing as well.

I'm not completely sure what you're working on, but if you're using a prebuilt control surface, Mackie Control will definitely offer better support than the HUI stuff. This motorized fader project was programmed using the parameters from HUI, so that I wouldn't have to emulate the full Mackie Control protocol (heartbeats, message buffering/parsing, etc).

Lee • 10 years ago

I'll try the suggested app and post when I find out what's going on...

Luke • 10 years ago

Hi Cody, is it possible to alter the code and have mod wheel messages (cc1) or expression data (cc11) controlled by the fader? When playing back a midi part that already has mod wheel data, will this be reflected in the motorised fader? And can I write mod wheel data, while recording a midi part, with the motorised fader? Just want to know if this is actually possible. Cheers

codyhazelwood • 10 years ago

Yes, it's definitely possible (and probably pretty easy) to modify the code to control the mod wheel or expression data. As far as playback goes, it depends on the DAW, but the code could support it. The main thing you have to do is change the MIDI channel and input type to match your controller.

Daniel Basulto • 11 years ago

Can someone rig 24 of these together and I will pay you for parts and labor. I want to build a 'Control 24" type control surface for Pro Tools. If you can attach 2 buttons above each fader and a knob for Panning.