Giter VIP home page Giter VIP logo

67-443-project's Introduction

Welcome to our app: “Chordable”

This is an IOS mobile application written in Swift as part of our project for course 67-443, affiliated with Carnegie Mellon University

Contributors: Minjoo Kim, Ariel Kwak, Owen Gometz Contact: [email protected]

*NOTE: If you are not a grader, please skip to “Additional Notes” at the bottom


Overview:

Chordable is an app for beginning guitar players who want to learn to play. Users can browse our selection of 24 chords to learn, and 188 songs to play. All chords are initially incomplete, and similarly, all songs are initially locked. In order to complete a chord, users can navigate to our Chords tab, click on a desired chord, and make use of several diagrams and sample audio in order to learn that chord. When users feel they are ready, they can utilize our “Try It” feature to record themselves playing a strum of that chord, to which the app will respond with success or try again feedback. Powered by our chord_recognition machine learning model, if it was a success, that chord has been completed. Songs are categorized into several genres, from which users can browse through. In order to unlock a song within any genre, users must complete all the chords present in that song. Users are made aware of which chords are required of any given song. Once users unlock a song, they gain access to the play-along feature for that song. The specific song plays in the background as an animation is displayed, showing chord transitions at the correct timing so users can effectively play-along with the song. Users can track their overall progress with the app by visiting the home page, which displays several metrics for growth. Users can always re-learn chords and restart songs.


Users:

Understand that our app is for beginner, motivated guitarists. Meeting the needs of all experience levels would be out-of-scope for this project, and focusing on one demographic has led to a robust and simple app that doesn’t over-extend itself. As such, our app is catered toward users with little-to-no experience with the guitar, and is meant to serve as a tool for them until they become intermediate players. Furthermore, it needs to be understood that learning an instrument is notoriously hard to stick with. We all know people who have tried and failed, probably multiple times. Our app was designed with the assumption that those downloading our app are ready to begin an extended process, because that's what it takes to learn an instrument regardless of the appeal of an app. It is imperative to fully acknowledge this frame of mind for our users before evaluating the viability of a potential business model surrounding this app.


Data:

Given the correct understanding of our target objective and intended user, we have thoughtfully equipped our app with data sources to cater to our users’ needs. Chordable offers support for 24 beginner-friendly chords: the basic major and minor chords. 2 for each of the 12 notes on the musical scale. This choice was made to not overwhelm users with complicated chord shapes and musical semantics that would deter a beginner. There is a seamless progression of easy, medium to hard chords comprising our selection. Furthermore, Chordable supports 188 classic songs from the late 20th century that are recognizable, with mostly simple progressions. Users will find that perfecting chord transition timing is made much easier when there is a simple and slow progression and when they recognize the tune. The data on these songs have been gathered from a public github repository, credits to tmc323: https://github.com/tmc323/Chord-Annotations/tree/master

Indeed, once users complete all 24 chords, and subsequently unlock all 188 songs there is no more upward mobility aside from perfecting the songs. However, once users reach this level they inherently become out-of-scope for our App, and we will have successfully brought them to intermediate status. Further work on this app can be done to increase the chord and song selection to appeal to more advanced players.


Technical Implementation:

In our pursuit of delivering a seamless and highly optimized user experience on Apple devices, our team has chosen to use Core Data, Apple's own robust and comprehensive framework. This natively stores and manages our application's data, ensuring that our solution is not only well-integrated within the Apple ecosystem but also benefits from the efficiency and advanced features that Core Data offers. This decision allows for faster data access speeds and the ability to function seamlessly without the need for a continuous Wi-Fi connection. Further, since our app does not store a very large amount of data, employing Core Data does not impose significant storage burdens on our users' devices, thereby maintaining a lightweight and efficient user experience. Our data requirements also fit well with the Object-Relational Mapping framework, since all of our data is easily represented with entity definitions and relationships between them.

