Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thesephist/codesynth
Generate music from your source code 🎹
https://github.com/thesephist/codesynth
audio-processing paper-css torus-dom web-audio
Last synced: about 1 month ago
JSON representation
Generate music from your source code 🎹
- Host: GitHub
- URL: https://github.com/thesephist/codesynth
- Owner: thesephist
- License: mit
- Created: 2020-06-13T21:12:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T22:53:07.000Z (over 2 years ago)
- Last Synced: 2023-03-02T12:41:32.977Z (almost 2 years ago)
- Topics: audio-processing, paper-css, torus-dom, web-audio
- Language: JavaScript
- Homepage: https://codesynth.surge.sh
- Size: 239 KB
- Stars: 22
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Codesynth 🎹
Generate music from your source code! You can try it live at [codesynth.surge.sh](https://codesynth.surge.sh). Codesynth is built with:
- The [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) for audio synthesis
- [Torus](https://github.com/thesephist/torus) for the player and UI
- [paper.css](https://github.com/thesephist/paper.css) for a lightweight visual style![Codesynth screenshot](static/img/screenshot.png)
## How does it work?
From the "How does it work?" section of Codesynth:
>Codesynth translates each line of source code into a tune by looking at the indentation and length of each line.
>
>A farther indent indicates a higher pitch, and a longer line means that pitch is held for more beats. Codesynth uses a basic pentatonic scale in A.## Deploy and build
Codesynth is an application in a [single JavaScript file](static/js/main.js), and has no build step for modern browsers.
To deploy Codesynth, I use `yarn deploy` which uses Surge to deploy the static site.