Skip to content

A hacky Python script to make musical Desmos graphs

License

Notifications You must be signed in to change notification settings

AlexApps99/MIDI2Desmos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MIDI 2 Desmos

Program Usage

Make sure you have installed the python library mido from PIP before using this!

python3 graph.py [file] [midi channel] [# of midi events] [semitones to transpose, + or -]

Term Explanation
file The location of the MIDI file to be processed
midi channel The channel of the MIDI file to be processed
# of midi events How many MIDI events to be processed before stopping
semitones to transpose Set this number accordingly so the song is in range of the graph

Examples

  • python3 graph.py examples/allstar.mid 1 125 19
  • python3 graph.py examples/astley.mid 4 125 13

Desmos Playback

  1. In graph settings, make sure both the X and Y scale are 0 to 100 exactly
  2. Make sure during this process you do not zoom in or out, pan around or do anything to affect the scale
  3. Paste the output of this program into a formula cell
  4. Select the formula onscreen so it is highlighted
  5. Enable Audio Trace with Alt-T, on mac Option-T
  6. Set the tempo with Alt-(1-5), on mac Option-(1-5)
  7. Finally, playback with H.

How?

https://www.desmos.com/accessibility#audio-trace

Examples

PRs

Pull Requests are highly encouraged! This was quickly hacked together by me and any improvements would be a welcome addition to this project.

About

A hacky Python script to make musical Desmos graphs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages