## Inspiration

I love playing the guitar, and I thought it would be interesting to have a teleprompter for guitar sheet music, as it could double as a metronome and a replacement for standard paper sheet music. Guitar sheet music, or *tab*, is much simpler than standard sheet music: It's presented in a somewhat unstandardized text based format, with six lines of hyphens representing strings on a guitar, and integers along the lines to indicate the placement of the notes (on the guitar's frets). The horizontal position of the notes in a bar roughly indicates the note's timing, though there is no universal way to specify a note's length.

```
Q=120, 3/4 time

    G                   G/B                 C                   G/B
e|--------------------|-------------------|-0----------0--2---|-3-----------------|
B|--3----------0--1---|-3-----------------|------1--3---------|-------------------|
G|o------0--2---------|-------0-----0-----|-------------------|-------0-----0-----|
D|o-------------------|-------------------|-------------------|-------------------|
A|-------------0------|-2-----------------|-3-----------------|-2-----------------|
E|--3-----------------|-------------------|-------------------|-------------------|

    Am                  G                   D    G/B   G        D7
e|--------------------|-------------------|-------------------|-------------------|
B|--1----3--1--0------|-0----1--0---------|------------0------|-------------------|
G|----------------2---|------------2--0---|------0--2-----0---|-2-----------------|
D|--------------------|-------------------|-4-----------------|-0----0------------|
A|--0-----------------|-------------------|-5----2------------|---------3--2--0---|
E|--------------------|-3-----------------|------------3------|-------------------|

```

For example, here are the first 8 measures of Bach's Minuet in G major. [source: Ultimate Guitar](https://tabs.ultimate-guitar.com/tab/christian-petzold/minuet-in-g-major-tabs-189404)

Many popular tab sites have an autoscrolling feature, which performs a similar music-teleprompter-like role, suggesting a need for something like TabRunner.

## What it does

I built:

1. React-based tab parser to take in tab like the one above and extract out the note data into a machine instruction inspired encoding.
2. An Arduino-powered hardware device that takes in the encoded data and renders it onto an 128x64 OLED screen, one measure at a time, with buttons that control the tempo (the delay between measures).

## How we built it