In regards to the machine learning model that powers our app’s chord recognition capabilities, this was a model that was built from scratch. Albeit with the use of the handy scikit-learn Python library, all of the training data was recorded personally by the developers. The model is trained on 75 raw audio files for each of the 24 chords, totalling 1800 files in total. The recordings were gathered using various guitars in different settings to justify a generalizable model. Further, to artificially increase the sample size, 5 iterations of augmentations were applied to add white noise, slightly increase & lower pitch, and speed up & down the files. This totals to 10,800 pieces of training data. All this was done in efforts to produce a model that will make accurate predictions in the variety of settings that users may find themselves in. In terms of deployment, this ML model was embedded within a Flask app, which was uploaded to a pythonAnywhere supported environment, from which we could make POST requests from our IOS app.

Finally, our team has integrated with the Spotify API to further benefit our users. When browsing through songs, the album covers are acquired from the Spotify endpoint so that users have a higher likelihood of recognizing a song, and in turn becoming more motivated to unlock it and play along. Additionally, when users unlock songs, they can view an animation which shows when to transition between chords while the song is simultaneously playing in the background. This is made possible through our use of the Spotify API.


Miscellaneous Design Decisions:

Within the Home tab, we made several design choices to enhance the experience for our users. We wanted to display three metrics: day streak, chords completed, and songs unlocked. In our view, these are the most apparent indicators of progress for our users. We wanted this to be a page that users could look at, and feel motivated to continue their progress.

In the Chords tab, specifically the chord-learning view for a specific chord, we have decided to disable all buttons while the user is recording themselves. This makes for a controlled environment for them to record themselves, and protects against accidental clicks.

In the songs play-along feature, there is a play-along toggle, and a restart button. The restart button can only be clicked when the song is at a paused state. Additionally, the play-along toggle can only be toggled when the song is at its starting position. These were choices that were made to simplify the play-along experience.

Furthermore, you will notice that the Chord names displayed in the Chords tab include the chord name, and the quality (major or minor). However, the chord names displayed in the play-along feature are shown a bit differently. Minor chords have a trailing lower-case “m,” and all other chords are understood to be major. This was done for several reasons. First, including the full word “major” or “minor” would make for a very unattractive and visually displeasing animation, especially given our choice to show the chords in small circles. Also, this will get our users more used to different chord name displays, commonly found in the music industry and online resources.


Testing:

From our testing suite, you will see two top-level folders: 443-Chordable.app, and SpotifyAPI. Given that the SpotifyAPI has been thoroughly tested publicly, our team did not test this component. You will find that the 443-Chordable.app has under 25% coverage. I am unspecific here due to the fact that this metric is subject to seemingly random change. Without modifying any tests, different runs of our testing suite will result in both ~23.6% coverage of our app, and also ~11.1% coverage. Please run our testing suite at least 3 times back to back to get the most accurate results. The 23.6% coverage run is the accurate report.

First and foremost, the largest contributing factor in this low coverage is due to the View files. Since we were not required to test the View files, the coverage on these files is generally low (some tests cover components of the View files, apparently). Furthermore, given that our app largely uses audio tracking which resulted in variable asynchronous wait times, testing posed a challenge for our group. For instance, a file like SongsForGenreViewController is incredibly difficult to test, since it requires the Spotify extension as part of its setup and functionality. As such, all of the functions within this controller rely on this extension. Building workarounds and/or mockSpotify classes to test these functionalities made little sense, given that we know the Spotify functions we are using have been thoroughly tested already. Therefore, this file is left untested. To add, you will see that some files have less than 100% coverage. For example, within the ChordDetailViewController, functions like playChords, which rely on connecting to audio which cause a whole plethora of inconsistencies as it relates to timing, are left untested. Regardless, we ran the calculations on total coverage and even in spite of these justified decisions, our total coverage on files that are expected to be tested is above 90%.

Please be aware that due to variable wait times for test functions that rely on audio or recording timers, there is a possibility that certain tests may fail. Similar to the aforementioned indiscriminate reporting of test coverage, we have noticed that separate runs of the same test suite will result in different outcomes for certain functions. We believe that we have made modifications that make it very unlikely that this will happen, but it may.

