mitxela.com forum
Welcome. Please log in or register.

elm wavetable melody
DAVID Posted: 29 Jun 2018, 03:06 AM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:06 PM
Avatar
yeah whatever

Admin
Posts: 246
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:06 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
Joined: 10-September 17
ok so how can i open the perl file??

-------------
[top]
DAVID Posted: 29 Jun 2018, 11:06 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:06 AM
Avatar
yeah whatever

Admin
Posts: 246
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:06 AM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
Joined: 10-September 17
QUOTE (mit)

Did you try out my midi player for attiny85?
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:06 AM

-------------
[top]
DAVID Posted: 30 Jun 2018, 12:06 AM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:06 AM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:06 PM
Avatar
yeah whatever

Admin
Posts: 246
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:06 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:07 AM

-------------
[top]
DAVID Posted: 30 Jun 2018, 10:06 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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:06 PM

-------------
[top]
DAVID Posted: 25 Jul 2018, 05:07 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
Joined: 10-September 17
after a long break i made a video
https://youtu.be/eMpXosbqGGs

-------------
[top]
mit Posted: 27 Jul 2018, 08:07 PM
Avatar
yeah whatever

Admin
Posts: 246
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:10 PM
Avatar
avrs + midi = best diy synths

Member
Posts: 220
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]

Sign in to post a reply.