Inspiration

Ever since elementary school, I've been deeply committed to playing the clarinet, and now as a member of the New Providence Marching Band, my passion for music has only grown. However, one of the persistent challenges I face during practice is maintaining proper posture and technique. Despite my best efforts, I often catch myself slouching or holding the clarinet in a way that isn't optimal. Over time, I've realized how these subtle habits can negatively impact my playing, leading to discomfort, diminished sound quality, and even the risk of injury.

In rehearsals or lessons, my band director or teacher is there to guide me and correct my form. But during individual practice sessions, I’m on my own, and it’s easy for these bad habits to slip by unnoticed. This gap between instruction and practice led me to imagine a solution: a real-time posture checker designed specifically for clarinet players.

The Clarinet Posture Checker would act like a personal coach, always present to monitor my form and provide instant feedback. It would alert me when I start to slouch or when my hand positioning isn’t quite right, helping me make immediate adjustments. By reinforcing good habits and ensuring that I practice with the correct posture, this tool would not only enhance my playing in the short term but also protect my physical health over the long run.

This device could be a game-changer for musicians at all levels. For beginners, it would instill the importance of proper technique from the very start, preventing the development of bad habits. For more experienced players like myself, it would serve as a reliable check, ensuring that our years of training aren’t undermined by lapses in form during solitary practice.

Ultimately, the Clarinet Posture Checker would bridge the gap between professional guidance and independent practice, empowering clarinet players to consistently perform at their best and enjoy their music with confidence and ease.

What it does

The Clarinet Posture Checker leverages a machine learning image model to assess your form in three critical areas: finger placement, horn angle, and back posture. Each of these aspects has its dedicated model, allowing you to focus on improving specific elements of your technique.

Using the tool is simple: select the aspect you want to check, read the provided instructions, and click start. The tool then activates live video feedback, showing your playing posture in real-time. Below the video, the system displays tailored feedback, identifying any issues and offering corrective advice, or confirming that your posture is perfect.

After reviewing your feedback, you can easily return to the home page and select another aspect to evaluate. The Clarinet Posture Checker makes it easy to focus on one area at a time, ensuring comprehensive, step-by-step improvements in your clarinet technique.

How we built it

First, I started by creating an image project using Teachable Machine to test the feasibility of my idea. My initial focus was on evaluating back posture while holding the clarinet, simply adjusting my back’s shape to see if the model could accurately distinguish between different postures. This initial test was successful, validating the potential of the concept.

Next, I used the Teachable Machine Node API to generate results from this model in a separate window. This step required considerable effort, as integrating the model with an external interface presented some technical challenges, which I’ll elaborate on later.

After setting up the basic model, I moved on to refining the output. Initially, the model provided labels and probabilities for each posture. To make this more user-friendly, I modified the outputs to display specific corrective feedback or an affirmation of good posture when certain thresholds were met. While I initially tried determining these thresholds using an ROC curve, I eventually settled on a more intuitive trial-and-error approach to fine-tune the system.

Following the same steps, with some minor adjustments, I developed models for the other two aspects: finger placement and horn angle. This resulted in three separate webpages, each dedicated to analyzing a different element of clarinet posture.

To unify these pages, I created a home webpage featuring hyperlinked buttons for easy navigation to each posture check. Each subpage also included a home button to allow users to switch between posture checks seamlessly. Finally, I added some color and styling to the pages, ensuring that the site was visually appealing and easy to understand for users.

Challenges we ran into

During the API integration section, I encountered several issues that needed to be addressed to make the Clarinet Posture Checker function smoothly.

One of the main challenges was managing the real-time image analysis, which demands quick processing to provide useful feedback. There were instances where the API or the model took too long to process the video feed, leading to noticeable lag. This lag made the feedback less effective, so optimizing both the model and API for better performance became essential. Achieving this required a delicate balance between accuracy and sensitivity, and I had to use a trial-and-error approach. This process was quite time-consuming and involved multiple iterations to get it right.

