Skip to content

Repository files navigation

VoxBox AUTO

An automatic melody-to-model music box generator

VoxBox AUTO is a C Group Project Extension in First Year Computing at Imperial College London. The project ran from May to June 2026. The project takes a user's sung or played melody and automatically generates a 3D-printable music box mechanism to play that exact tune.

As an independent extension (not using any pre-provided code from the department), this repository contains the pipeline: frontend, conversion, and modelling.

Award: Selected as a group of top 12 extensions to present at Imperial College London Open Days and to Arm Holdings.


Contributors

Ordered in alphabetical order by last name

  • Bert Chun Chang (lead)
  • Isaac Chi
  • Wania Siddiqui
  • Derek Wen

Project Structure

├── Makefile            // Build rules for compilation  
├── conversion.c        // Sample conversion routines used by pipeline  
├── conversion.h        // Header for conversion.c  
├── dywapitchtrack.c    // Pitch tracking implementation  
├── dywapitchtrack.h    // Header for dywapitchtrack.c  
├── frontend.py         // Logic for Python frontend  
├── metronome.c         // Logic for timing/metronome  
├── metronome.h         // Header for metronome.c  
├── savefile.c          // Functions to write out .wav file  
├── savefile.h          // Header for savefile.c  
├── stl_generator.c     // Generates STL file with input CSV file  
├── stl_generator.h     // Header for stl_generator.c  
├── tempo.c             // Logic for changing the recording tempo  
├── tempo.h             // Header for tempo.c  
├── tinywav.c           // Utilises tinywav library to read .wav files  
├── tinywav.h           // Header for tinywav.c  
└── voxbox_auto.py      // Describes the UI for the Python frontend  

Features & Pipeline

Our pipeline is broken down into several modular components spanning audio capture, signal processing, and 3D generation:

  1. PyQt5 application to record user input melodies.
  2. Stores the captured microphone data as a .wav file.
  3. Converts the .wav file into a .csv file (note, angle), utilising C libraries (see below).
  4. Uses vector arithmetic to convert the .csv file into a .stl music box cylinder model.
  5. Logic linking the .stl file with the 3D printing software.
  6. Designing the hardware and music box mechanism.

Running the Project

Note that you need a 3D printer using BambuLab to print the model.

  1. Clone the repository.
  2. Run voxbox_auto.py.

Note on GitHub Usage

During VoxBox AUTO development, we used the Git services on the GitLab website provided by Imperial College London. As a result, the commit history is not detailed on GitHub.


Acknowledgments

This project uses the following open-source libraries for audio processing:

  • dywapitchtrack (Antoine Schmitt)
    • Real-time dynamic wavelet algorithm (dywa) pitch tracking to determine note frequencies.
    • Distributed under the MIT License.
  • TinyWav (Martin Roth)
    • Reading and writing .wav audio files directly from and to memory.
    • Distributed under the ISC License.

About

An automatic melody-to-model music box generator. C conversion logic between .wav, .csv, .stl and PyQt5 frontend. Tested and presented with real 3D printed models.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages