Teensy Snake Game - Music Generator

Expensive Notes

Well-known member
[FONT=&quot]The main aim is to generate semi-random musical phrases by moving the snake around.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]Horizontal movement plays a fixed “melody” in Dm which randomly changes each time the green square is eaten by the snake. Moving to the right plays the melody backwards.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]Vertical movement switches octaves but in ¾ time, hence the generation of a “Larks Tongues In Aspic Part 2” vibe due to 8 vertical grid locations. i.e. ¾ ¾ 2/4 [/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]The two Volcas are both set to channel 1 and are receiving the same notes.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]The snake game and the MIDI notes are controlled by the Teensy 4.1 which is using the Host USB port to drive the Launchpad. The Volcas receive MIDI notes from the Teensy on the tx1 serial port.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]I’m not trying to get the best score, and wouldn’t be that good at getting it anyway… The "Game" has flaws compared to the real thing but it is meant as a music generator.

[/FONT]
 
Launchpad - Teensy (Arduino) Controlled Space Invader #Jam with TD-3, Volca FM and Drum


#Jam whilst playing Space Invaders on the #Launchpad Mini Mk3.


The Teensy microcontroller uses the Launchpad Mini Mk3 as a screen and for input. It then send MIDI note and clock information to the TD-3 and the Volca FM. The Volca Drum is synched to the FM but is playing using its own sequencer.


The arpeggios for the TD-3 come from the Teensy based on the position of the blue Space Ship.
The “Bullet” controls the FM note sequence based on its position.


The music is a variety of Techno, or at least that's the aim.


 
Here's another one...
[FONT=&quot]Volca FM Ambient Soundscape - Notes Chosen by “Conways Game Of Life” on Teensy and Displayed on the Launchpad[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]Warning: The first bit is very quiet, don’t turn up your volume too soon…[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]The Teensy microcontroller (Arduino) is playing a version of “Conway’s Game of Life” and showing the game on the Launchpad Mini Mk3. [/FONT]
[FONT=&quot]Each pad on the Launchpad represents a cell in the game of life. I have used different colours to represent the stages of life for each cell. Green is just born, yellow surviving and red is dying. [/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]When a cell becomes red, a note (in Cm) is played based on the position of the cell. Because the Volca FM can only play three notes at a time only the last three notes generated will be heard during each life cycle. Further, as only note-on MIDI is sent, if a note is already playing it isn’t restarted. This leads to ‘missing’ notes.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]The game can be interacted with by pressing any pad in the game to generate a cell and thus alter the subsequent cell generations, although I didn’t do this! The edges of the screen wrap around to the opposite side to increase the interaction of cells.[/FONT]
[FONT=&quot]The left and right arrow keys can change the speed of the life cycles. The down arrow seeds the game with a string of cells.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]It comes up with some interesting chord progressions.
[/FONT]
 
I like the Snake Game "score" and would be interested in seeing how you generated the notes.

Would you mind posting the Teensy code? Thanks!
 
[FONT=&quot]#TD3 Bespoke Launchpad MIDI Controller and Volca Drum #Jam[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]I have programmed the Teensy microcontroller (Black Box) to control the TD-3 via MIDI with accents and slides via the Launchpad Mini Mk3. The Teensy sends clock to the Volca Drum which is internally sequenced.[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]
[/FONT]
 
Back
Top