Sheet Music Generator using Mega32 Microcontroller

Introduction

If you are a music buff, then our sheet music generator will be the answer to your dreams. You plug in the instrument of your choice and as you play the keys our system will create the sheet music that attests to your musical genius. Although there are similar systems on the market. They are extremely expensive and difficult to set up. Our system has the advantages of affordability and ease of use.

Sheet Music Generator using Mega32 Microcontroller
Sheet Music Generator using Mega32 Microcontroller

The sheet music generator operates as follows. The user plugs a keyboard into the midi cable attached to our circuit. Then he or she can then play the instrument which prompts the sheet music generator to draw the notes played on the TV screen. Once the three staffs displayed on the screen at one time are filled, the sheet is automatically scrolled, allowing the user to compose music indefinitely. As each individual screen is filled, i.e. the three staffs are filled, the user presses button D on the keypad provided to send the sheet music to the PC for storage and printing. If the user wishes to start a new piece of sheet music, he can press button # on the keypad and a new document will start.
The sheet music generator system consists of a simple circuit that inputs the midi signals from the instrument to the microcontroller. These midi signals are processed and the firmware performs note drawing routines on the TV. As the user composes music, she can interact with the system through a keypad and a GUI which allows the user to send the sheet music to the PC, save it as a bitmap, and print it.

Benefits

Inexpensive: The Mega32 microcontroller that we used is cheap and fairly easy to interface with a number of different standards, such as NTSC television and MIDI. Very little software is required in order to allow the user to print his or her sheet music.
Expandable: Since MIDI is a standard digital music interface. The input to this system is not limited to just that of a keyboard. Any digital music that can be stored as MIDI can be displayed on the television screen and subsequently printed.

High level design

Many musicians dont have access to simple and affordable supplementary tools that would increase their productivity. A system that can write and save the music they generate as they experiment with their musical instrument would be invaluable. For example, as a music arranger for an Acapella group. Meg would need to experiment on the keyboard until she finds the sound desired, and then write the notes, a tedious and time consuming process. Our system would allow the music arranger to experiment without the hassle of worrying about manually inputting notes to a program. Furthermore, the sheet music generated can be widely distributed over the web and well organized in databases.

To implement the sheet music generator we must receive the midi signals outputted by the instrument using the UART. We then process the midi signals. This includes determining what note was sent and the duration of the note. The notes can then be painted on the screen. Since the screen only fits three staffs, we allow automatic scrolling once the third staff is full. Our system allows the user to start a new piece of sheet music, allowing him/her to in effect delete unwanted work, and export the sheet music to the PC.

If the user creates a new piece of sheet music, we reinitialize the drawing variables and TV screen and enable the UART to receive midi signals. If the user selects to interact with the PC, we enable the UART to communicate with the PC and start the GUI that allows the user to perform tasks such as storing the sheet music and print it. Figure 2 shows a pictorial view of the system implementation.Sheet Music Generator using Mega32 Microcontroller diagram

Hardware Design

MIDI Interface
The midi signal output by the music instrument is sent through an optoisolator circuit to the UART of the Mega32 microcontroller. The optoisolator circuit keeps the music instrument and the sheet music generator system electrically isolated from each other so that any current spikes present in the midi output dont affect the UART. Figure 3 shows the hardware diagram.

 Parts List:

Part Part Number Manufacturer Price
Microcontroller Mega32� Atmel $5/unit
Optoisolator HP6N138 Sharp $1.50/unit
Resistors
Diode 1N914
Midi Cable (Din 5 to Din 5 or male to male) $5/unit
RCA Video cable $2/unit
Keypad QUF 9724 $2/unit

For more detail: Sheet Music Generator


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top