Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run on Teensy 3.1/3.2 #10

Open
zensutherland opened this issue Oct 31, 2020 · 9 comments
Open

Run on Teensy 3.1/3.2 #10

zensutherland opened this issue Oct 31, 2020 · 9 comments

Comments

@zensutherland
Copy link

Love the idea for this, but i could not get it to compile on my Teensy 3.1 - This may very well be due to my ignorance, so please forgive me if this is a 'user issue' and nothing to do with the software.

The compile was attempted on the provided examples (Scales, Notes, etc) with the library. Below is the error message.

In file included from /Users/zensutherland/Documents/Arduino/libraries/Midier/src/Midier.h:12:0,
from /Users/zensutherland/Documents/Arduino/Midi/midier/midier.ino:14:
/Users/zensutherland/Documents/Arduino/libraries/Midier/src/sequencer/sequencer.h:20:17: error: enumerator value -1 is outside the range of underlying type 'char'
None = -1,

@razrotenberg
Copy link
Owner

Hi @zensutherland and thanks for reaching out!

I don't have any experience with Teensy boards. Can you please explain a bit how you compile the project?
Do you control the compilation command line that is executed?
If so, is the flag -pedantic passed to the compiler?

Did you install Midier using a library manager just like the one for Arduino, or did you clone this repository manually?

Thanks!

@MatrixRat
Copy link

Same as zensutherland, would like to get this library working on Teensy 3.0 and later.

Using Win10, Arduino IDE 1.8.15 and Teensyduino 1.54, arpeggino compiles for AVR boards eg, UNO, Leonardo, Mega, Teensy 2.0 and Teensy++ 2.0 but not for Teensy 3.0 or later.

Results were the same for installing Midier using library manager or manual install.
Compiler errors are same as zensutherland's post

Have just completed step one of the tutorial using an Arduino Leonardo and am seeing note messages being output from TX1 however would like to get it working on a Teensy 3.0 or better and think it would be great to use this lib with Teensyduino's native Fortyseven Effects Midi library.

@CarloCattano
Copy link

CarloCattano commented Sep 7, 2021

Greetings ! I came across this issue . This is an incredible library and wanted to give it a spin on my Teensy 3.6 . Its quite simple with its own usbMIDI() implementations .
I have forked the repo with that tiny initial change . I will test the most I can out of the library and report back .
Thanks a lot for making this effort on Midier !

the fork that works out of the box on teensy (tested 3.6) for now , till an option is added to the official repo .
-https://github.com/CarloCattano/Midier

Its just a tiny change in src/midi.cpp , comenting this lines and adding the usbMIDI way of writing it
https://github.com/levosos/Midier/blob/a1f8ee5ad51951a1b7365e609f5bf7e5b1f902b2/src/midi/midi.cpp#L20-L22

should be like this instead for usb midi via teensy.
https://github.com/CarloCattano/Midier/blob/82c4ccd24e35e01847efa06db8efd50a74bc84a5/src/midi/midi.cpp#L19-L23

You can edit it yourself find in the files that complain in the arduino console when the errors popup , you should be able to see where Midier/src/Midi.cpp is installed

@CarloCattano
Copy link

Another thing that is just a quick hack is the addition of " signed char " . Teensy assumes char to be unsigned .
Compiler complains about the conversion from unsigned int to int .
-https://github.com/CarloCattano/Midier/commit/ad4f9020540ec129f264dd74fd1faed30903e0ef

@MatrixRat
Copy link

Thank you CarloCattano, will change hardware to suit T3.6, play with those links and report back.

@CarloCattano
Copy link

@MatrixRat I dont think you need to change hardware. T 3.1/3.2/3.6 should behave equally, if I'm not forgetting something obvious

@MatrixRat
Copy link

@CarloCattano Just to elaborate, soldered buttons etc to a Mega protoboard and need to be mindful of T3.6 V+ for Din Midi I/O. Have a T3.6 on a Talldog DUE breakout and plan to build so will work on a Mega as well thinking that with the extra I/O pins will not need to use 4067s earmarked for another project.
Am adding the Din Midi I/O as would like to be able to plug in say a Novation SL-25. Am not a real programmer and this library has got me interested and looks like excellent material to dig into C++ and learn some new tricks like there are code hieroglyphics here that I need to be able to understand and use in another Midi project, ~6K lines of working code..

@natehouk
Copy link

The issue is that Teensy is using C++11 and has different variable types defined. I made a pull request that fixes all issues for Teensy 4.1

@natehouk
Copy link

Here is the PR with the changes required for Teensy 4.1: #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants