jsbean / HarmonicNetwork

Find your way through a network of harmony
MIT License
4 stars 1 forks source link

Harmonic Network

Swift Version Platforms Build Status

Find your way through a network of harmony.

Products

Harmonic Network web app

Navigate to the Harmonic Network web app here.

Each node in this network represents a chord (expressed in a roman numeral notation). You can build up a chord progression by selecting one of the nodes connected to the currently highlighted one. You will start on the tonic (I) chord, and it's up to you to make some music from there.

The probability of going from any node to another is derived from the works of J.S. Bach (other composers coming soon!) and is represented by the darkness of the arrowed lines connecting them.

Example

Harmonic Network command line interface (CLI)

HarmonicNetworkCLI is a command line interface version of the web app shown above.

Example

Usage

swift build
./.build/debug/HarmonicNetworkCLI

Press the number corresponding to the chord to which you'd like to progress, to undo or redo, or to be done with the whole thing.

--one-shot (-o)

You can engage the --one-shot flag when you run the command line interface.

./.build/debug/HarmonicNetworkCLI --one-shot

The --one-shot flag (-o for short) tells the program that you only want to create a single tonic progression. That is to say, as soon as you get to the tonic (I) chord again, the game's up.

If you don't call the --one-shot flag, you will choose new harmonies for the rest of eternity, or until you select the done option, your laptop battery runs out, or until the heat death of the universe. Your call.

Contributing

Requirements

In order to contribute to the development of the harmonic network applications, you'll need a few things:

Development

To start hacking away, clone this repository. You can copy and paste this into the Terminal.

git clone https://github.com/jsbean/HarmonicNetwork && cd HarmonicNetwork

Targets

There are several targets in this Swift Package:

To build and run the web app locally, build and run the server executable.

swift run HarmonicNetworkServer

You can do also do this in Xcode by selecting the HarmonicNetworkServer scheme and pressing the button.

You should see the following:

Server starting on http://localhost:8080

Then in your favorite web browser, navigate to localhost:8080.

Inspiration

These tools are inspired by the chord-sequence-chooser by @bwetherfield.