Teensyduino

Teensyduino
Posted on: 29.03.2011 by Blair Turick
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!
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Trinity Elgendy
16.04.2012
Originally Posted by simpleCircuits
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 believe 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...
Trinity Elgendy
16.04.2012
Originally Posted by Marylin175
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
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Blair Turick
23.12.2011
Originally Posted by MiL0
by any chance, are you based in Brighton Tim?
Unfortunatly not, I live in Chicago, in the us
Arcelia Siebeneck
22.11.2011
Originally Posted by Skirmitt
On my project I did add capacitors on the pots to stabilize the signal. 100nF was enough for me.
would these be suitable?

http://www.ebay.co.uk/itm/40-x-100nF...item45fde4fd53

is 50V too much?
Siobhan Beideman
22.11.2011
Originally Posted by Skirmitt
They are not necessary but believe me they stabilize the signal significantly. Only 2 soldering points per potmeter. Try it for one, if that works ok for you, do the rest you wont regret it !
Hmm.. Sounds interesting. If it balances the signal and helps with pot accurancy, I definitelly should try this. How do you exactly connect the capasitor? Between two potentiometer lugs?
Siobhan Beideman
21.11.2011
Originally Posted by MiL0
crimp connectors was what I tried... that's how I had the connection problems...

do you have aim/msn/skype? wouldn't mind having a chat with you about teensy stuff
Okay.. that's good to know! I did some prototyping with pots and buttons and didn't experience any problems. But I used crimp connectors only with buttons. Perhaps they are not suitable to use with analog inputs.. Anyway, probably I just play it safe and solder everything together in the final build.

Yeah, I have msn. I'm gonna send you a message!
Siobhan Beideman
19.11.2011
Originally Posted by MiL0
nice one Juri - looking forward to the next part

are you gonna do some prototype pcb's for the pots or are you just gonna solder the wires directly?
Thanks!
I believe I'm going to solder the wires directly to the pots or maybe use some small crimp-connectors.. not sure yet.
Bon Finix
17.04.2012
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
Trinity Elgendy
16.04.2012
Originally Posted by simpleCircuits
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 believe 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...
Trinity Elgendy
16.04.2012
Originally Posted by Marylin175
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
India Trebesch
16.04.2012
The channel is just the midi channel you want to send the message on... Channels 1-16 are available...
Trinity Elgendy
16.04.2012
Originally Posted by timcrawf88
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
Blair Turick
23.12.2011
Originally Posted by MiL0
by any chance, are you based in Brighton Tim?
Unfortunatly not, I live in Chicago, in the us
Arcelia Siebeneck
23.12.2011
by any chance, are you based in Brighton Tim?
Blair Turick
21.12.2011
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 ([email protected]) and i'll help you out.
Dannielle Glassey
22.11.2011
They are suitable. You can go to 1uF if you want too.
Oh and in the code you can also add something like taking 5 samples and compare if they are equal. If so compare with the previous value and if necessary send a new midi value.
Another approach is counting the values together and dividing by the number of readings, comparing, ... and so on.

I do it like the first way and this works good.
Arcelia Siebeneck
22.11.2011
Originally Posted by Skirmitt
On my project I did add capacitors on the pots to stabilize the signal. 100nF was enough for me.
would these be suitable?

http://www.ebay.co.uk/itm/40-x-100nF...item45fde4fd53