As a last note, you may find that running the tests will produce some error messages in the terminal, specifically related to CoreData. We took a deep-dive into this issue, and determined that our setup and teardown methods within each test class work as expected, so we made the choice to prioritize maximizing testing rather than spend unnecessary time on an error that was not outwardly blocking us from realizing a respectable coverage.


Additional Notes:

This section is meant to inform users on potential mishaps regarding installation, onboarding, and other scenarios one might find themselves in when interacting with our app.

Connecting to Spotify: Upon opening the app, you will see the Welcome screen, where you are supposed to enter your name and continue. After this, you will see a page where you can connect to Spotify. You will see a white button at the bottom that is supposed to say “Connect to Spotify.” On the iPhone, this text may not show, even though the button will. On the simulator app on a MacOS device, this has never been an issue, but for some reason there is a bizarre effect that our app has on the iPhone itself that causes this. Click the blank white button and proceed to input your Spotify credentials. Please note that you must have a paid account to use our app. This should not happen, but there is a chance that after you follow the steps and navigate back to the app, nothing happens and you stare at a blank screen. Or maybe you will see a loading screen for a long time. We suspect that this has to do with the way our team has handled returning downloaders, and that it only affects us developers who constantly reinstall the app for testing purposes. Therefore, we don’t expect this to be an issue. We have a method of getting around this, so if this arises please get in contact with the development team. But as long as you only download the app once, you should not experience this issue. After you get past these steps, please navigate to the songs tab, click on a genre, and confirm that you are able to see the images of album covers alongside song titles. If you do, then you are connected to Spotify properly, if you cannot, there is an issue.

~

First-time use: When navigating back to the app after the Spotify onboarding, and assuming you are properly directed to the Home tab, there is a chance that the app freezes when you try to click on another tab. This is very rare, but it has happened a few times in the stages of development for unknown reasons. However, you can get around this issue by exiting the app and going back into it. If this fails, try deleting the app, re-installing, and going through the steps again. We can guarantee that these steps will solve this issue. If not, reach out to the development team. Again, this has only ever been an issue on the iphone, not the computer simulator.

~

Chord recognition response time: Especially on the first few uses, the chord recognition feature may take several seconds. In our experience, the wait time never exceeds 10 seconds. This sounds like a lot, but this has only ever happened once in the earlier stages of development. More recently, the feedback takes 1-3 seconds for the first few uses, and after that they are almost instantaneous.

~

Model inaccuracy: As with any machine learning model, random error is an inevitable factor. Especially within our timeframe and scope of the project, the model was only able to be trained on 10,800 audio files. This may sound like a lot, but more sophisticated ML models are trained on millions of pieces of data. As such, there isn’t enough data for the model to be completely certain on the distinction between the chords. Every prediction is a best guess, so there will be times where a chord was played properly, but the model predicts the incorrect chord. Even though our tests indicate an accuracy rate of above 90%, we suggest trying out the recognition at least 3 times for a particular chord for best results.

~

Stubborn chords: In the same vein as the previous note, there are some chords that are particularly stubborn. By this, we mean that there are chords that our model consistently reports inaccurately, ultimately making them consistently difficult to complete. Over the course of this project, the set of stubborn chords has surprisingly evolved, perhaps due to the recording setting, device type, or other factors. At the moment, and identified by thorough testing, the chords you can expect that E major, E minor, and G major are particularly stubborn. Perhaps F major/minor, and F# major/minor as well. However, this may not be the case for all guitar users in all settings. You can do the following to tackle these chords:

Strum the guitar close to the microphone

Go to a quiet setting with little to no background noise

Try different strumming speeds, slow and fast

Try strumming multiple times within the 5 second duration

Try emphasizing (play louder) the specific strings that define that chords quality (major or minor). For clarity, the model often thinks an A major is an A minor, or an E major is an E minor, and vice versa. What you can do, in the case of E major/minor, is play the G string (the string that separates the two chords) more loudly/clearly than the other strings, so the model has more pronounced data to differentiate between the two.

If you are advanced, you can also try playing a different variation of the chord than is listed on the app. For instance, try playing an A bar chord on the 5th fret instead of the open A.

