Skip to content

Generate melodies from an n-dimensional maze with depth first search algorithm

Notifications You must be signed in to change notification settings

leoauri/interval-maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interval Maze

Build mazes with depth first search algorithm, in a specified number of dimensions.
Use the mazes to generate melodies, where higher dimensions correspond to larger intervals. Listen to renderings of the generated melodies with music21 library.

The Jupyter Notebook contains more notes, diagrammes and examples.

Installation

  • clone repo
  • cd into directory
  • pipenv install
  • run notebook in environment: pipenv run jupyter notebook
  • install MuseScore to see scores, for example with brew cask install musescore

In case of a problem where music21 has a misconfigured path to MuseScore, this snippet may solve it:

path = '/Applications/MuseScore 3.app/Contents/MacOS/mscore'

import music21
import pathlib

music21.environment.set('musicxmlPath', pathlib.PosixPath(path))
music21.environment.set('musescoreDirectPNGPath', pathlib.PosixPath(path))

About

Generate melodies from an n-dimensional maze with depth first search algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published