Welcome. Please log in or register.

tetris on the atmega328p/arduino
DAVID Posted: 11 Mar 2019, 07:03 AM
avrs + midi = best diy synths

Posts: 237
Joined: 10-September 17
Hi, this is an old project that i made back in June 2017, it is an arduino running tetris, it is using as display 2 8x8 led matrices and 4 buttons for control.
Back then i just have use annejan's code without modifications so it didn't had any music.
So now (and with now i refer to 2 months ago) i added music with the use of timers. what my code does to play music is that it plays a bytestream (a const array of bytes that it is store in PROGMEM) which has been generated by a computer from a midi file (basically a midi file but in text) that includes delays, which midi notes to play on which tone generator and then it just converts the midi note to frequency that controls a wavetable synth and the data is sent through PWM in pin 9 (OC1A).
You can check out my video at:
Code as well as precompiled hex files:

Last edit by DAVID at 17 Mar 2019, 03:03 AM

mit Posted: 16 Mar 2019, 02:03 PM
yeah whatever

Posts: 405
Joined: 4-May 16
Hi, just watched your video, that's really cool. Soon you are going to be better at this than I am.

On github, if you fork annejan's tetris repo, you can commit your changes to it and they'll be able to see what you've done. You could potentially submit a pull request, and then they can merge in your changes. You probably need to use a git client to do this though, I'm not sure you can commit properly using just the web interface.


Sign in to post a reply.