Toca el piano y mira las notas en partitura en vivo: micrófono, entrada de línea o MIDI
Translation pending
EducationJavaScript · HTMLGitHub @juliangdeveloperOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Real-time pitch detection & sheet music engine for the browser: microphone or MIDI to notation, MIDI and MusicXML export, no server.
Motor open source de captura y escritura musical para la web: convierte lo que tocas en el piano (micrófono, MIDI o entrada de línea) en notas y partitura, en vivo y en el dispositivo.
▶ Probar la demo · la interfaz es una demo del motor
El motor es un módulo ES sin DOM publicado en engine/v1/, con interfaz estable (engine.INTERFACE = 1).
const root = 'https://juliangdeveloper.github.io/piano-transcribe/engine/v1/';
const version = (await (await fetch(root + 'version.txt', { cache: 'no-store' })).text()).trim();
const engine = await import(root + 'capture.js?v=' + version);
const session = engine.createCapture({ profile: 'score', score: { bpm: 80, timeSig: '4/4', clef: 'treble' } });
const out = session.hop(frame, sampleRate, performance.now());
hop cada engine.HOP_MS (20 ms) con un Float32Array de un AnalyserNode (fftSize 2048). Devuelve out.events (notas que empiezan o terminan) y out.score (compases con notas y silencios).session.press('C4', 'midi', now) y session.release('C4', 'midi', now).profile: 'combat' limita el rango a C3–C6; maxVoices: 2 permite dos notas a la vez con el micrófono.engine.toMidi(session.score()) devuelve los bytes de un .mid y engine.toMusicXML(session.score()) el texto de un .musicxml, con el tempo y el compás de la sesión.examples/minimal.html escucha el micrófono y descarga el MIDI en unas 50 líneas.engine/v1, versión 1.13.0)| Función | Qué hace |
|---|---|
createCapture(opts) | Crea una sesión: profile, maxVoices, a4 y score: { bpm, timeSig, clef }. |
session.hop · press · release | Alimentan la sesión con audio o con notas MIDI/teclado. |
session.score() · setScore({ bpm, timeSig }) | Leen la partitura o cambian tempo y compás. |
session.held() · advance · releaseSource · reset | Notas sonando, avanzar el tiempo, soltar una fuente y empezar de cero. |
toMidi(score) · toMusicXML(score) | Exportan la partitura. |
detectPitch(buffer, sampleRate) | Detecta la frecuencia de un bloque de audio. |
noteFromFreq · noteFromMidi · hzForNote | Convierten entre Hz, número MIDI y nombre de nota. |
TEMPO · TIME_SIGNATURES | Tempo de 40 a 208 y compases 2/4, 3/4, 4/4 y 6/8. |
Abre un issue o un PR. Áreas abiertas:
JavaScript vanilla, Web Audio y Web MIDI; la partitura se dibuja con VexFlow. Sin dependencias de npm.
python3 -m http.server 8000
npm test
Licencia: MIT. Incluye VexFlow (MIT) y la fuente Gonville (uso libre).
Más proyectos: https://juliangdeveloper.github.io/
Hecho con ❤️ y 🎼