Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Am I getting the right stuff for a foot controller?

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    7

    Am I getting the right stuff for a foot controller?

    Hi there,

    I'm looking to start building some midi controllers as a hobby. I'll first make a foot controller with 5 to 8 momentary switches, then I'll move on to something a bit more complex for sitting on the desk! I'll be using all of this from Presonus Studio One Pro v2 and Ableton Suite 9 (and perhaps Max/MSP in the future).

    1. I believe I'm looking for Teensy 3 - can you confirm based on what I'm doing?
    2. Am I correct that changing the USB type from the tools menu in Teensyduino can change the USB data to midi rather than serial? I read on a forum that it still send serial data in this case so a converter is required, but it looks to me like that would not be the case?
    3. It looks like I can connect up to 8 momentary switches (or other controllers) to a single Teensy 3 without further complexity - is that correct?
    4. Will these work with Teensy as expected? http://www.rapidonline.com/Electroni...switches-79208
    5. I'd like to program in C. I'm thinking all I need at this point is my C understanding and Teensyduino or Teensy loader to apply my code to the Teensy?
    6. Once plugged into a computer will it show up on its own 'usb port' / connection? Or if I plug in 2 will they show up as 2 separate ports?

    Lastly, I believe I need the following (including the materials for you online tutorials). Can you confirm if the following is correct:

    • 2 of Teensy 3 (1 pinned version to test / play with on the breadboard, the other non-pinned version for my controller)
    • 1 breadboard
    • The tutorial kit
    • 1 usb panel mount adaptor

    And final question (sorry) - how is the power supplied to he board? I can see no mention of how this should be done on the web site...

    Thanks very much for your time.

  2. #2
    Senior Member
    Join Date
    Aug 2013
    Location
    Gothenburg, Sweden
    Posts
    293
    Hi
    1) Yeah

    2) When you setup Teensy 3 to use MIDI USB its is 'true' MIDI USB, the device shows up as a MIDI USB device, a bit different depending on what OS you use, and not as a serial port so no extra adapter is needed. Technically all USB data is serial data but it will show up as a MIDO piort. If you want to send MIDI data over an old style DIN MIDI cable then the Teesny serial port can handle that, you just need a few resistors to interface to old style MIDI ports.


    3) You can connect up to 30 momentary switches if you connect nothing else, 8 is no problem.

    4) Its a switch is a switch is a switch. Should be no problem.

    5) Teensyduino is C with a light sprinkling of a few C++ objects.

    6) Plugging in two should show up as two different pairs of MIDI USB ports (havnt tested, but I have tested the MIDI)

    What to buy first depends a bit on mailing costs and such (It can be cheaper to by all at once, even if not all parts are used)

    Power over USB
    Last edited by mlu; 08-02-2013 at 07:19 PM.

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    7
    Thanks so much - that's awesome! Can't wait to order it now

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,169
    Quote Originally Posted by CitrusTree View Post
    [*]I believe I'm looking for Teensy 3 - can you confirm based on what I'm doing?
    Any of the currently available Teensy boards should work for this relatively simple project.

    Am I correct that changing the USB type from the tools menu in Teensyduino can change the USB data to midi rather than serial? I read on a forum that it still send serial data in this case so a converter is required, but it looks to me like that would not be the case?
    When you set Tools > USB Type to MIDI, Teensy will become a USB MIDI device when it runs your program. It will no longer be USB serial.

    However, it also emulates a serial device using a special HID interface. The result is you can still use Serial.print("useful info") and it will appear in the Arduino Serial Monitor (but not with non-Arduino software that requires a regular serial device or COM port). This works simultaneously with MIDI, so you can use Serial.print() intermixed with whatever MIDI stuff you're doing.

    You can also use the hardware serial ports. Teensy3 has 3 of these. They are all able to work independently and simultaneously. In theory, you could send MIDI message, Serial.print() through the USB to the Arduino Serial Monitor, and 3 separate streams of serial data on the 3 hardware serial ports... all at the same time. The one issue to be aware of is every output stream has limited buffering and finite bandwidth. If you send small messages at reasonable speeds, the buffers are more than adequate to keep your program from stalling (waiting for space in a buffer). Just avoid sending a huge chunk of data all at once on any port.

    To receive data data from those hardware serial ports, you'd need another serial device. Another Teensy running File > Examples > Teensy > USB_Serial > USB2Serial will work. There are also many TTL-level USB-serial products on the market, but most are about the same price as another Teensy board, but not nearly as useful because they can't be reused for other stuff.

    Will these work with Teensy as expected? http://www.rapidonline.com/Electroni...switches-79208
    This is a DPDT switch, which means it has 6 wires. Just use 2 that correspond to a normally open contact and do not bother connecting the other 4.

    I'd like to program in C. I'm thinking all I need at this point is my C understanding and Teensyduino or Teensy loader to apply my code to the Teensy?
    You'll need to use Arduino, which is really just C++ with some libraries to make things simpler.

    Start with the examples in File > Examples > Teensy > USB_MIDI.

    You can download Arduino and install Teensyduino before you buy anything. I would highly recommend you do so, and open that example code. Obviously you can't actually upload it to a board and run it, but at least you can read the example code and see what you'll be using as a starting point for the project. If you can make some sense from those examples, they you'll probably do fine.

    • 2 of Teensy 3 (1 pinned version to test / play with on the breadboard, the other non-pinned version for my controller)
    • 1 breadboard
    • The tutorial kit
    • 1 usb panel mount adaptor
    That looks good. Don't forget to buy a USB cable, unless you already have one of the correct type.

    And final question (sorry) - how is the power supplied to he board? I can see no mention of how this should be done on the web site...
    It gets power by USB.

    There are other options for powering, but using the USB power is the simplest and easiest way.

  5. #5
    Junior Member
    Join Date
    Aug 2013
    Posts
    7
    Thanks so much for this help. It's encouraging to know there will be support after I buy the products so I can learn more to build bigger and better stuff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •