DIY MIDI controllers: Difference between revisions

From Helpful
Jump to navigation Jump to search
m (Helpful moved page GameTrak notes to DIY MIDI controllers)
mNo edit summary
Line 1: Line 1:
=In theory=
My approach here
* You make a device speak MIDI
* You connect MIDI to the computer
* You tell a DAW (=software for music people) to listen to MIDI and make sounds in response
:: ...and to alter those sounds. In a musical sense, parameters and effects and other processing cannot be underestimated here.
:: yes, you can go without a PC, but it's often more work
MIDI was a classic in "let's separate the input method from the sound generation".
MIDI sends notes, yes - any pushbutton can be a note trigger.
: Yet piano-style keyboards have that down, and velocity sensitive triggering is pretty cheaper to buy than to make, and that means of expression is great to have
MIDI ''also'' sends parameters -- "amount of ''something''
On a MIDI keyboard, that may only be the modulation wheel (and the pitch bend, but that is special-cased)
The interesting part is that DAWs tend to let you use that to control anything that ''remotely'' looks like a knob in software.
Also, you can have a ''lot'' more than just one.
The limiting factor becomes 'what do you ''do'' with all these parameters.
Creativity's the limit, but also, it really helps if this stays somewhat intuitive.
'''Okay, but how?'''
Any potentiometer (like a volume knob), or slider, can be a parameter.
Maybe you use a joystick to, say, control a low-pass filter in one direction, and volume in another.
You will probably end up spending a bunch of time configuring what signal should go where.
You sort of have the same problem as in modular synths -- except that in software,
those wires aren't even visible. Most software won't draw them because while it would be nice and visual
in theory, there are often just ''too many things''.
There are some conveniences worth mentioning in this context.
===Further notes===
DAWs can be expensive -- but don't have to be
:: I would recommend you start for free or cheap, until you know this is a Serious Hobby. Yes, you will have to relearn if you switch later, but it saves a bunch
::: There are pricy choices like Ableton, FL Studio, that cost a few hundred bucks. Their refinement ends up being worth it for many professional musicians, but overkill if you are going to use 1% of its functionality
::: There are "get you hooked" editions of the pricy ones, that tend to do enough
::: There are paid-but-cheaper choices that do more than enough, like Reaper or MuLab
::: There are even free choices, like Cantabile
: I have used Cantabile for the drumkit, because it needs _nothing_ more than getting MIDI to a drum plugin.
: I chose MuLab for somewhat-more-complex fiddling, primarily for 'not the expensive one' reasons.
: That is not endorsement
: That is not a complete list - do your research (...but don't get lost in it)
'''MIDI (over cables or not) is not the only thing in town.'''
: networking is an option, and WiFi is ''viable'' for a number of things
: a USB game controllers sidesteps MIDI -- though have to be specifically supported by the DAW (many do)
Also take a look at a Beardyman performance
: those touchscreen are mostly parameters -- but often groups of functionality, like "I want a dry drop so do X to the drum channel, Y to the pad channel, take the reverb off the voice channel"
:: point is that '''there can be intuitive value to an inbetween that changes simple input into more complex things'''
: I believe that setup speaks [[OSC]] -- which is less of a musical and more of a technical choice
:: it makes it easier to do that over things that are ''not'' a mess of MIDI or USB cables
:: it means he can get a some information back, e.g. volume levels, timing within a measure  (MIDI is mostly one-way)
===This can get a ''little'' more technical===
====Making devices that spit out MIDI====
It's data, so you need something that speaks data.
It's something you make, so you probably want it to be programmable.
That means we are in the area of [[microcontrollers]].
You will need ''some'' programming skills, but this is well within the realm
of 'there are tutorials about this'.
If you have a friend who likes to say 'arduino', talk to them.
This may be a fun project for them too.
There are broadly two choices:
* Serial MIDI - is a serial port, every microcontroller has those, and ''most'' can be told to speak MIDI
:: This lets you make devices compatible with anything from MIDI's first decades
:: and lets you connect it to a PC with a USB-MIDI adapter
* USB-MIDI - if a microcontroller natively speaks USB, chances are it can be - which to a PC It will be recognized as 'a MIDI thing' without dirvers (because MIDI is part of the USB spec)
:: lets you feed it into a PC DAW more directly
:: ...but not to separate MIDI devices, you will need to route MIDI to a cable with a USB-MIDI adapter
====MIDI and routing====
'''MIDI was classically a single chain of things.'''
You wouldn't think it, but that means "how do I get MIDI from one program to another" is a good question, because
It makes sense, because it's like having two sets of instruments on two different loops connected to different PCs.
But
: where the ''physical wire'' variant of that makes that an obvious thing to rethink,
: the 'everything is virtual inside your PC' variant needs a bit of a mental model of why - like the cables - what you're doing is a little wird.
That duct tape absolutely exists, and is free, but you have to know about it.
: (note that duct tape is functionally like the hardware duct tape: MIDI splitters and joiners)
==More practically==
==MIDI mapping in various DAWs==
TODO
=Some devices=
==GameTrak notes==
===Intro===
===Intro===
[[Image:GameTrak rev1 modified for MIDI.jpg|thumb|300px|right|Gametrak rev1 modified for [[MIDI]] (and CV)]]
[[Image:GameTrak rev1 modified for MIDI.jpg|thumb|300px|right|Gametrak rev1 modified for [[MIDI]] (and CV)]]

Revision as of 10:50, 12 April 2024

In theory

My approach here

  • You make a device speak MIDI
  • You connect MIDI to the computer
  • You tell a DAW (=software for music people) to listen to MIDI and make sounds in response
...and to alter those sounds. In a musical sense, parameters and effects and other processing cannot be underestimated here.
yes, you can go without a PC, but it's often more work


MIDI was a classic in "let's separate the input method from the sound generation".


MIDI sends notes, yes - any pushbutton can be a note trigger.

Yet piano-style keyboards have that down, and velocity sensitive triggering is pretty cheaper to buy than to make, and that means of expression is great to have


MIDI also sends parameters -- "amount of something

On a MIDI keyboard, that may only be the modulation wheel (and the pitch bend, but that is special-cased)

The interesting part is that DAWs tend to let you use that to control anything that remotely looks like a knob in software.

Also, you can have a lot more than just one.


The limiting factor becomes 'what do you do with all these parameters.

Creativity's the limit, but also, it really helps if this stays somewhat intuitive.


Okay, but how?

Any potentiometer (like a volume knob), or slider, can be a parameter.

Maybe you use a joystick to, say, control a low-pass filter in one direction, and volume in another.


You will probably end up spending a bunch of time configuring what signal should go where.

You sort of have the same problem as in modular synths -- except that in software, those wires aren't even visible. Most software won't draw them because while it would be nice and visual in theory, there are often just too many things.


There are some conveniences worth mentioning in this context.


Further notes

DAWs can be expensive -- but don't have to be

I would recommend you start for free or cheap, until you know this is a Serious Hobby. Yes, you will have to relearn if you switch later, but it saves a bunch
There are pricy choices like Ableton, FL Studio, that cost a few hundred bucks. Their refinement ends up being worth it for many professional musicians, but overkill if you are going to use 1% of its functionality
There are "get you hooked" editions of the pricy ones, that tend to do enough
There are paid-but-cheaper choices that do more than enough, like Reaper or MuLab
There are even free choices, like Cantabile
I have used Cantabile for the drumkit, because it needs _nothing_ more than getting MIDI to a drum plugin.
I chose MuLab for somewhat-more-complex fiddling, primarily for 'not the expensive one' reasons.
That is not endorsement
That is not a complete list - do your research (...but don't get lost in it)


MIDI (over cables or not) is not the only thing in town.

networking is an option, and WiFi is viable for a number of things
a USB game controllers sidesteps MIDI -- though have to be specifically supported by the DAW (many do)

Also take a look at a Beardyman performance

those touchscreen are mostly parameters -- but often groups of functionality, like "I want a dry drop so do X to the drum channel, Y to the pad channel, take the reverb off the voice channel"
point is that there can be intuitive value to an inbetween that changes simple input into more complex things
I believe that setup speaks OSC -- which is less of a musical and more of a technical choice
it makes it easier to do that over things that are not a mess of MIDI or USB cables
it means he can get a some information back, e.g. volume levels, timing within a measure (MIDI is mostly one-way)


This can get a little more technical

Making devices that spit out MIDI

It's data, so you need something that speaks data.

It's something you make, so you probably want it to be programmable.

That means we are in the area of microcontrollers.

You will need some programming skills, but this is well within the realm of 'there are tutorials about this'.

If you have a friend who likes to say 'arduino', talk to them. This may be a fun project for them too.


There are broadly two choices:

  • Serial MIDI - is a serial port, every microcontroller has those, and most can be told to speak MIDI
This lets you make devices compatible with anything from MIDI's first decades
and lets you connect it to a PC with a USB-MIDI adapter
  • USB-MIDI - if a microcontroller natively speaks USB, chances are it can be - which to a PC It will be recognized as 'a MIDI thing' without dirvers (because MIDI is part of the USB spec)
lets you feed it into a PC DAW more directly
...but not to separate MIDI devices, you will need to route MIDI to a cable with a USB-MIDI adapter


MIDI and routing

MIDI was classically a single chain of things.

You wouldn't think it, but that means "how do I get MIDI from one program to another" is a good question, because


It makes sense, because it's like having two sets of instruments on two different loops connected to different PCs. But

where the physical wire variant of that makes that an obvious thing to rethink,
the 'everything is virtual inside your PC' variant needs a bit of a mental model of why - like the cables - what you're doing is a little wird.

That duct tape absolutely exists, and is free, but you have to know about it.

(note that duct tape is functionally like the hardware duct tape: MIDI splitters and joiners)


More practically

MIDI mapping in various DAWs

TODO



Some devices

GameTrak notes

Intro

Gametrak rev1 modified for MIDI (and CV)

GameTrak is a motion controller originally designed for Playstation 2 - where it seemed to have gotten support from two games ever -- and later also supported PC and Xbox.

Judging by a youtube search, these days half of its uses seem to be DIYing it for other purposes, primarily music - take a look at videos like

Game Trak Theory
Ge Wang: The DIY orchestra of the future
Line of voice and string -for Game-trak controller, Kyma system.

See also:


"How does it work?"?

Think of a gamepad joystick. Now remove the thing that makes it return to center. Also, drill a hole in the middle and run a string through, which will move that joystick. Also, put that wire on a (spring-returning) spool that also rotates a potentiometer to tell you how far out it is.


Gametrak internals

This "patented mechanical system for tracking position of physical elements in three-dimensional space in real time"?

Three 5kOhm potentiometers. Times two, it has two.

That's entirely it for measurement.

All other components are on a board that measures the potentiometers and presents it as a joystick-like interface. There's also an input for a - wait for it - pushbutton.

Oh, and a chunky weight that keeps the thing on the floor.




Board

rev2 board, with the markings of what to bridge for PC and Xbox

The IC on the board is epoxy-blob'd, so presumably custom.

While PS2, PC, and XBox variants all look the same and are all connected through USB, they are not quite interchangeable out of the box.

Some revisions can be easily tweaked, others not.


Board revisions

All boards are USB, so all are detected fine on a PC (name, HID, layout).

...but Rev 1 is PS2-only will in that it will not seem to output any values on PC. (I've always assumed such incompatibility between game consoles was intentional, and at data level rather than USB level. That may be wrong.).

....while Rev 2 can be bridged for PS2, Xbox, and PC - it's even silkscreened as such.


They probably developed it for PS2 initially, then decided they wanted to release it for other platforms.


Interfacing one with software

If

  • you like joystick input to software, and
  • you have a rev2 GameTrak

then you take a few minutes to solder-bridge it for PC, and you're done.


Most music production software allows joystick input some way or other, be it

any DAWs that has a module that takes joystick-like input,
or software like ChucK or Kyma or Max.


If you have a rev1 GameTrak, it's just made for PS2s.

It still presents as a joystick, but it's just odd enough that it won't work.

It's presumably possible to create a PS2-gametrak-specific driver to deal with the different format, but not really a convenient solution in that most platforms do not make custom drivers very easy to use (and it being USB HID does not actually make that any easier).


So for me this became a DIY project instead:

Your own hardware

The potmeters are all 5kOhm, so putting them across Vcc and Gnd is fine (dissipates 1mA each at 5V).

Wiring the wiper (middle pin) to an ADC doesn't even really need any extra components.


You want

  • some board with an ADC that muxes to at least 6 pins (because six pots)
most arduinos, various other microcontrollers (but not RP2040 (RPi Pico)), other
  • something that will fit in there
e.g. arduino micro and nano, RP2040 (RPi Pico), other

And may prefer:

  • preferably something that can speak USB, so you can get it to speak USB-MIDI
e.g. arduino leonardo, micro; RP2040 (RPi Pico), other


I only had a nano lying around, so made one with a DIN MIDI output instead of USB-MIDI.


Which means the electronics work is little more than wires - barely even any resistors or such.

My version is little more than a bunch of cutting, soldering, heat-shrinking, and hotsnotting down the Arduino.


You can go a more custom if you want. For example, this project made a PCB (for a PIC microcontroller) and the same sized board and the same sockets as the original, so that you don't even need to cut anything.

There's a number of similar projects and plans you can find around.


The things you may want to plan up front:

  • how and where to fasten the microcontroller (there is not a lot of space)
  • tension relief on the cable you have/add
  • and how to expose the USB
  • what you want to output - serial MIDI, USB-MIDI, CV, or such.
I went for
serial MIDI because I didn't have a ATmega8U2 style board on hand
and prepared for CV
could be PWM-based (but you would probably want to filter that)
could even be basically (buffered, voltage-divided and possibly shifted versions of) the pot outputs themselves



If you're just controlling parameters, you might just want to output most or all axes to CC, so that you can decide on the DAW end what to do with it.


If you want it to play something more directly, you will need it to make more decisions. Say, I wanted it to be more of an instrument that doesn't need heavy DAW-internal mapping, so experimented with

  • one side controlling
    • which note is being played (remembered for next note trigger)
    • which scale to quantizing to (remembered for next note trigger)
    • pitch bending (sent as CC)
  • the other side
    • triggering notes pluck-style (sent as NoteOn), or violin-bowomg-style (sent as CC)
    • have otherwise unused axes send CC


It turns out that imitating motions of a real instrument makes a lot more intuitive sense than six degrees of freedom that do seemingly arbitrary things.