ManuelVargas1251 / Twelve-Tone-Generator

Web application that creates a random twelve tone row for twelve tone music

Home Page:http://mnl.space/Twelve-Tone-Generator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programming language Version

Twelve Tone Generator

View Demo

This web application creates a random twelve tone row, it's matrix, and staff notation. I wanted to see how well Automatic Semicolon Insertion works so this entire project tries to be semicolon free.

Twelve tone music is music composed using all twelve notes of the musical alphabet equally. You create compositions by creating your own arrangement of the twelve notes called a tone row and creating transformations which are then placed in a matrix. You then are free to write your composition based on the matrix. When I was in high school music theory class we had to create our matrix by hand so I thought it'd be nice to have an interface that did all the work.

Some notable examples:

And my own composition (not so notable)

Special thanks to Luke Garrison for the themes.

ttg

Changelog

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Note

The notation software used, Vexflow, doesn't have a built in way to pass a '' as a valid "none" accidental so I built this function to be able to loop more efficiently.

//creating notes array for note objects to be pushed
let notes = []

tone_row.forEach(function(tone){

	//if note has either accidental, pass object with modifier
	if(tone[1] == '#' || tone[1] == 'b' ){

		//push alll that to notes[th]
		notes.push(new VF.StaveNote({
			clef: clef,
			keys: [note_format(tone[0], clef)],          //vexflow keys given by note_format()
			duration: "q"                                //quarter, whole, half
		}).addAccidental(0, new VF.Accidental(tone[1])))     //adds 'accidental' modifier with '#' or 'b'
	}

	//if note has no accidental, pass object without accidental modifier
	else if(tone[1] == undefined){
	
		//push alll that to notes[th]
		notes.push(new VF.StaveNote({
			clef: clef,
			keys: [note_format(tone[0], clef)],
			duration: "q"
		}))
	}
})

References

Using Vexflow, this instruction set to create a twelve tone matrix, Wikipedia, jQuery, Hover.css, Animate.css.

About

Web application that creates a random twelve tone row for twelve tone music

http://mnl.space/Twelve-Tone-Generator/

License:Other


Languages

Language:JavaScript 49.8%Language:HTML 30.2%Language:CSS 20.0%