Notix
Suyash Singh
Posted by Suyash Singh
on May 7, 2024
Photo by on Unsplash

Motivation for building Notix

Music has always been an important part of my life! Learning new instruments and gradually improving brings a thrill unlike any other. But there’s one skill that I believe is really important when it comes to understanding and enjoying music – improvisation! Imagine being able to create and weave melodies on the spot, soaring freely over the chords. That became my next big challenge!

While I was on this musical quest, I noticed something special. My mom, an amazing sitar player, was using traditional methods to practice. It felt like there could be a better way, a way to make learning music more engaging and efficient. An idea sparked! What if I could build a tool that would help both of us?

Efficiency became the watchword. I knew complex calculations would be involved, so I needed a language that could handle it with lightning speed. That’s where Rust came in! Now, with the technical side locked down, there was another hurdle – accessibility. I decided to use React Native. This way, I could develop android and ios mobile applications for this challenge.

So, this isn’t just about learning an instrument anymore, it’s about creating a whole new experience.

Features

Select a Musical Scale

  • Users can choose from a variety of musical scales within the app.
  • This selection allows musicians to focus on specific scales relevant to their practice or performance needs.
  • It provides a foundational element for practicing melodies, improvisations, and understanding musical structures.

Select the Intervals You’d Like to Practice

  • Users have the flexibility to specify which intervals they want to work on during their practice sessions.
  • This feature enables targeted training on challenging intervals or those relevant to specific musical pieces.
  • Practicing intervals enhances a musician’s ear for pitch and harmony, crucial for accurate playing and improvisation.

App Gives Feedback for Correctly Played Notes

  • The app provides instant feedback when users accurately play notes within the selected scale and intervals.
  • This feedback mechanism reinforces correct playing techniques and encourages continuous improvement.
  • It fosters a responsive and interactive practice environment, enhancing the learning experience and motivation for musicians.

Screens

Notix Screens

Tech Stack

  • React Native
  • React Native Animations
  • Rust
  • FFT
  • Oboe
  • Android
  • Kotlin

App architecture

High Level

High Level Architecture for Notix

Rust layer

High Level Architecture for FFT Calculation

Frontend in React Native

React Native serves as the frontend framework, managing the user interface and application logic.

Rust for Audio Processing

Rust is integrated as a library for efficient audio processing on Android, utilizing Oboe for real-time audio management and FFT for converting time domain data to frequency domain.

Communication via Native Modules

Native modules act as a bridge between React Native’s JavaScript and the Rust library, facilitating seamless communication and function invocation.

Event Loop and Data Flow

Kotlin’s event loop on Android polls data processed by Rust, such as frequency calculations from FFT, and sends it to React Native’s JavaScript engine via an event emitter stream.

Benefits of the Approach

This architecture combines the performance benefits of Rust with the cross-platform capabilities of React Native, ensuring efficient audio processing and a unified development environment for Android applications.

Further Documentation

I have expanded further in my blog posts on essential topics such as integrating Rust code into React Native Android applications, performing Fast Fourier Transform (FFT) using Rust for advanced audio processing capabilities, and setting up Oboe in conjunction with Rust for optimizing Android React Native applications. These articles delve into detailed tutorials and insights aimed at enhancing developers’ understanding and proficiency in leveraging Rust’s efficiency and performance benefits within the React Native ecosystem, particularly in the realm of audio processing and native module integration.