Connexion rapide:  

Forum: VirtualDJ Technical Support

Sujet Teensy 3.2 MIDI Pushbutton Response Issue

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

K0mixPRO InfinityMember since 2012
I'm trying to prove that it's possible to create a controller for VirtualDJ 8 using the Teensy 3.2. At the moment I have a single pushbutton that I want to use to trigger a hot_cue via MIDI. Everything appears to be fine except that VDJ does not respond to the button.

Setup:


The Teensy will act very happily as a USB-Midi device. I'm using the sketch from this page to send simple noteOn/noteOff messages via USB http://theamateurmaker.com/simple-midi-controller-single-button/ The messages are being sent perfectly according to MIDI Trace, and in Cubase it plays the note C4 with no issues.



I have created this Definition file for it:
<?xml version="1.0" encoding="UTF-8"?>
<device name="Teensy MIDI" author="TS" description="Teensy MIDI test" version="800" type="MIDI" singledeck="yes" padColumns="1" padRows="1" padSides="1" motor="no" decks="1" drivername="Teensy MIDI" vid="0x16C0 " pid="0x0485">
<button note="0x3C" name="0-BUTTON60" deck="1"/>

The button appears in VDJ's Controller mapping section as 0-BUTTON60 when I press it. I have mapped it to 'hot_cue 5':


However, the hot cue does not work when I push the button. VDJ does not seem to respond to the button at all.
VDJ itself is fine: I can trigger the hot cue via my Mixtrack Pro II, keyboard, and mouse. The issue is the same if I re-map the button to 'play'.

I'm completely stumped. Can anyone please shed light on why this might be happening?
 

Posté Sat 13 Aug 16 @ 10:22 am
locoDogPRO InfinityModeratorMember since 2013
Your licence doesn't allow the use of custom definitions, only pro licence can, but +, good luck to you, I've done similar but I went HID instead of MIDI [I think the 3.2 has HID libs built in.]
 

Posté Sat 13 Aug 16 @ 10:52 am
K0mixPRO InfinityMember since 2012
Ahh not even for the first 15 minutes? I just want to prove that it will work before I buy the full license.

I have had the teensy work before. A month ago I ran the code from fuzzywobble's Instructables project for a single button, and got a hot cue to respond http://www.instructables.com/id/A-Framework-For-Making-Affordable-Stylish-Modula/step11/All-About-The-Code/
(I'm not using this code for my project because it's for the Teensy 2, which has a different pin configuration. I don't know how to adapt the code to the Teensy 3.2)

 

Posté Sat 13 Aug 16 @ 9:59 pm
K0mixPRO InfinityMember since 2012
My long term goal is to have many controllers than run through a 'Master' controller via a single USB, can I do that with HID?

The Instructable above uses I2C to chain controllers together. Will that affect performance? Would HID or MIDI be better suited for this?

(sorry for all the questions, my knowledge is patchy)
 

Posté Sat 13 Aug 16 @ 10:06 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
There is a strong chance that your definition is not taken, so its probably still "Simple Midi"

What happens if you rename the button e.g.
from
<button note="0x3C" name="0-BUTTON60" deck="1"/>
to
<button note="0x3C" name="MYBUTTON" deck="1"/>
do you get the "MYBUTTON" in the Key Learn ?

Also, you will need to manually create a very basic (empty) mapping xml file using the device name
<mapper device="Teensy MIDI" .... >
</mapper>
 

Posté Sat 13 Aug 16 @ 10:59 pm
K0mixPRO InfinityMember since 2012
DJDad, you were absolutely right - my definition wasn't working because it was a .txt. not an .xml ... rookie mistake! Hence it was creating a Simple Midi mapping. I fixed the definition and created an empty mapper for "Teensy MIDI".

I can now rename the controller and button and see the changes appear in VDJ


However, still no response from the hot cue :( Anything else I might have missed?
 

Posté Sun 14 Aug 16 @ 2:36 am
djdadPRO InfinityDevelopment ManagerMember since 2005
your button works as momentary (value on down and 00 on up) or toggle ?
i also see it sends 63 instead of 7F on down so try adding value="0x63" to the <button
Did you try naming the button without spaces ?
did you try other actions other than hot_cue ?
 

Posté Sun 14 Aug 16 @ 4:48 am
K0mixPRO InfinityMember since 2012
Still no joy despite all your ideas!
It's a momentary switch.
I fixed the velocity issue: the code was sending 99 instead of 127 (presumably for use with synthesisers etc).
I have renamed the button "HotCue5".
I tried remapping it to "play_pause", "pfl" and "eq_kill_low" but to no avail. The mapping file updated each time.

Thank you so much for being patient about this! Is there anything else that might be getting in the way?

(Incidentally, if I run Midi Trace when VDJ is open, I see no messages. If I close VDJ messages start coming through again. Don't know if this is normal or relevant.)
 

Posté Sun 14 Aug 16 @ 10:23 am
djdadPRO InfinityDevelopment ManagerMember since 2005
Than i am afraid it must be your license not allowing Custom definitions
 

Posté Mon 15 Aug 16 @ 2:47 am
K0mixPRO InfinityMember since 2012
Ahh yes I see that on the license comparison page :( Looks like I'll have to bite the bullet and upgrade.
Thank you both very much for your help!
 

Posté Mon 15 Aug 16 @ 8:43 am
Hi...i am a new user here. In my case i wouldn't recommend using an Arduino Mega at all. Get a board that supports MIDI over USB natively, without having to flash custom firmware. If you want the Mega form factor, get an Arduino Due.But I personally prefer the Teensy 3.2, 3.5 or 3.6. They have plenty of IO and analog inputs. If you do need more IO, just multiplex your buttons in a matrix, and if you need more analog inputs, use analog multiplexers.
 

Posté Mon 30 Apr 18 @ 5:10 pm


(Les anciens sujets et forums sont automatiquement fermés)