ねこでじ(Nekodigi)

Nekodigi’s diary

学習中の気づきをまとめています。応援よろしくお願いします

【Arduino】Custom MIIDI Player

Abstract

www.youtube.com
Selects any midi file. Then, extract highest tone and generate data with the processing program. Finally, save it as DATA.TXT in SD card and insert it to Arduino.

How it works

Get all midi data with Java standard library. However it's difficult to play for Arduino so extract highest tone and calculate duration(convert to ms) then output as text.
The program calculate for each tracks so I will choose one of them. Then copy it and write to SD card as DATA.TXT.
Insert the card to Arduino. Arduino plays it according to written tone and duration.

Source code

github.com