Please be patient. Keep trying the chords and they will eventually complete

~

Unlocking songs: We have implemented certain methods of letting users know where they stand in terms of song progress in the Songs tab. For instance, at the top of the Songs tab we display the number of songs unlocked. Also, underneath each genre we display the number of songs that the user has unlocked in that genre. Finally, If a user clicks on the title of a locked song, they can see the chords required of that song. Completed chords are highlighted purple, and incomplete chords aren’t. If a user navigates to a chord from the Chords tab itself, and completes a chord, all of these metrics will immediately update. The number of songs unlocked will update, and the coloration will go to purple once they navigate to the songs tab. However, if a user clicks on one of these chords directly from the Songs tab, then they complete it, and then they click the back button, the user has to click around a bit to see the change reflected. Likewise, if a user has completed all the chords for a song, and they click the back button, they would need to click the unlocked tab to actually see the change in song status. This isn’t inherently a flaw, because apps like DuoLingo also often don’t show immediate state changes, but we thought it would be best to state this here so as to not create confusion.

~

Play-along feature: Please have spotify open on your device in the background to utilize this feature. And please do not interact with spotify while our app is running. Also, you can use headphones while utilizing this feature, but be sure to not accidentally pause the song by taking an airpod out, because the spotify song will pause, but not the animation, so it will be out of sync and you will have to restart.

~

Some songs are better than others: Within the play-along feature, given that the Spotify soundtrack may need a second or two to boot up, some songs may not line up perfectly with the chord-transition animation. For the best experience, we suggest starting the song for a few seconds, pausing it, and restarting. We have experienced that this will allow for a faster start-up time for the song, and it will match-up better. Even with this adjustment, there are some songs that don’t quite match up perfectly. All songs are certainly playable, and advanced guitarists can fill in the gaps, but some songs are more smooth than others. Songs like “Genie in a Bottle” by Christina Agulara have quick transitions at the beginning that don't allow time for Spotify's loading, causing a choppy flow. Here is a list of songs that we can confirm are very user-friendly and fun to play along with:

Dancing Queen: Pop

I Believe: Pop

I Want it That Way: Pop

Beat It: Rock

Have You Ever Seen The Rain: Rock

I Believe I Can Fly: R&B / Soul

Take Me Home Country Roads: Folk & Country

Wonderwall: Alternative

Yellow: Alternative

67-443-project's People

Contributors

arielkwak avatar minjooki avatar ogometz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ogometz

67-443-project's Issues

Sprint-4: Scroll bar

In the Chords tab, users will be able to scroll up and down using a scroll bar

Sprint 2: Survey for Mentor Meeting

In addition, you are required to turn in a one-page report on your mentor meeting(s). You will be provided a template for these reports and must use the template; failure to do so will result in a 25% penalty on this phase.

Our meeting with Alina is 9/29

Due: 9/30 (24 hours after meeting with Alina)

Sprint 3: Prototyping

Create prototype version of the hifi wireframe to show the detailed interactions a user could have during the app session.

Due: October 15, 2023

Sprint-4: Finger Position Guide

On the Chord detail view page, users will be able to see a diagram image displaying the finger positioning for that chord. Create a button that will show this diagram

Sprint 1: Gather Data Points

From the issue, the team should research or come up with ideas on collecting data points to support the ultimate app decision made.

  • If the team decides to focus on data points from online, link the data source, the summary of what the data presents, and how the data helps us decide why we decided on the project
  • If the team decides to create user surveys, create a Google survey form by Sunday and send out a survey with the goal of gathering 10-15 responses.

If the team is not able to agree on one app idea and would like to discuss with Katie on Monday which idea would work best, be sure to come up with data points/survey by Monday night.

Sprint-4: Example chord audio

When users click on a specific chord, they will be able to click a button at the top of the chord detail page to hear what the chord should should like

Sprint-4: Tab bar

Users will be able to navigate through our app using 3 tabs, Chords, Home, and Songs

Sprint 1: Take notes on advices from Alina

With the meeting being held on September 15th (Friday) 12 pm - 1pm, take notes on the advice Alina provides during the meeting.

The notes should be organized by:
Design, Technical, Ideation, Project Management, Other

Please take notes on this google doc

Sprint 1: Solidifying Idea

After the mentor meeting with Alina, solidify 1-2 ideas during the group meeting.

During the meeting

  • Discuss an idea the group wants to do
  • Research together on feasibility, viability, desirability
  • Plan how to gather data points

If the team is unsure of two/three strong ideas, still come up with research and prepare concrete points for feasibility, viability, and desirability and discuss with Katie.

Sprint 3: Create lists of structs

Create a set of structs that will be populated and provide data to the app

Due: October 23, 2023

Ask Katie on what the non-API structs examples should look like

Sprint3: Swift playground connecting to and parsing guitar chord API

As per
"For an external API, the team must provide a Swift playground (similar to what was done in class) showing that they can access the API and parse the JSON provided."
requirement of the sprint. Regarding an API which gives our App access to data on guitar chords for songs users may like.

Due: October 15, 2023

Sprint 2: Creation of Hi-Fi

Create a Hi-Fi wireframe based on the user-testing feedback from lo-fi wireframes. Create on Figma.

Due Date: 10/2

Sprint 4: Refine Navigation Bar

The navigation bar should have the chords, home, songs tab and when triggered should go to the correct page and also highlight itself. Implement the navigation bar and for pages that aren't due this sprint, put a placeholder.

Sprint 3: Hi-Fi Markup

Provide a clear mapping of the data needed on each screen and where that data is coming from

Due: October 24, 2023

Sprint 2: User Testing on HiFi

This is part of an extra credit

Do user testing and have testers achieve end goals through the hi-fi prototypes. Gather feedback on the user testing. Specifics for metrics on improvement will be determined.

Due Date: 10/3

Sprint 1: Write Report

Write a report due 4pm on 9/21 (Thursday) and email to Alina and Katie.

Grading
This will constitute 4% of our grade.

Criteria
Need to complete it on the provided template by profH, include data points, and answer questions below (keeping in mind of desirability, viability, and feasibility).

  • How well does the app fit in with the mobile mindset?

  • Does this app utilize any of the strengths of the mobile platform?

  • What are the main features of the app?

  • Who are the target users of the application?

  • What is the pain point that your app addresses?

  • What is the value provided by the app?

  • What is your app’s lifespan? Opportunity for return users?

  • What has been learned from user research performed to date to support these positions?

  • What (if any) existing APIs are you planning on using?

  • What is the biggest foreseeable challenge for implementation?

Sprint 3: CoreData/Firebase Demonstration

If the team is using Firebase, they must document the JSON structure of the documents they are going to create and then access them in Firebase.

If the team is using CoreData, you should just integrate CoreData with your structs and test that you’re able to render that data.

Sprint 3: Create Report

Compile all the issues and generate a report to send:

The submission of these deliverables is due electronically to Prof. H, your supervising TA, and alumni mentor by 4pm on Thursday, October 26, 2023. It will constitute 3 percent of your final course grade.

Sprint 2: Generate Report

This sprint's deliverables include both a set of low- and high-fidelity wireframes and a written report of the user interaction study. The submission of these deliverables is due electronically to Prof. H, your supervising TA, and alumni mentor by 4pm on Thursday, October 5, 2023. It will constitute 4 percent of your final course grade.

Due: 10/5

Sprint 1: Ideation of Possible Apps

Before meeting come up with possible app ideas to run through with Alina.

  • Research if already exists (if it does, how can we improve it? How is our idea different)
  • Think of desirability, feasibility, viability

Sprint-4: Welcome page & enter user-specific information

Upon first opening the app, users will see a welcome page and will be able to enter their name. Update UserInfo Entity with name, initialize metric attributes to 0. This page should only be shown upon first entry of the app. When user navigates fully through these steps, user should be shown the Home page.

Sprint 2: User Testing on LoFi

Gather feedback on the user stories/user end-goals from at least 4 user-testings. Measure which of the two lo-fis is better and how it could be improved.

Due: 9/25

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.