View on GitHub

Musy

A programming language for music enthusiasts

Download this project as a .zip file Download this project as a tar.gz file

Musy Description

With Musy you can create music on the fly with a programming language that’s versatile and allows you to create songs from notes and phrases. You can also export your created songs to MIDI files and listen to them from anywhere! In this page you will find the source code as well as a language tutorial and a technical reference manual. Enjoy!

Our Motivation

Music is something that can be created with almost anything and with a good ear. These things vary from actual musical instruments to something as simple as a table top. However, not everybody has the know-how of using a musical instrument or creating one. Some of these people may have studied music and may know how to create music but wielding an instrument is not the same thing. You can have the knowledge but if you don’t have the talent or abilities, you may never be able to create music on your own. That is what motivated us to develop Musy.

Language Features

New Song : mySong
New Phrase : part1
Add Note A4 1/2 To part1
Add Note B6 1/1 To part1
Add Note C3 1/4 To part1
New Phrase : part2
Add Note E7 1/4 To part2
Add Note F2 1/4 To part2
Add Note A5 1/4 To part2
Tempo : 300
Play : mySong
Compose : mySong

Our Approach

First, we defined the lexical and grammar specifications according to the needs of the programming language. We did research on the API's available to create music with a programming language. Once we got the grammar and the expressions that the language would have then we proceeded to compile with JavaCC which generates the scanner. This scanner takes a program as input and creates tokens based on the grammar defined earlier. We were then able to connect the Java music API with these tokens and expressions and perform different functions that allow the user to create music.

Musy Demo

Final Report

Click here to download the PDF file of the final report.

Authors

  • Edwin Rivera - (@edwinrivera)
  • Nelson Alemar - (@nelsonalemar)
  • Josue Albarran - (@josuealbarran)