DAVID | Posted: 29 Jun 2018, 03:28 AM |
---|---|
I love mcus Member Posts: 237 Joined: 10-September 17 |
hi i found this http://elm-chan.org/works/mxb/report.html what it is a wavetable midi player and it is based on the attiny45/85 i got the code working but how do i convert midi files into .asm files?? ------------- |
[top] | |
mit | Posted: 29 Jun 2018, 09:07 PM |
yeah whatever Admin Posts: 566 Joined: 4-May 16 |
Ah ELM ChaN, one of my favourites. In his project he does not use MIDI files at all, just a list of note numbers in a text file. Then there is a perl script to convert this text file to .asm format. You could potentially write a script to turn MIDI files into the right format though. ------------- |
[top] | |
DAVID | Posted: 29 Jun 2018, 11:47 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
ok so how can i open the perl file?? ------------- |
[top] | |
DAVID | Posted: 29 Jun 2018, 11:55 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
well it took a while to get it working but with other source code http://www.deep-shadows.com/hax/wordpress/?page_id=1111 unfortunately it uses codevision avr as the compiler (which is not freeware) and requires the attiny85 to run at 27mhz so i need to wait for delivery ------------- |
[top] | |
mit | Posted: 30 Jun 2018, 12:13 AM |
yeah whatever Admin Posts: 566 Joined: 4-May 16 |
Ah, fair enough. If you are on linux running the perl script is easy, on windows it's probably fairly simple too but you'll have to install it manually. Did you try out my midi player for attiny85? It only does square waves but at least I made the midi converter in javascript so it runs in a browser and you don't have to install anything. One of my first AVR projects involved a midi player, it had a simple drum synth too. I never got round to posting it though, I will at some point. ------------- |
[top] | |
DAVID | Posted: 30 Jun 2018, 12:36 AM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
QUOTE (mit)
yes i have try it out and it is really cool but i wanted to try out wavetable sound, and also that your midi player for the attiny85 have a bit of a problem with the high notes but still really cool and way easier to use
Last edit by DAVID at 30 Jun 2018, 12:38 AM ------------- |
[top] | |
DAVID | Posted: 30 Jun 2018, 12:46 AM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
here is the result of the attiny85 wavetable midi player at 16.5 mhz i just speed it up on audacity the song is the marble machine song by wintergatan https://drive.google.com/file/d/1jaPua-c0TcyMKMYs-Tc0-erjKxGBZOU2/view ------------- |
[top] | |
DAVID | Posted: 30 Jun 2018, 01:05 AM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
i got lazy at recording the avr output but i got the 4 minutes song to fit in 8.084 kilobites on the flash memory ------------- |
[top] | |
mit | Posted: 30 Jun 2018, 04:24 PM |
yeah whatever Admin Posts: 566 Joined: 4-May 16 |
Not bad I spose, but having to speed it up (or overclock the attiny to 27MHz) is kinda cheating. ELM ChaN's works really well, so I decided to adapt my script to convert midi files into his format. The script is here: https://mitxela.com/other/avr/midi2elmchan.htm I just spent the last two hours going through vgmusic.com and throwing midi files through the converter... Hmm, I should probably add a way of attaching MP3 files to posts on this forum. ------------- |
[top] | |
DAVID | Posted: 30 Jun 2018, 09:21 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
thanks a lot i test it out and it is very good i am sticking with that converter Last edit by DAVID at 8 Jul 2018, 08:17 AM ------------- |
[top] | |
DAVID | Posted: 30 Jun 2018, 10:10 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
here is the final result with a low pass filter https://drive.google.com/open?id=1IAidU8Z9OrMWz0vWwplOJSMv-ZWKITyb song: river follows in you Last edit by DAVID at 30 Jun 2018, 10:21 PM ------------- |
[top] | |
DAVID | Posted: 25 Jul 2018, 05:04 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
after a long break i made a video https://youtu.be/eMpXosbqGGs ------------- |
[top] | |
mit | Posted: 27 Jul 2018, 08:13 PM |
yeah whatever Admin Posts: 566 Joined: 4-May 16 |
Good stuff. ELM chan's code is really impressive, I still don't know why he only used it for that simple Fur Elise melody. ------------- |
[top] | |
DAVID | Posted: 12 Oct 2018, 08:34 PM |
I love mcus Member Posts: 237 Joined: 10-September 17 |
hi, after another break i decided to modify the code so instead of producing a music box tone now it is a square wave. here is a test https://drive.google.com/open?id=12oOyeX7tPIBNIMUCt05qvno7IdS8aT7e song starmachine 2000. i update the code on github https://github.com/theawsomeavr/attiny85-music-box ------------- |
[top] | |
mossystone | Posted: 15 May 2020, 06:43 AM |
Member Posts: 1 Joined: 15-May 20 |
Registered to say thanks for the converter and to share some images. It let me create a music box with our own melody for my daughter. Attached is a photo and a screenshot of the layout (diy layout creator.) I haven't found a nice box yet, but I incorporated a header for an off board microswitch to work with the eventual lid. As an aside, I wonder how elm-chan created his own melody files. I can find nothing on his site in either english or japanese. I did notice however that he included two melodies in addition to Fur Elise in the zip file you can convert with the included perl script. At any rate, cheers to all. Last edit by mossystone at 15 May 2020, 06:48 AM ------------- |
[top] | |
Sign in to post a reply.