Skip to content

Reinissance/negative-Harmony

Repository files navigation

Negative Harmony MIDI Player

A web MIDI file player with the capability to playback in negative harmony or backwards.

This tool loads and plays MIDI files using Tone.js, alters the note pitches via heavy (its JS generator), and renders the audio with WebAudioFont, while the user can select alternative sounds per channel or drumnote.

Usage

Basic

Upload a MIDI file and hit play.

External MIDI File

You can also load a MIDI file from an external link, provided the CORS headers of the source allow it (most files on bitmidi, mfiles or midikaos do) - just copy the download url of a file and paste into into the input field.

External MIDI Devices

By default the app uses soundfonts from WebAudioFont, but if an external MIDI keyboard and/or a multitimbral sound module is connected to your device, they can be used as well. With a midikeyboard attached you can also play in negative mode in realtime.

Reverse

The playback can be switched to reversed, which simply results in playing backwards. Notes longer than a quarter are then started at the note's end (aka note-off time). eirenidaB :hcaB.S.J

Modes

  • Normal: Simple MIDI playback.
  • Left-hand Piano: Inverts notes around middle D (MIDI number 62), except for drum channel 10.
  • Negative Harmony: Inverts notes around the root's thirds, except for drum channel 10. The axis lies between major and minor 3rds, so the latter becomes the former, the root becomes the 5th, and vice versa. The root of the loaded MIDI file is detected automatically, but can be changed manually.

For the last two modes pitch bend messages are turned upside down as well.

Per Octave

Negative harmony inverts the piece, making the bass the highest voice for example. Therefor you can invert notes per octave for left-hand and negative harmony modes, keeping everything close to its original place. This may cause melodies to switch octaves unexpectedly. Changing the root of the piece shifts this point in the negatively harmonized tuned voices (apart from also transposing it).

Instrument Settings

You can adjust settings such as the global speed, or for each instrument (aka each channel individually) the volume, panning and reverb, or change the instruments (override programChange Messages), or switch to another soundfont, or even override single drumSounds to another (notes on drumchannel 10), like exchange the snare with a closed hihat for example.

Sharing

If you pasted an url a share button will be provided: The url shared will include the linked file. Thus you can for example share links to specific files like: Ludwig's Knocking Fate. The url shared will also include any change you made to instruments settings (and therefor may become very long). Settings shared this way will override any midi control message in the file. This ways you can change for example also the intrumentation of a piece. When settings for a channel differ from those of the loaded midi file, a "reset to File Settings"- button will be provided.

Examples

Here are some examples of MIDI files processed with the Negative Harmony MIDI Player:

Credits

This project includes impulse response files provided by various users on freesound.org:

  • "cathedral_Saint_Pierre" by allistersandwich -- Link -- License: Attribution 4.0
  • "IR-02 (gunshot in a chapel MIXED)" by unfa -- Link -- License: Creative Commons 0
  • "Winter Forest 01.wav" by greybrother01 -- Link -- License: Creative Commons 0
  • "Shower Clap - Open.wav" by Ligidium -- Link -- License: Attribution 3.0

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Playback midi-files in negative Harmony

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published