AlgoMIDI: Create Music Through Cellular Automata and Graph Traversal Algorithms

# AlgoMIDI: A Musical Studio Combining Cellular Automata and Graph Traversal Algorithms for Creating Music

AlgoMIDI is a unique musical studio that allows users to generate music through cellular automata principles, such as Conway’s Game of Life (GoL), along with graph traversal algorithms like Breadth First Search (BFS) and Depth First Search (DFS). It serves as an evolutionary successor to [Cellular Minimata](https://github.com/myanvoos/cellular-minimata), where instead of solely visualizing automata patterns, each “living” cell now triggers a musical note.

Technologically speaking, AlgoMIDI is built upon various modern frameworks and libraries: Vue 3 serves as the frontend foundation; TypeScript handles its robust typing system; Web Audio API (via Tone.js) provides audio processing capabilities for creating melodies from automata patterns and graph traversal sequences; p5.js manages visualizations related to cellular automata rules, while Cytoscape.js takes care of the graph representation with interactive node manipulation features such as dragging edges between nodes representing notes generated by both algorithms.

The piano sampler used in AlgoMIDI originates from [this](https://github.com/nbrosowsky/tonejs-instruments) repository, adding further depth to its musical capabilities.

AlgoMIDI offers several notable features:
1. **Cellular Automata**: Users can experiment with classic Game of Life rules (B3/S23), custom rule inputs (e.g., B3/S2,3 format) and adjustable playback speeds ranging from 60 to 240 beats per minute (BPM). They also have the option to initiate patterns by clicking cells within the automata grid.
2. **Graph Traversal**: This feature presents visual representations of notes as nodes connected via edges representing melodic sequences generated through either BFS or DFS algorithms applied on graphs constructed from musical data. Users can create new connections between these nodes (notes) by dragging and dropping them onto desired locations within the graph interface.
3. **Piano Interface**: The virtual piano serves as a central hub for displaying both automata-generated notes and those stemming from graph traversal algorithms’ output. It offers visual feedback when keys are played, allowing users to follow their musical creations more intuitively while providing basic playback controls such as start/stop functionality.

In essence, AlgoMIDI merges the worlds of mathematics (specifically algorithmic principles) and music production into an engaging creative tool that encourages experimentation with various techniques resulting in unique sonic landscapes.

[algomidi.vercel.app](https://algomidi.vercel.app “https://algomidi.vercel.app”)

### Additional Resources:
– [ Activity ](/myanvoos/algoMIDI/activity)
– [ Stars ](https://github.com/myanvoos/algoMIDI/stargazers)
– [ Watchers ](https://github.com/myanvoos/algoMIDI/watchers)
– [ Forks ](https://github.com/myanvoos/algoMIDI/forks)

### Languages Used:
1. Vue (62.8%) – Primary frontend framework for building user interface components and managing application logic flow.
2. TypeScript (34.3%) – Provides strong typing capabilities while maintaining compatibility with JavaScript codebase, ensuring robustness in handling data types throughout the project lifecycle.
3. CSS (1.9%) – Utilized mainly for styling purposes to achieve desired visual aesthetics across different elements within AlgoMIDI’s interface

Complete Article after the Jump: Here!