Files
illuminus5 01fe8c381c Skiff 1.0
A six-track groovebox firmware for the M-VAVE FM-1, built on Felucca 1.1.5
by Hügelton Instruments (https://github.com/hugelton/Felucca). What it is:
README.md; how it behaves: DESIGN.md; licences: LICENSING.md.
2026-10-12 17:59:41 -05:00

18 lines
571 B
Python

#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments
"""YIN pitch of hostsim renders (4000 samples from 0.25 s, the held note).
tests/pitch.py build/host/render.wav ...
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tools"))
from sampleio import read_any_wav, yin # noqa: E402
for f in sys.argv[1:]:
sr, x = read_any_wav(Path(f))
a = int(0.25 * sr)
print(f"{f}: {yin(x[a:a + 4000], sr, interpolate=False):.1f} Hz")