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

Thread: Teensyduino 1.41 Beta #3

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    293

    Teensyduino 1.41 Beta #3

    Here is a third beta test for Teensyduino 1.41.

    Major updates were made to USB MIDI. Please let with testing MIDI if you
    have MIDI software or MIDI devices (to plug into the USB host port on
    Teensy 3.6).

    Since Arduino's 1.9 betas are a moving target, I've included copies of
    beta build #31 which this Teensyduino version expects.


    Linux 32 bit:
    https://www.pjrc.com/teensy/td_141-b...nstall.linux32
    https://www.pjrc.com/teensy/td_141-b...linux32.tar.xz

    Linux 64 bit:
    https://www.pjrc.com/teensy/td_141-b...nstall.linux64
    https://www.pjrc.com/teensy/td_141-b...linux64.tar.xz

    Linux ARM:
    https://www.pjrc.com/teensy/td_141-b...stall.linuxarm
    https://www.pjrc.com/teensy/td_141-b...inuxarm.tar.xz

    Mac OS-X:
    https://www.pjrc.com/teensy/td_141-b...inoInstall.dmg
    https://www.pjrc.com/teensy/td_141-b...a31-macosx.zip

    Windows:
    https://www.pjrc.com/teensy/td_141-b...inoInstall.exe
    https://www.pjrc.com/teensy/td_141-b...31-windows.zip


    Changes since Teensyduino 1.41-beta2

    USB MIDI support for virtual cables (select from Tools > USB Type menu)
    USB MIDI updated with most functions of Arduino MIDI lib 4.3.1
    USB MIDI getType() now returns same as MIDI 4.3.1 -- NOT BACKWARDS COMPATIBLE
    Support for compatibility with Arduino's MIDIUSB.h
    Added more examples in File > Examples > Teensy > USB_MIDI
    USBHost_t36 MIDI support for virtual cables
    USBHost_t36 MIDI updated with most functions of Arduino MIDI lib 4.3.1
    USBHost_t36 MIDI returns same as MIDI 4.3.1 -- NOT BACKWARDS COMPATIBLE
    USBHost_t36 MIDI fix for devices using interrupt endpoints
    USBHost_t36 MIDI workaround for devices sending improperly coded sysex message
    XPT2046_Touchscreen add setRotation()
    FreqMeasureMulti fixed on Teensy LC (thanks Manitou)

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,501
    Downloaded and still runs... I probably won't test much of the new stuff (no MIDI stuff)...

    I probably should hurry up with the USB joystick stuff I am playing with. I am trying to be able to retrieve more of the Axis data for the different joysticks like PS3, PS4 and also try get some Rumble and LED support to work. I have some of this working now on PS4. Trying to figure out XBox One, so far the documentation I have seen, the specified way is not working for me... But I have seen other conflicting things as well. PS3 is retrieving additional information but have not done rumble yet...

    On the new Beta buile #31. Is it just me, but I find the Find and Replace dialogs when I do something like <ctrl f> comes up but does not grab the focus and what I try to type for search string ends up in Sketch... Irritating probably should report to Arduino...

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,375
    Quote Originally Posted by KurtE View Post
    ...

    On the new Beta buile #31. Is it just me, but I find the Find and Replace dialogs when I do something like <ctrl f> comes up but does not grab the focus and what I try to type for search string ends up in Sketch... Irritating probably should report to Arduino...
    Not just you KurtE - I see it on two Win 10 machines. Hit Ctrl+F and find Dialog displays but cursor focus stays and types in the sketch not the dialog. Though I'm in 'external editor' mode just now so that stopped bugging me.

    Also the IDE - but are you seeing the failure in line number association with reported compile errors as well with the updated pre-processor?

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    16
    New MIDI stuff is all testing out perfectly here.
    Mac is seeing 16 cables and midi transfers fine.

    Windows 7 has an issue with usbMIDI.sendNoteOn(note, vel, channel,cable) from teensy to PC. After a disconnection and reconnection(USB lead) it will work for a couple of bars and then timeout for a minute or two before working again for the rest of the session. After a disconnection windows 7 is not properly closing the port so on reconnection it forces the open port closed causing the timeout. Not a problem on Mac.

    USBHost_t36 now has transmit working great, as well as receive.
    Controlling the lights on a MidiFighter Twister
    Clocks are all good and I still need to test sysex.
    I will report if I run into anything not working as expected but for now it all looks awesome.
    Might be nice to be able to name the cables in future on OSX. MIDIx16 routing can be confusing in a daw.
    No dice on Windows as you know.

    Thanks for getting such a big job done Paul. Fantastic stuff.

  5. #5
    Junior Member
    Join Date
    Dec 2017
    Location
    Oregon, USA
    Posts
    7
    Hi Paul- I have a little USB MIDI keyboard I'm using for a project. It has decoders, pads, keys, and mod/pitch sliders. Everything works great except for the Pitch slider (the modulation one works fine). I've attached the debug log, hoping this is an easy fix. This isn't a new bug, but was hoping 1.41 would fix it, should have reported earlier... Thanks for all you do Paul!
    Pitch Slider Debug Log.txt

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    Please give this program a try. Does it help?
    Attached Files Attached Files

  7. #7
    Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    33
    Just for the record.
    I have a korg microkey usb keyboard connected to the usb host port of a T3.6 and pitch bend works as intended.
    Sending pitch bend from logic pro x to the usb port of the T3.6 also works as intended.

  8. #8
    Junior Member
    Join Date
    Dec 2017
    Location
    Oregon, USA
    Posts
    7
    Thanks Paul, that works. Didn't realize that pitch had its own handler... Thanks again!

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    Yeah, all this USB MIDI stuff needs better documentation. That's why I've been adding more examples. Planning to do updates on the website soon...

  10. #10
    This post is no longer important to
    Last edited by Jasoroony; 01-18-2018 at 11:15 AM.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    Do the out of memory problems happen only when using the serial monitor?

  12. #12
    No longer important to this thread.
    Last edited by Jasoroony; 01-18-2018 at 11:03 AM.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    Arduino 1.9.0-beta adds some html parsing stuff to the serial monitor. Maybe it's consuming more memory as lots of data comes in?

  14. #14
    No longer important to this thread.
    Last edited by Jasoroony; 01-18-2018 at 11:03 AM.

  15. #15
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,375
    I've been using the 1.9.0 builds since the first 1.41 beta supported it and not seen JAVA issues the little I used IDE SerMon - though I primarily use TyCommander for my SerMon - one reason was the older IDE builds would consume lots of memory and fault Java with long running lots of serial spew - though in later 1.8.x builds when I used it that seemed to have been fixed. As Paul notes - perhaps they regressed with new features. I'm on Win 10 now - but my earlier experiences were Win 7.

  16. #16
    I have run a full example build with this release and found a issue with example_examples__10_StarterKit_BasicKit_p11_Cryst alBall for all teensy boards.
    The reason is that the library arduino-PR-beta1.9-BUILD-31\hardware\teensy\avr\libraries\LiquidCrystal lib is empty and marked as "no longer used"
    Resulting in ..\p11_CrystalBall.ino:28:1: error: 'LiquidCrystal' does not name a type
    Best regards
    Jantje

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    I just tried a fresh copy of Arduino 1.9.0-beta31 and Teensyduino 1.41-beta3.

    It verifies without any error.

    Click image for larger version. 