1. Used the [ES8266 OLED SSD1306](https://github.com/ThingPulse/esp8266-oled-ssd1306) library to render lines (representing guitar strings) and circles with numbers in them (representing notes).
2. Built a small application with ReactJS for frontend and minimal styling that has a textbox for notes.
![Webapp Screenshot](https://i.ibb.co/JnTpFYN/tabrunner.png).
3. Made up a way to represent "Note" objects, and ran the tab, which was just a standard, ASCII string, through a gauntlet of string manipulation functions to ultimately build up an array of Note data objects.
4. Developed an encoding to represent note objects. Inspired by machine instructions, I took the note data, which was a collection of ints/floats, and converted it into a single 12 bit binary value.

```
0b0SSS_HHHH_FFFF

```

S are string bits, representing one of the six strings (ie. 001 = high E, 010 = B, etc)
H are horizontal position/timing bits - stored as a value to be normalized from 0 to 15, with 0 representing the left end of a measure and 15 representing the right end.
F are the fret bits. There are 19 frets on a standard guitar but I've never seen anything above 15 used, nor are the higher frets particularly playable.
5. Used bit manipulation to parse out the note data from the integer encoding in the Arduino, then used that information to generate X/Y/Bar coordinates in which to render the notes.
6. Added utility functions and wired up some buttons to control the speed, as well as left and right solid bar indicators to show when the start/end of a song is, since it loops through all the bars of a song, infinitely.

## Challenges we ran into

* Processing the string data using elementary string functions was quite difficult, requiring a 4 dimensional array and a lot of scribbling odd shapes on paper
* Interfacing the Javascript objects into Arduino readable (ie. C++) code was harder than expected. I thought I could just use the standard JSON (Javascript Object Notation) string encode/decode functions but that produced a lot of issues, so I had to come up with that custom integer encoding to flatten the objects into integers, then a few bit manipulations to decode them.

## Accomplishments that we're proud of

* Building this in time!
* Coming up with an elegant encoding for notes
* I think some of the tab parsing is somewhat clever, if messy

## What we learned

* A lot about how/why to use bit manipulation
* How to wire buttons with an Arduino
* How to create a nice control loop with good feedback
* How to deal with multidimensional arrays (harder than expected!) in Arduino code

## What's next for TabRunner

* Extending this for Ukelele tab, with supporting 4 strings instead of 6
* Adding more complex tab notation like hammer on/pull off parsing
* More buttons to reset/fast forward
* Rotary encoder for tempo setting rather than buttons
* Larger screen/better assembly to mount easily to a guitar, improved visibility
## Inspiration

Our inspiration comes from the desire to democratize music creation. We saw a gap where many people, especially youth, had a passion for making music but lacked the resources, knowledge, or time to learn traditional instruments and complex DAW software. We wanted to create a solution that makes music creation accessible and enjoyable for everyone, allowing them to express their musical ideas quickly and easily.

## What it does

IHUM is an AI application that converts artists' vocals or hums into MIDI instruments. It simplifies the music creation process by allowing users to record their vocal melodies and transform them into instrumental tracks with preset instruments. This enables users to create complex musical pieces without needing to know how to play an instrument or use a DAW.

## How we built it

For the frontend, we used HTML, CSS and React JS to develop IHUM. Using React JS and its libraries such as Pitchy, we were able to process, change, and output the sound waves of audio inputs. For the backend, we used Auth0's API to create a login/signup system, which stores and verifies user emails and passwords.

## Challenges we ran into

One of the main challenges we faced was ensuring the AI's accuracy in interpreting vocal inputs and converting them into MIDI data that sounds natural and musical. Furthermore, the instruments that we converted had a ton of issues in how it sounds, especially regarding pitch, tone, etc. However, we were able to pull and troubleshoot through our way through most of them.

## Accomplishments that we're proud of

Through all the hours of hard work and effort, an accomplishment we are extremely proud of is the fact that our program is able to process the audio. By using Pitchy JS, we were able to change the audio to fit how we want it to sound. On top of this, we are also proud that we were able to implement a fully working login/signup system using Auth0's API and integrate it within the program.

## What we learned

As this was our first time working with audio in web development and many of our group's first hackathons, we faced many issues that we had to overcome and learn from. From processing to setting up APIs to modifying the sound waves, it definitely provided us valuable insight and expanded our skillsets.

## What's next for IHUM

Our future updates allow running multiple audio samples simultaneously and increasing our instrument libraries. By doing so, IHUM can essentially be a simple and easy-to-use DAW which permits the user to create entire beats out of their voice on our web application.
## Inspiration

At the age of 10, three of us had found our true passions in life...
**Playing trumpet.**

However, when learning how to play, we had to endure the immense toil of arduously and meticulously penciling in fingerings for notes.
Back in our day, it was **impossible** to be a beginner and learn to play trumpet quickly.

And that is why,
we decided once and for all,
at HACKMIT2017,
that sheet music with no fingerings
must
be
stopped.

## What it does

The snappily named Sheet Music Helper for Beginner Trumpeters takes in a pdf file of a piece of music and quickly generates for the user the same music but with the fingerings for each note written below it.

## How we built it

We used the Mac OS Automator and a program called PDFtoMusic Pro to transform the PDF into a MusicXML file. That file was then inputted into a python program which uses the music21 library and lilypad to reconstruct the visual version of the piece, analyzing each note to determine its fingering and include it in the new PDF.

## Challenges we ran into

So many...
We originally were doing a completely different project with the Microsoft Hololens: an augmented reality fidget spinner. Severe issues even setting up the device and not having access to it at night forced us to scrap it.
Afterwards, when trying to find APIs or SDKs to convert PDFs to MusicXML or MIDI files, we realized that there were none available for free or even for a reasonable price. This meant we were forced to use a GUI program (and a free trial at that) to try to make this project work. This is why we had to use the Mac OS automator to at least make the project mostly automatic. However, the program is pretty outdated and the dialog boxes were not cooperating with the Automator. So at one point we did have to manually click through one of the dialog boxes to make the program even work. Also because of this, we didn't get the chance to set up a web app which would've made the project cooler.

## Accomplishments that we're proud of

The fact that we got to play around with the Hololens- even though we couldn't really do anything it was really cool to see it in action.
The fact that Andrew stayed up for 27 hours straight (and Francisco only napped for 20 minutes).
The fact that we didn't give up and at least produced something

## What we learned

Programming in Unity is really hard
Hololens is **really** cool
Converting from PDF to MusicXML is not a simple task

## What's next for Sheet Music Helper for Beginner Trumpeters

If we were to continue this project, here would be some of our next steps:
Support for other instruments like flute, saxophone, french horn, trombone, etc.
Developing a web app
Actually getting an API to do the conversion
Using our own algorithm to convert from PDF to MusicXML