Skip to content

shim-sham/continued-fraction-tuning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6cf2390 · · Sep 1, 2025

History

19 Commits
Aug 31, 2025
Sep 1, 2025
Aug 31, 2025
Aug 31, 2025
Aug 31, 2025

Repository files navigation

tuning systems!

This project compares the different types of tuning systems: pythagorean, just intonation, and equal temperament.
It creates the fractions needed for each interval for each system from scratch to show exactly how each system works.
N.B.: The Hackatime tracking for this didn't count the first 1 hour and 41 mins I spent on this, as I hadn't initialised this repo yet!

why I made this

This is inspired by Piano Tuning and Continued Fractions by Matthew Barta, an article I found while researching the real world applications of continued fractions. Plus, I'm passionate about both maths and music so i thought this would be a great way to merge the two!

how I made this

A lot of research on the systems of tuning was put into this to find out exactly how each one works.
I tried getting the maths parts done first (including outputting last frequency played; it worked well as a check that everything's going fine!), in order of which they appear on the website, and then i added css. at first it was just one page with a lot of info, so i split it into multiple pages to make it more narrative.

what I struggled with and what I learned

  • learnt that Pythagorean tuning starts descending in perfect fifths from minor second onwards, to create a more accurate/harmonious system.
  • learnt about Math.pow
  • learnt about indexOf()
  • learnt about Just Intonation and Equal temperament
  • learnt about using querySelectorAll() for elements that appear multiple times.
  • improved on my confidence with using Tone.js
  • struggled with scrolls in CSS
  • struggles with getting the positioning right in CSS