Name:	capture.png 
Views:	46 
Size:	188.4 KB 
ID:	12606

    Any chance your install might have leftover stuff from prior betas or other installs?

  18. #18
    Indeed it seems to work with teensyduino :-( As you know I use Sloeber...
    Root cause is that ...\arduino-PR-beta1.9-BUILD-31\hardware\teensy\avr\libraries\LiquidCrystal contains a LiquidCrystal.h and LiquidCrystal.cpp in 2 locations.
    Arduino IDE seems to prefer the files in src and sloeber the once in the root.

    Deleting the dummy files in the root makes it work in Sloeber and Arduino IDE. Is that an option for you?

  19. #19
    Hey Paul, there's a bug with usbMIDI, but before i explain the bug, there's another thing that im a bit confused with, the new version seems to be using the usb_midi under cores/teensy3/usb_midi (i'm using a 3.2 with Serial + MIDI) but i thought it was supposed to use usb_midi under cores/usb_midi/ ?

    In usb_midi.c the bug is at around line 342

    if (type1 == 0x02 || type1 == 0x03 || (type1 == 0x05 && type2 == 0x0F)){

    it should be

    if (type1 == 0x02 || type1 == 0x03 || (type1 == 0x05 && (n>>8) >= 0xF1 && (n>>8) != 0xF7)) {

    sometimes the type1 can be 5 and type2 can be 0x0F even tho it containes 0xF7 to end the messsage

  20. #20
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    hardware/teensy/avr/cores/usb_midi is for Teensy 2.0 and Teensy++ 2.0.

  21. #21
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,459
    Quote Originally Posted by neroroxxx View Post
    In usb_midi.c the bug is at around line 342
    Already fixed on github, at line 340:

    https://github.com/PaulStoffregen/co...sb_midi.c#L340

    I'm going to roll all the recent fixes up into 1.41-beta4 soon. But first updating the Java stuff for Arduino 1.9.0-beta34 (was only beta31 a week ago).

  22. #22
    Awesome, thank you! i've been testing 1.41 today and so far everything is work as usual for me, my main focus being on MIDI

  23. #23
    Paul, both USBHost_t36 and usbMIDI should have a getSysExArrayLength() and behave like the MIDI library, where the the sysex length is split into 2 uint8_t and each assigned to data1 and data2, then getSysExArrayLength would merge them into a uint16_t

    Currently the size of sysex arrays is 290 but data1 is only a uint8_t so it wouldn't be able to store a length higher than 255

    msg_sysex_len in USBHost_t36 would have to be a uint16_t like it is on usbMIDI

  24. #24
    Junior Member Van's Avatar
    Join Date
    Mar 2018
    Location
    Dresden, Germany
    Posts
    15
    Quote Originally Posted by Paul View Post
    USBHost_t36 MIDI workaround for devices sending improperly coded sysex message
    what exactly does it mean?

  25. #25
    Junior Member Van's Avatar
    Join Date
    Mar 2018
    Location
    Dresden, Germany
    Posts
    15
    sfaik there is absolute no convention on how sysex should be architectured.
    f.e. KORG packs 8 bytes into 7bits and unpacks 7bytes into 8 bits.
    where f.e. DSI Tempest has a totally custom packing/unpacking system I had to reverse engineer in order to program a randomizer for it: https://forum.davesmithinstruments.c...pic,165.0.html.
    what about a 32bit integer? or a double?
    so how a sysex message is made depends on how you want it. then you have to make your own encoder/decoder system for it.

Posting Permissions

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