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

Thread: midi file library and sdfat library question

  1. #1

    midi file library and sdfat library question

    Hi i'm new in this forum and i'm new with the teensy, i was making a project with arduino but i run out of memory program and ram, so i searched for other boards with more resourses and compartible with arduino and i found teensy, so i bought a teensy 3.5,the thing is that im using a library that uses the sdfat library the library is for reading standar midi files and is this https://majicdesigns.github.io/MD_MIDIFile/ so i wonder if i can use this library with the teensy without modification in my code, because i see the class that is used for the teensy in the sdfat library is the SdFatSdio and no the SD, and if i need to do some modifications in the library what do i need to do i'm really noob about this device and arduino so i hope you can help me with this and if some one has use this library with a teensy maybe you can give me some advices . sorry for the bad english but i'm not a native speaker.

  2. #2
    i get it work

  3. #3
    Junior Member
    Join Date
    Dec 2016
    Location
    France, Bordeaux
    Posts
    11
    Quote Originally Posted by soundstream32 View Post
    i get it work
    Hi, may I ask how do you get it work? I 'm scratching my head for a week...
    thanks!

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,057
    I did a T3.5 project using MD_Midifile and the T3.5 SD card reader a couple of weeks ago. Here the corresponding post https://forum.pjrc.com/threads/61795-Teensy-Organ.

    Unfortunately MD_Midifile hardcodes the SdFat type in the constructor. I simply exchanged it to SdFatSdioEX in the relevant places to work with the T3.5 SD card reader. You find the repo here: https://github.com/luni64/hamlet-organ. The changed MD_Midifile library is in the lib subfolder of the repo. Should be sufficient to copy it over your installed library.

    I did a shallow wrapper class (MidiParser) around the library where you can see how to use the adapted MD_Midifile lib.

    Beware, this was a quick and dirty project. The code might not be in a very nice shape :-)

  5. #5
    Junior Member
    Join Date
    Dec 2016
    Location
    France, Bordeaux
    Posts
    11
    Quote Originally Posted by luni View Post
    I did a T3.5 project using MD_Midifile and the T3.5 SD card reader a couple of weeks ago. Here the corresponding post https://forum.pjrc.com/threads/61795-Teensy-Organ.

    Unfortunately MD_Midifile hardcodes the SdFat type in the constructor. I simply exchanged it to SdFatSdioEX in the relevant places to work with the T3.5 SD card reader. You find the repo here: https://github.com/luni64/hamlet-organ. The changed MD_Midifile library is in the lib subfolder of the repo. Should be sufficient to copy it over your installed library.

    I did a shallow wrapper class (MidiParser) around the library where you can see how to use the adapted MD_Midifile lib.

    Beware, this was a quick and dirty project. The code might not be in a very nice shape :-)
    hello, thank you, but your link seem's dead or your repo is private...
    cheer's

  6. #6
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,057
    Ups, that was private indeed. I used this repo as backup, didn't intend to publish... Anyway, ist public now.

  7. #7
    Junior Member
    Join Date
    Dec 2016
    Location
    France, Bordeaux
    Posts
    11
    thank you so much , I succefully mod my lib and make the loop example work (more or less), just have to understand how sync in tempo work...

  8. #8
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,057
    Great that it works now.
    Can't help you about syncing and other details of the library. I was only interested in the tone on/off messages to open/close my organ pipes and didn't look what MD_Midifile can do besides that. Anyway, have fun developing.

Posting Permissions

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