Debugging was another significant hurdle. The program required extensive debugging to run correctly, and one particularly tricky issue involved the output not being in the correct format. This problem stemmed from an array index out-of-bounds exception in the prediction array, which occurred at the end of a for loop. Resolving this took some time, and similar errors, like issues with continuous alerts and looping processes, also needed to be fixed.

When creating the homepage, I ran into another issue where the button to return to the homepage from a subpage kept disappearing. After some investigation, I discovered that the problem was related to a JavaScript function, init, which was active on one button but not the other. This discrepancy was causing the button to vanish, but once identified, it was corrected.

There were numerous other bugs along the way, but with persistence and careful debugging, I was able to resolve them and get the Clarinet Posture Checker functioning as intended.

Accomplishments that we're proud of

I'm incredibly proud of several accomplishments related to this project, each of which has been instrumental in building a solid foundation and paving the way for future advancements.

Firstly, developing and integrating the Clarinet Posture Checker from scratch was a significant achievement. By creating a functional tool that leverages machine learning for real-time posture correction, I’ve established a robust foundation for this project. This accomplishment not only demonstrates the viability of the concept but also sets the stage for expanding its capabilities.

One of the most exciting aspects of this project is the potential for further development. With a successful base model for the clarinet, there’s a clear path to adapting this technology for other instruments. This opens up opportunities to apply similar image analysis techniques to a range of musical instruments, each with its own unique posture and technique requirements. The ability to scale and adapt the model to different contexts highlights the versatility and potential impact of this technology.

On a personal level, the ability to use this tool for my own practice is a major milestone. Having a reliable, real-time posture checker will significantly enhance my practice sessions, allowing me to maintain optimal technique and avoid bad habits. This practical application not only benefits my personal growth as a musician but also underscores the value of the project in improving the playing experience for others.

Overall, these accomplishments represent not just technical and developmental successes, but also a meaningful step forward in both personal and broader musical contexts. The project has laid the groundwork for future innovations and applications, and I’m excited about the possibilities it presents for advancing music practice and performance.

What we learned

Through the development of the Clarinet Posture Checker, I’ve gained valuable insights and skills that extend beyond the technical aspects of the project:

Machine Learning Integration: I learned how to apply machine learning models to real-time image analysis, including how to train models and integrate them with APIs. This experience has deepened my understanding of both the capabilities and limitations of machine learning in practical applications.

Performance Optimization: The project highlighted the importance of optimizing both the model and API for performance. I learned techniques to minimize lag and ensure that real-time feedback is both accurate and timely, which is crucial for applications requiring instant responses.

Debugging and Problem-Solving: Debugging was a major part of the process, and I became adept at troubleshooting a variety of issues, from array index errors to JavaScript functionality problems. This experience has improved my problem-solving skills and taught me to approach bugs methodically.

User Interface Design: Creating a user-friendly interface required a good balance between functionality and aesthetics. I learned how to design an interface that is both intuitive and visually appealing, ensuring that users can easily navigate the tool and understand its feedback.

Project Management: Managing a complex project with multiple components—like different posture checks and integrating them into a cohesive user experience—taught me valuable lessons in project planning, execution, and iteration.

Adaptability and Flexibility: The process involved adapting to various challenges and changing requirements. I learned how to be flexible and responsive to unexpected issues, which is essential for successfully completing any complex project.

Expanding Potential Applications: I realized the potential for applying this technology to other instruments and musical contexts, broadening my perspective on how machine learning can be used to enhance various aspects of music practice and performance.

Personal Growth: On a personal level, the project reinforced the importance of perseverance and creativity in problem-solving. It also provided a practical tool that I can use to improve my own clarinet playing, demonstrating the direct impact of technology on personal development.

What's next for Clarinet Posture Checker

The sky's the limit! branching out to different instruments, enhancing the model and fine-tuning the threshold while also adding a sound feedback feature so musicians while practicing don't have to look back makes sense!

Share this project:

Updates