Old 09-20-2019, 09:46 PM   #1
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default DIY MIDI device

G'day all.
So i have an idea and seen as i can't find anything that suits what i am after i have had the thought of making my own MIDI device.

Currently i am using the Nektar Panorama T6 and love it but there is a few things it can't do (probably can i just haven't figured out how to do it)
Toggling track arm is one thing i need and a foot switch for running a custom action for toggling record at the next marker.

What i am thinking of doing is having 8 buttons for toggling track arm for 8 separate tracks at a time.
Two button for cycling through 8 tracks at a time. Example tracks 1 to 8, press a button and now able to select tracks 9 to 16, press button again and go up to the next bank of tracks or press the other button and go back a bank of 8 tracks.
Above each button would be a 3 digit led with the track number on it and an led showing if the track is armed or not.
Also have a jack on it so i can plug in a foot switch.

Thinking of using the Arduino Teensy for doing this.

Has anyone else done their own MIDI controller or think that what i am thinking of is possible?
Robbie Hogg is offline   Reply With Quote
Old 09-20-2019, 10:09 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

I suppose you don't want to use plain old 5-pin Midi, but Midi over USB.

I have a decent background engineering embedded devices with USB interface, but I did not do a Midi over USB device yet, just did some research on that.

In this forums, there has been a discussion on the Teensy, so this supposedly is a viable way to go.

I mostly used PIC32 chips for designing USB gadgets. This definitively is a good way to design Midi over USB gadgets. There are lots of development boards by Microchip with these chips. This is a more "professional" world then Arduino, providing appropriate pros and cons.

For doing a low count of devices or for providing a much more advanced performance using Linux enabled hardware such as one of the BeagleBone or RaspberryPi variants provides a very advanced and "standard" (i.e. not delicately "deeply embedded") software infrastructure.

-Michael
mschnell is offline   Reply With Quote
Old 09-20-2019, 10:37 PM   #3
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

I should have probably said that it will be MIDI over usb.

I have been thinking about it for a while, did some searches and there seems to be a fair bit of info available in the Teensy board and have seen a few Youtube videos of MIDI devices being built with it.
Also saw one of the most insane sequencers built around the Teensy, just today on Youtube by someone on this forum.
https://www.youtube.com/watch?v=IH-grgRmClY

Will have a look into the boards you have suggested.

Also have a Raspberry Pi so i will look into a MIDI device using that as well, though from memory people were suggesting that the Arduino was a better option then the Pi.

Also have my Pi setup as a retro gaming unit at the moment. Don't think i'm ready to give that up at the moment.

Thanks Michael
Robbie Hogg is offline   Reply With Quote
Old 09-20-2019, 11:04 PM   #4
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

It's possible with Teensy, I did it with Arduino...



__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-21-2019, 01:09 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Robbie Hogg View Post
Also have a Raspberry Pi ...
The advantage of a Linux system is that you can use a lot of different programming languages (e.g. Python) instead of just C, and that you can use a standard native IDE by simply connecting Monitor Mouse and Keyboard for the development.

And in the end you even can run Reaper on the device ...

-Michael
mschnell is offline   Reply With Quote
Old 09-21-2019, 04:02 AM   #6
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

@karbomusic:
Nice work man. Was it pretty easy to do all the coding and setup for use with Reaper?

@Michael:
I will have a bit more of a look into it, been doing some more reading and it looks like the Pi Zero can be setup as a native MIDI device.

Would love to see any pics or videos of home made MIDI devices if anyone else feels like sharing.
Robbie Hogg is offline   Reply With Quote
Old 09-21-2019, 04:13 AM   #7
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by Robbie Hogg View Post
@karbomusic:
Nice work man. Was it pretty easy to do all the coding and setup for use with Reaper?
Not really other than dealing with getting the code working well for endless encoders. I ended up posting on GitHub..

https://github.com/karbomusic/ThreeKnobMIDI
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-21-2019, 04:19 AM   #8
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

Will have a look at the code and see how much is involved.
Thanks for sharing.
Robbie Hogg is offline   Reply With Quote
Old 09-21-2019, 04:53 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Robbie Hogg View Post
looks like the Pi Zero can be setup as a native MIDI device..
I am pretty sure that all PIs do feature USB "OTG" hardware that allows for being configured as well as host as as device.

I am pretty sure that Debian Linux provides Midi drivers as well as host as as device.

