Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softloud/digmus
Animating a melody as a mathematical graph
https://github.com/softloud/digmus
Last synced: about 2 months ago
JSON representation
Animating a melody as a mathematical graph
- Host: GitHub
- URL: https://github.com/softloud/digmus
- Owner: softloud
- Created: 2024-04-24T10:23:15.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-12T11:34:50.000Z (7 months ago)
- Last Synced: 2024-10-12T21:28:54.395Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 64.6 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# digmus
![](outputs/plots-tabs/melody_graph.jpg)
An experimentation with animating a melody as a graph.
[![](http://img.youtube.com/vi/hmPNfeZ7w9k/0.jpg)](http://www.youtube.com/watch?v=hmPNfeZ7w9k "Contrapunctus I Subject as Animated Graph")
![](outputs/plots-tabs/melody-table.png)
## Unsolved problem
Including a self loop on the graph gets the timing right, however, the first edge is dropped.
![](outputs/plots-tabs/melody-graphable.png)
## Packages used
### r
```r
# key packages used
library(pyramidi) # midi wrangling
library(tidygraph) # graph creation
library(ggraph) # graph plotting
library(gganimate) # animation
library(tidyverse) # r tools# other packages
library(zealot)
library(gt)
library(jpeg)
library(grid)```
### bash
```bash
ffmpeg
timidity```
## Midi
[Raw midi file](https://github.com/softloud/digmus/tree/main/midi) sourced from wikipedia's page on [The Art of Fugue](https://en.wikipedia.org/wiki/The_Art_of_Fugue).
![](https://upload.wikimedia.org/wikipedia/commons/0/06/Title_page_of_The_Art_of_Fugue.jpg)
## Code
See [step-by-step](https://github.com/softloud/digmus/tree/main/step-by-step) for each step of the process, from wranging midi, to plotting a graph, to animation.
## Outputs
Written to outputs/, but not all files are there as some of the intermediary files are too large to push to Git.