Teensyduino - Page 7
Page 7 of 7 FirstFirst ... 34567
Results 61 to 68 of 68

Thread: Teensyduino

  1. #61

    Default

    Hey all,

    I recently have a hole bunch of spare time on my hands so if anyone needs help building their controller, or if you've given up and want someone to build one for you. Shoot me a PM or an email (timcrawf88@gmail.com) and i'll help you out.

  2. #62

  3. #63

    Default

    Quote Originally Posted by MiL0 View Post
    by any chance, are you based in Brighton Tim?
    Unfortunatly not, I live in Chicago, in the us

  4. #64

    Default code help

    Quote Originally Posted by timcrawf88 View Post
    Unfortunatly not, I live in Chicago, in the us
    Hello DJ Fans,


    i have a simple question about teensy2 usbMIDI coding

    i found the great code at tittelscale´s blog

    __________________________

    int current_analog;
    int previous_analog;


    void setup() {
    pinMode(0, INPUT);
    }

    void loop() {
    current_analog = analogRead(0);
    if(current_analog != previous_analog) {
    usbMIDI.sendPitchBend(current_analog << 4, 1);
    previous_analog = current_analog;
    delay(1);
    }
    }
    }


    i want to change - > usbMIDI.sendPitchBend(current_analog << 4, 1);

    to - > usbMDI.sendControleCHange(1.0-127-1)

    but it dosent work for me.

    i need a simple exampel for controling midi CC with Pots.

    thank you everybody

    mail me please @ magg(at)system-www.de

  5. #65
    Banned
    Join Date
    Apr 2012
    Posts
    6

    Default

    The channel is just the midi channel you want to send the message on... Channels 1-16 are available...
    Last edited by Marylin175; 04-16-2012 at 01:54 AM.

  6. #66

    Default code

    Quote Originally Posted by Marylin175 View Post
    The channel is just the midi channel you want to send the message on... Channels 1-16 are available...
    thx for fast replay.

    i know that

    but how to change

    usbMIDI.sendPitchBend(current_analog << 4, 1); in to
    usbMIDI.sendControleChange(1 , 0-127, 1) dont work for me

    i dont understand the current_analog << 4, 1); for the pitchbend (witch works great for me)

    if i change it to usbMIDI.sendControleChange(1 , 0-127, 1) i am sending on channel 1 CC1 value 0-127

    but nothing happens in ableton, only the midi channel is channing what i also dont understand

  7. #67

    Default ?!?

    Quote Originally Posted by simpleCircuits View Post
    thx for fast replay.

    i know that

    but how to change
    Code:
    usbMIDI.sendPitchBend(current_analog << 4, 1); in to
    usbMIDI.sendControleChange(1 , 0-127, 1) dont work for me
    i dont understand the current_analog << 4, 1); for the pitchbend (witch works great for me)

    if i change it to usbMIDI.sendControleChange(1 , 0-127, 1) i am sending on channel 1 CC1 value 0-127

    but nothing happens in ableton, only the midi channel is channing what i also dont understand

    i think i need something like that:

    Code:
    void controlchange(byte controller, byte value, byte channel) {
    if(controller == 70) {
      PORTB = value & 1;
    but i dont get it working...
    Last edited by simpleCircuits; 04-16-2012 at 03:59 AM.

  8. #68
    Tech Wizard steffex's Avatar
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    21

    Default

    when using "<<" you are doing bitshifting (read up on that stuff, because it looks like you have no idea what it actually does! )

    an easier way to this is to use the map() function in the arduino IDE. This allows a analog pot value to be remapped.
    http://arduino.cc/en/Reference/Map

Page 7 of 7 FirstFirst ... 34567

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
  •