Free Piano String Inharmonicity & Tuning Curve Calculator

Visualize piano string inharmonicity with our free online tool. Calculate tuning curves, partial deviation, and stiffness coefficients for acoustic pianos.

Built by@Akhenaten

AI Generation Prompt

Piano String Inharmonicity & Tuning Curve Visualizer

Overview

A high-precision, client-side web application designed to help piano technicians, students, and acoustics engineers visualize the inharmonicity of piano strings. The application calculates the B-coefficient (stiffness) of a string based on user inputs and renders a real-time, interactive graph showing the deviation of partials from the fundamental frequency.

Core Features

  • Parameter Input Suite: Fields for String Length (cm), String Diameter (mm), Tension (N), and Material Density (kg/m3) or Young's Modulus (GPa).
  • Automatic B-Coefficient Calculation: Real-time determination of the inharmonicity constant based on string physics.
  • Interactive Tuning Graph: A high-fidelity chart displaying partial deviation (in cents) for the first 16 partials.
  • Dynamic Data Table: A comprehensive results table showing the theoretical vs. actual frequency and deviation for each partial.
  • Export Utility: Functionality to generate a PNG snapshot of the graph or a CSV file of the calculated partial data.

UI/UX Design Specification

  • Aesthetic: Clean, professional "SaaS" aesthetic. Light mode exclusively, using a palette of crisp white, soft grays, and a primary accent color of deep Navy Blue (#2563eb) for data visualizations.
  • Layout:
    • Header: Simple, clear title and short instruction tag.
    • Main Dashboard: A two-column layout on desktop. Left column contains the input form and configuration controls. The right column displays the Chart.js visualization.
    • Results Section: Below the chart, a responsive table summarizing the harmonic deviation data.
  • Animations: Subtle transitions using CSS ease-in-out for input validation feedback and smooth entry of data table rows.

Technical Constraints & Directives

  • Single File Architecture: All CSS, HTML, and Vanilla JavaScript must be contained within one index.html file.
  • No Persistent Storage: Absolutely no use of localStorage, sessionStorage, or cookies. The state must be contained entirely within JS objects/variables.
  • Library Usage: Use Chart.js (CDN) for visualization. Vanilla JavaScript for all calculations (no frameworks).
  • Responsive Design: Use CSS Flexbox/Grid for a fluid layout that stacks vertically on mobile devices and expands to a two-pane view on desktops.
  • Security: Ensure all external links include rel="noopener noreferrer". Implement custom modal popups for information, as alert() or prompt() are strictly prohibited.
  • Performance: Calculations must be performed in-memory on every input change to provide instantaneous visual feedback.

Spread the word

2Total Views
gemini-3.0-flashAI Model

Files being used

index.html
12.1 KB
#piano inharmonicity calculator#tuning curve visualizer#piano acoustics tool#string stiffness calculator#piano partial deviation graph#free piano tuner utility#piano harmonic series plotter

Frequently Asked Questions

Everything you need to know about using this application.

What is piano string inharmonicity?

Piano string inharmonicity occurs because piano strings are not perfectly flexible. Due to their physical stiffness, the partials (overtones) produced by a vibrating string are slightly sharper than the exact integer multiples of the fundamental frequency expected in an ideal harmonic series. This physical reality is why acoustic pianos require 'stretched' tuning. Piano tuners must adjust the tuning of the octaves wider than a 2:1 ratio to ensure that the higher partials of lower notes align with the fundamentals of higher notes, maintaining a harmonious sound across the entire keyboard.

How does the tuning curve visualization work?

The tuning curve visualization calculates the deviation of each partial (from the 1st to the 16th) based on the input physical properties of the string, such as its diameter, length, tension, and Young's modulus. The tool plots the 'B' coefficient, which represents the stiffness of the string, against the frequency spectrum. By inputting your specific string metrics, the application renders a dynamic graph showing exactly how much each harmonic departs from theoretical pitch. This helps technicians and students understand how scaling decisions in piano design affect the final tuning requirements of the instrument.

Is this tool suitable for professional piano tuning?

This tool is primarily designed for educational purposes, acoustic research, and understanding piano scaling physics. It provides high-quality theoretical data, but professional piano tuning often involves complex environmental variables and the specific condition of an instrument's soundboard and bridge. While the calculations provided by this application are mathematically sound based on standard acoustic formulas, users should always combine these findings with empirical measurement and the standard practices of professional piano technology.

How is my data handled in this application?

This application operates entirely in your browser's memory using client-side JavaScript. Because it is designed to be highly secure and compliant with iframe-based sandboxing, no data is ever sent to a server, and no information is stored using cookies, localStorage, or IndexedDB. When you refresh the page or close your browser tab, all input data and calculated results are permanently cleared. We prioritize your privacy and system security by ensuring the tool remains stateless and strictly functional.

Related Applications