is 50V too much?
Dannielle Glassey
22.11.2011
Add it from ground to the center pin (runner) of the potmeter.
Siobhan Beideman
22.11.2011
Originally Posted by Skirmitt
They are not necessary but believe me they stabilize the signal significantly. Only 2 soldering points per potmeter. Try it for one, if that works ok for you, do the rest you wont regret it !
Hmm.. Sounds interesting. If it balances the signal and helps with pot accurancy, I definitelly should try this. How do you exactly connect the capasitor? Between two potentiometer lugs?
Dannielle Glassey
21.11.2011
They are not necessary but believe me they stabilize the signal significantly. Only 2 soldering points per potmeter. Try it for one, if that works ok for you, do the rest you wont regret it !
Arcelia Siebeneck
21.11.2011
hmm, capacitors might work but that would involve more soldering... I was trying to attach pots to my teensy without doing any soldering at all (by crimping 1x5 'dupont' connectors like these http://www.pololu.com/catalog/product/1920 to the pots terminals)

Juri - just got your pm.. i'll hit you up soon
Dannielle Glassey
21.11.2011
On my project I did add capacitors on the pots to stabilize the signal. 100nF was enough for me.
Siobhan Beideman
21.11.2011
Originally Posted by MiL0
crimp connectors was what I tried... that's how I had the connection problems...

do you have aim/msn/skype? wouldn't mind having a chat with you about teensy stuff
Okay.. that's good to know! I did some prototyping with pots and buttons and didn't experience any problems. But I used crimp connectors only with buttons. Perhaps they are not suitable to use with analog inputs.. Anyway, probably I just play it safe and solder everything together in the final build.

Yeah, I have msn. I'm gonna send you a message!
Arcelia Siebeneck
19.11.2011
crimp connectors was what I tried... that's how I had the connection problems...

do you have aim/msn/skype? wouldn't mind having a chat with you about teensy stuff
Siobhan Beideman
19.11.2011
Originally Posted by MiL0
nice one Juri - looking forward to the next part

are you gonna do some prototype pcb's for the pots or are you just gonna solder the wires directly?
Thanks!
I believe I'm going to solder the wires directly to the pots or maybe use some small crimp-connectors.. not sure yet.
Arcelia Siebeneck
18.11.2011
nice one Juri - looking forward to the next part

are you gonna do some prototype pcb's for the pots or are you just gonna solder the wires directly?
Siobhan Beideman
18.11.2011
I got inspired by this fantastic thread and finally got my own teensy midi controller project going: http://www.jurimusic.com/diy-arcade-...ler-episode-1/
Siobhan Beideman
26.10.2011
Just a quick reply (firefox crashed and I lost everything I just writed). I got my Teensy++, breadboarded 6 potentiometers and uploaded the code from Philip Cunninhams site. Worked really well in Renoise, just like any other midi controller. I also downloaded Midi-ox to really see what happens. First I got lot of random data, but after checking all connections and pressing parts firmly down everything worked like a charm. Seems like this device is sensitive to random noise caused by loose connections.
Blair Turick
24.10.2011
Originally Posted by MiL0
my next problem is that when I connect more than 4 pots to my teensduino it spits out constant midi cc data. I've tried different inputs on the teensy but still get the same problem. I've also tried a number of different scripts and tried on both of the teensy's I own; same problem.

It seems like there's a sensitivity problem - like it's picking up constant midi data from a pot even when it's not plugged into the teensy input. Any ideas? I'm gonna post a video later to show what I mean...
ok so my first advice would be to double and triple check the wiring, make sure all of the ground and power cables are correct. After that try it in traktor and see if it works, i know my pots have trouble in virtual dj but work fine in traktor.
Siobhan Beideman
23.10.2011
I've been following this thread for a while now. Seems really interesting and I'm gonna try to build my own teensy midi controller soon. I probably get all the necessary parts during next week, so then I can try the code and see if I can use more than 4 pots with it. But Arduino definitely spits out random data if you read the analog inputs without any pots connected. I just tried it out with Arduino Uno and the 'AnalogReadSerial' sketch.
Arcelia Siebeneck
21.10.2011
http://www.youtube.com/watch?v=xUmOSDi6bW4

any ideas?

edit: this is using the code from here:

http://unsymbol.wordpress.com/2011/0...di-controller/

but I get the same problem when I use the arcade midi instructables teensy code as well.
Arcelia Siebeneck
21.10.2011
my next problem is that when I connect more than 4 pots to my teensduino it spits out constant midi cc data. I've tried different inputs on the teensy but still get the same problem. I've also tried a number of different scripts and tried on both of the teensy's I own; same problem.

It seems like there's a sensitivity problem - like it's picking up constant midi data from a pot even when it's not plugged into the teensy input. Any ideas? I'm gonna post a video later to show what I mean...
Arcelia Siebeneck
14.10.2011
will do - can't wait to show it off to everyone!
Blair Turick
13.10.2011
Glad you got it working.

Make sure you post pics when its done so we can see it

<< Back to Reviews of DJ equipment Reply

Copyright 2012-2023
DJRANKINGS.ORG n.g.o.
Chuo-ku, Osaka, Japan

Created by Ajaxel CMS

Terms & Privacy