Teensyduino
Page 1 of 7 12345 ... LastLast
Results 1 to 10 of 68

Thread: Teensyduino

  1. #1

    Default Teensyduino

    So here's the deal,

    I had been running my midi controller on the arduino using code from http://www.instructables.com/id/Arca...DI-Controller/ and it was awesome. However, I had the arduino on the side and all ugly looking so i got a teensy++. With this there is more expandability and usb to midi instead of serial, but also a little confusion. I'm not new to arduino like programing but for some reason midi has got me stumped.

    My big question is if anyone out there has used the teensyduino for usb midi, i'm not looking for someone to write the code for me just to help explain how to set it all up.

    Here is what the makers of teensyduino give to run with:
    http://pjrc.com/teensy/td_midi.html
    with no examples.

    This is what i have for reading one of the buttons, i still need that channel, but i'm not sure what that is lol.

    Code:
    if (digitalRead(PIN_D3)) {
        
      } else {
        usbMIDI.sendNoteOn(60, 127, 
      }
    oh and the buttons are on pull-up resistors (low is pressed, high is released)

    Thanks a lot of any help!

  2. #2
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    The channel is just the midi channel you want to send the message on... Channels 1-16 are available...

  3. #3

    Default

    well don't i feel stupid lol.

    Thanks, do you know about any of the things that need to be included in the setup, right now i just have defining all the inputs as pull-ups

    Code:
    void setup()
    {
      pinMode(PIN_D3, INPUT_PULLUP);
      pinMode(PIN_D4, INPUT_PULLUP);
      pinMode(PIN_D5, INPUT_PULLUP);
      pinMode(PIN_D6, INPUT_PULLUP);
      pinMode(PIN_D7, INPUT_PULLUP);
      pinMode(PIN_E0, INPUT_PULLUP);
      pinMode(PIN_E1, INPUT_PULLUP);
      pinMode(PIN_C0, INPUT_PULLUP);
      pinMode(PIN_C1, INPUT_PULLUP);
      pinMode(PIN_C2, INPUT_PULLUP);
      pinMode(PIN_C3, INPUT_PULLUP);
      pinMode(PIN_C4, INPUT_PULLUP);
    }

  4. #4
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    If your code works on an arduino... it should work perfectly on the teensy... just substitute the old midi code with the new usbmidi code...

  5. #5

    Default

    honestly, the code i've been using confuses the hell out of me.

    like i said i got it off instructables, so i've never really had to fiddle with it. However i did try just using the teensy as serial with this program and it still wouldn't work correctly. for example analog wouldn't work at all and pin 6 wouldn't work, i think it has something to do with teensys led on that pin.

    I wouldn't mind if i still had to use serial, as long as i can get it to work.

    if you have any insight i would greatly appricate it.

    http://www.instructables.com/id/Arca...7/Programming/

    The code is a download on the link if you wouldn't mind looking.

  6. #6
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    I'll look in a bit... i'm currently recording (or attempting to record) a 10 min mix... but for now try getting your previous code to work as is on the teensy... assuming that is possible, then it should be a simple matter of swapping out the code that deals with sending midi messages.

  7. #7

    Default

    thanks a lot.

    any ideas why, some of the pins aren't working right?

    and good luck getting that mix done!

  8. #8
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    Upon first glance, that code is very well written... its certainly a good starting point...

  9. #9

    Default

    That it is, I've been trying to break it up so I can understand it and understand why the teensy is having trouble with it.

  10. #10
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    what problems are you facing exactly? It may be as simple as changing the pin assignments...

Page 1 of 7 12345 ... LastLast

Tags for this Thread

Posting Permissions

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