-Michael
mschnell is offline   Reply With Quote
Old 09-21-2019, 12:25 PM   #10
cyrano
Human being with feelings
 
cyrano's Avatar
 
Join Date: Jun 2011
Location: Belgium
Posts: 5,246
Default

MIDI latency:

Mac: 5 ms
iPhone: 9.8 ms
Arduino: 11 ms
Arduino to Raspberry: 19.8 ms
Bela: 0.5 ms

What's Bela?

Bela is a Beaglebone Black clone, developed by Queen Mary University of London, UK. See:

https://bela.io/

I've just found this late thursday night, but it looks very promising. Open source, 2 audio in, 2 out, 16 digital IO, 8 analog IO, support for Pure Data, SuperCollider, FAUST, and Csound. And more.
__________________
In a time of deceit telling the truth is a revolutionary act.
George Orwell
cyrano is offline   Reply With Quote
Old 09-21-2019, 02:45 PM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Looks very promising !
-Michael
mschnell is offline   Reply With Quote
Old 09-21-2019, 03:36 PM   #12
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

That Bela looks interesting but for what i am after looks a bit pricey and the latency of the Arduino or Pi should be fine.
I basically just need to be able to toggle track arm on and off and have a foot switch for punching in and out.
If it was for a keyboard or pad type setup than i could see the benefit of using the Bela.
Robbie Hogg is offline   Reply With Quote
Old 09-21-2019, 10:42 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

The Pi may work but I think it is overkill for what you want to do. I've worked with both heavily since 2014 (I probably have 20 or 30 of both lying around in and out of service). If I can get the job done without an OS in my way, I use the Arduino because there is so much less crap between me and the hardware and the code you write on a micro controller IS the OS.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 09-22-2019, 12:36 AM   #14
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by Robbie Hogg View Post
Also saw one of the most insane sequencers built around the Teensy, just today on Youtube by someone on this forum.
https://www.youtube.com/watch?v=IH-grgRmClY
That's my build, thanks for the compliment

Especially for MIDI over USB the Teensy is an excellent choice because it can present itself as a class compliant MIDI device with up to 16 virtual ports.
To get an idea of the programming involved you can download and install the Arduino IDE and the Teensyduino add-on and have a look at the USB MIDI examples.
Connecting the buttons is trivial but not so for the displays. You need modules or drivers that can be daisy-chained and it would also be handy if there's an Arduino library to control them. For example, the MAX7219 and MAX7221 are easy to use driver chips. The power consumption of the displays could be an issue because 24 digits can draw more power than a standard USB port can provide.
What are your plans with regards to the enclosure and type of buttons?
Gerrit is offline   Reply With Quote
Old 09-22-2019, 01:50 AM   #15
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

At the moment it's still very much an idea in my head, haven't done any sketches yet. Was seeing if what i wanted to do was possible first.

Am thinking a rectangular box with a 6.5mm mono jack at one end for the foot switch to start off with. For buttons i am thinking initially just simple arcade style buttons or possibly illuminated buttons that would light up if a track is armed.

Am very new to the world of Arduino and programming micro computers but have done some programming years ago with Blitz3d, a basic type of language. I should be able to get my head around it.

Cheers for the info, i will take a look at the MIDI examples.

When you say driver chips are they addons to the Teensy board or separate boards?

Well done with your sequencer too. How long did that take you to build?
Robbie Hogg is offline   Reply With Quote
Old 09-22-2019, 02:57 AM   #16
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by Robbie Hogg View Post

When you say driver chips are they addons to the Teensy board or separate boards?

Well done with your sequencer too. How long did that take you to build?
These are not specifically add on boards to the Teensy but rather general boards containing displays and the chip needed to drive them. It could prove difficult to find 3 digit displays and you might need to resort to creating your own implementation using the MAX chips mentioned earlier.

The sequencer took well over a year to build starting with the motorised fader control to see if it was feasible at all. I also had to learn how to design printed circuit boards because a project this size cannot be build successfully using stripboard. It's well worth the effort to learn how to design PCBs, even for a project of limited size. The actual build will be much easier and there's much less risk of errors. Of course this assumes that the schematic is correct and correctly entered in the design software.
Gerrit is offline   Reply With Quote
Old 09-22-2019, 03:28 AM   #17
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Gerrit View Post
Especially for MIDI over USB the Teensy is an excellent choice because it can present itself as a class compliant MIDI device with up to 16 virtual ports.
That is perfectly nice but it's just software and not at all depending on the hardware. It should be doable with any board that provides an USB OTG socket.

-Michael
mschnell is offline   Reply With Quote
Old 09-22-2019, 03:34 AM   #18
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

Ok, yep just had a look at the chips, makes sense now.
I thought they may have been like an addon board similar to the bits and pieces i have seen available for the Raspberry Pi.

Now i know it can be done i will start doing some rough sketches and see what i can come up with.

Was chatting with someone over on the Arduino forums and i am thinking the hardest part is going to be when i get to the passing Reaper info to the device so i can get the track info and arm toggle for that specific track.
Just opened up Reaper before to have a look and there doesn't seem to be a MIDI learn option for specific tracks although there is the option with custom actions to be able to arm said track number.

Does your sequencer collect info from Reaper or does it purely just send out MIDI notes and values?
Robbie Hogg is offline   Reply With Quote
Old 09-23-2019, 02:16 AM   #19
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by mschnell View Post
That is perfectly nice but it's just software and not at all depending on the hardware. It should be doable with any board that provides an USB OTG socket.

-Michael
Sure it is possible to do this with other boards but the whole point of the Teensy is to take care of the really low level stuff for you. The Teensyduino install also contains a lot of really useful libraries for creating hardware controllers.

Quote:
Was chatting with someone over on the Arduino forums and i am thinking the hardest part is going to be when i get to the passing Reaper info to the device so i can get the track info and arm toggle for that specific track.
Just opened up Reaper before to have a look and there doesn't seem to be a MIDI learn option for specific tracks although there is the option with custom actions to be able to arm said track number.
To get track info from Reaper you could emulate a Mackie Control. I used this approach for my controller before I switched to using OSC in stead of MIDI.
The code for the MIDI controller is linked in this post in the thread on the motorfader panel. Getting at the track info takes some doing because of the way the Mackie protocol works. Because I now use OSC for my controller I'm not really up to speed as to what options there are to get track data over MIDI.
My sequencer just receives note events for transposing and step recording, no track info. The OSC controller receives detailed track info, see this thread on the Teensy forum.
Gerrit is offline   Reply With Quote
Old 09-23-2019, 07:52 AM   #20
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Gerrit View Post
whole point of the Teensy is to take care of the really low level stuff for you. The Teensyduino ...
This is what Linux drivers do, as well.
-Michael
mschnell is offline   Reply With Quote
Old 09-23-2019, 07:54 AM   #21
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Gerrit View Post
To get track info from Reaper you could emulate a Mackie Control.
This is a viable option when using just the Reaper stock distribution.

If using the CSI Reaper extension, you can use any Midi messages and define their relation to the Reaper internals by appropriate configuration files.
-Michael
mschnell is offline   Reply With Quote
Old 09-23-2019, 12:03 PM   #22
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

Thanks guys will check it all out.
Will have a look into the Reaper CSI extension.
Think it's time to order a few supplies and get the project started.
Robbie Hogg is offline   Reply With Quote
Old 09-24-2019, 02:32 AM   #23
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

Thank you every one for your help but i just received an email today from Nektar saying that one of the modes on the T6 is actually a generic MIDI, i didn't realize this and can apparently set up that mode to pretty much do what i am after.
Still can't cycle through banks like i wanted but can cycle through individual tracks and arm them as i go or assign buttons through custom actions to arm the tracks i want.
I still might make a custom MIDI interface further down the track but for now the T6 should do me for a while.
Robbie Hogg is offline   Reply With Quote
Old 09-24-2019, 01:03 PM   #24
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Robbie Hogg View Post
Still can't cycle through banks like i wanted
Supposedly the CSI plugin will be able to make that happen.

-Michael
mschnell is offline   Reply With Quote
Old 09-25-2019, 03:06 AM   #25
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

Ok, yeah wow.
I will check it out.
Is this it? https://forum.cockos.com/showthread.php?t=183143
Robbie Hogg is offline   Reply With Quote
Old 09-25-2019, 07:04 AM   #26
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Robbie Hogg View Post
Yep unfortunately a huge thread, and information hard to find. At best you append a message with a question.

-Michael
mschnell is offline   Reply With Quote
Old 09-27-2019, 12:09 AM   #27
Robbie Hogg
Human being with feelings
 
Join Date: Jan 2017
Location: Australia
Posts: 50
Default

No worries,
Cheers.
Robbie Hogg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.