Studio Record › a song's stems: from the emulator too (its backup read like the FM-1's), the ZIP straight to the downloads and Takes brought into view; a public emulator without its stems renderer: the preview's used whole (JIANT FM's /emu/ lacks stems.js today)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVqsRnhKjiABTzc6Ety3dd
This commit is contained in:
Claude committed 2026-12-05 10:30:20 +00:00
1 parent d9d6050737
commit 6e152bdabb
1 file changed
+14 -9
+14 -9
View File
@@ -189,7 +189,7 @@ const TEXT = {
scrOrient: "La pantalla de la FM-1 es cuadrada (240 × 240). En vertical ocupa todo el ancho; en horizontal, todo el alto, con los controles al costado. A pantalla completa queda centrada y lo más grande posible en las dos posiciones: girá el celular como te quede cómodo.",
scrRate: " KB/s", scrFps: " cuadros/s", scrWaiting: "esperando la imagen…",
emuMidi: "MIDI que toca el emulador", emuMidiAll: "Todas las entradas", emuMidiNone: "Ninguna", emuMidiOff: "(prendé el emulador)",
recGuideT: "Paso a paso: grabar el emulador en la compu y bajar la pista", recG1: "Arriba elegí «Emulador» (en vez de FM-1) y abrí la pestaña EMULADOR: tocá Prender. Ya suena en la compu, sin la FM-1.", recG2: "Hacé tu música en el emulador: el mouse o el teclado de la compu tocan los botones (Z–' y Q–O son las teclas).", recG3: "Pasá a esta pestaña, GRABAR. En Entrada elegí «Emulador JIANT · master (estéreo)» para una sola pista, o «· stems (8 canales)» para cada pista por separado.", recG4: "Tocá Grabar, dale PLAY en el emulador y, cuando termines, Detener. La toma aparece abajo, en Tomas.", recG5: "Bajala: «WAV master» es la mezcla en un archivo; «Stems (ZIP)» trae un WAV por pista, alineados, para tu DAW; «MIDI» las notas.", recG6: "En tu DAW (Ableton, Reaper, FL…): arrastrá los WAV a pistas nuevas, todos desde el compás 1. Ya quedan sincronizados.", emuOpts: "Opciones: versión y MIDI", leadMore: "Leer más", spListen: "ESCUCHAR", spListenS: "radio, visuales", spListenL: "Escuchar y mirar", spCreate: "CREAR", spCreateS: "emulador, sonido", spCreateL: "Hacer música", spRec: "GRABAR", spRecS: "tomas, stems", spRecL: "Grabar y llevarte el audio", spManage: "GESTIONAR", spManageS: "proyectos, backups", spManageL: "Ordenar lo que hiciste", spDevice: "APARATO", spDeviceS: "conectar, instalar", spDeviceL: "El FM-1: conexión, entrar y salir", spLearn: "APRENDER", spLearnS: "guías, manuales", spLearnL: "Entender JIANT", spConnFm1: "Usar el FM-1 (USB)", spConnEmu: "Usar el emulador", spBackup: "Backup ahora", spExportProj: "Exportar proyecto", spImport: "Importar archivo", spExportAudio: "Exportar audio", spStems: "Stems de una canción", spStemsD: "Cada pista de un backup en su WAV, exactas, también en el celular.", spHomeT: "Inicio", vEd: "Editor de audio", edTitle: "Editor de audio", edLead: "Tus tomas y tus archivos en pistas, como en un DAW: cortá, recortá, mové, poné fundidos, subí la ganancia, normalizá, invertí y duplicá, con deshacer. Después bajá la mezcla en WAV o cada pista en un ZIP. Todo pasa en el navegador.", edAdd: "Agregar la toma", edFile: "Importar audio", edEdit: "Editar", tourV_ed: "Tus tomas y archivos en pistas: cortar, recortar, fundidos, ganancia, normalizar, y exportar la mezcla o cada pista.", tourV_edT: "Editor de audio", ed_split: "CORTAR", ed_dup: "DUPLICAR", ed_rev: "INVERTIR", ed_norm: "NORMALIZAR", ed_del: "BORRAR", ed_snap: "IMÁN", ed_expMix: "Bajar la mezcla (WAV)", ed_expTracks: "Cada pista (ZIP)", ed_empty: "Todavía no hay pistas. Grabá una toma (GRABAR) y tocá «Agregar la toma», o importá un archivo de audio.", ed_added: "Agregado: %s", ed_pick: "Elegí un clip (tocalo).", ed_pickHelp: "Tocá un clip para elegirlo: arrastralo para moverlo, sus bordes para recortarlo. La regla de arriba mueve la posición. Teclas: espacio, S cortar, D duplicar, Supr borrar, Ctrl+Z deshacer.", ed_splitHere: "Poné la posición dentro del clip para cortarlo ahí.", ed_undone: "Deshecho.", ed_gain: "GANANCIA", ed_fin: "FUNDIDO ENTRA", ed_fout: "FUNDIDO SALE", ed_rendering: "Mezclando…", ed_exported: "Listo: está en tus descargas.", recArrive: "llegan %n canales", recFewerAndroid: "Llegan %got canales y la FM-1 manda %need. Es un límite de Chrome en Android con este teléfono: el sistema sí recibe todas las pistas por USB (una app nativa las graba), pero Chrome le pasa a la página solo %got. Para cada pista por separado en el celular: la app JIANT Probe graba los stems en vivo, o «Stems de una canción» (abajo) arma cada pista exacta desde un backup. En una computadora con Chrome o Edge llegan todas.", recTitle: "Grabar", recAudio: "Audio", recInput: "Entrada", recStart: "Grabar", recStop: "Detener",
recGuideT: "Paso a paso: grabar el emulador en la compu y bajar la pista", recG1: "Arriba elegí «Emulador» (en vez de FM-1) y abrí la pestaña EMULADOR: tocá Prender. Ya suena en la compu, sin la FM-1.", recG2: "Hacé tu música en el emulador: el mouse o el teclado de la compu tocan los botones (Z–' y Q–O son las teclas).", recG3: "Pasá a esta pestaña, GRABAR. En Entrada elegí «Emulador JIANT · master (estéreo)» para una sola pista, o «· stems (8 canales)» para cada pista por separado.", recG4: "Tocá Grabar, dale PLAY en el emulador y, cuando termines, Detener. La toma aparece abajo, en Tomas.", recG5: "Bajala: «WAV master» es la mezcla en un archivo; «Stems (ZIP)» trae un WAV por pista, alineados, para tu DAW; «MIDI» las notas.", recG6: "En tu DAW (Ableton, Reaper, FL…): arrastrá los WAV a pistas nuevas, todos desde el compás 1. Ya quedan sincronizados.", emuOpts: "Opciones: versión y MIDI", leadMore: "Leer más", spListen: "ESCUCHAR", spListenS: "radio, visuales", spListenL: "Escuchar y mirar", spCreate: "CREAR", spCreateS: "emulador, sonido", spCreateL: "Hacer música", spRec: "GRABAR", spRecS: "tomas, stems", spRecL: "Grabar y llevarte el audio", spManage: "GESTIONAR", spManageS: "proyectos, backups", spManageL: "Ordenar lo que hiciste", spDevice: "APARATO", spDeviceS: "conectar, instalar", spDeviceL: "El FM-1: conexión, entrar y salir", spLearn: "APRENDER", spLearnS: "guías, manuales", spLearnL: "Entender JIANT", spConnFm1: "Usar el FM-1 (USB)", spConnEmu: "Usar el emulador", spBackup: "Backup ahora", spExportProj: "Exportar proyecto", spImport: "Importar archivo", spExportAudio: "Exportar audio", spStems: "Stems de una canción", spStemsD: "Cada pista de un backup en su WAV, exactas, también en el celular.", spHomeT: "Inicio", vEd: "Editor de audio", edTitle: "Editor de audio", edLead: "Tus tomas y tus archivos en pistas, como en un DAW: cortá, recortá, mové, poné fundidos, subí la ganancia, normalizá, invertí y duplicá, con deshacer. Después bajá la mezcla en WAV o cada pista en un ZIP. Todo pasa en el navegador.", edAdd: "Agregar la toma", edFile: "Importar audio", edEdit: "Editar", tourV_ed: "Tus tomas y archivos en pistas: cortar, recortar, fundidos, ganancia, normalizar, y exportar la mezcla o cada pista.", tourV_edT: "Editor de audio", ed_split: "CORTAR", ed_dup: "DUPLICAR", ed_rev: "INVERTIR", ed_norm: "NORMALIZAR", ed_del: "BORRAR", ed_snap: "IMÁN", ed_expMix: "Bajar la mezcla (WAV)", ed_expTracks: "Cada pista (ZIP)", ed_empty: "Todavía no hay pistas. Grabá una toma (GRABAR) y tocá «Agregar la toma», o importá un archivo de audio.", ed_added: "Agregado: %s", ed_pick: "Elegí un clip (tocalo).", ed_pickHelp: "Tocá un clip para elegirlo: arrastralo para moverlo, sus bordes para recortarlo. La regla de arriba mueve la posición. Teclas: espacio, S cortar, D duplicar, Supr borrar, Ctrl+Z deshacer.", ed_splitHere: "Poné la posición dentro del clip para cortarlo ahí.", ed_undone: "Deshecho.", ed_gain: "GANANCIA", ed_fin: "FUNDIDO ENTRA", ed_fout: "FUNDIDO SALE", ed_rendering: "Mezclando…", ed_exported: "Listo: está en tus descargas.", recArrive: "llegan %n canales", recFewerAndroid: "Llegan %got canales y la FM-1 manda %need. Es un límite de Chrome en Android con este teléfono: el sistema sí recibe todas las pistas por USB (una app nativa las graba), pero Chrome le pasa a la página solo %got. Para cada pista por separado en el celular: la app JIANT Probe graba los stems en vivo, o «Stems de una canción» (abajo) arma cada pista exacta desde un backup. En una computadora con Chrome o Edge llegan todas.", stNoRenderer: "El emulador publicado no tiene el armador de stems: avisale a Juan. Mientras tanto, grabá en vivo con «Emulador JIANT · stems».", recTitle: "Grabar", recAudio: "Audio", recInput: "Entrada", recStart: "Grabar", recStop: "Detener",
recProfile: "Modo USB de la FM-1 (MENU › SYSTEM › USB)", profAuto: "Detectar por los canales que llegan",
profMaster: "AUDIO · STEREO · IN+OUT: el master (2 canales)", profStems: "STEMS: 8 canales (T1–T6, FX L R)",
profStemsIn: "STEMS+IN: 10 canales (T1–T6, FX L R, VOX, DRY)",
@@ -203,7 +203,7 @@ const TEXT = {
laneTrack: "pista, mono", lane_L: "master izquierdo", lane_R: "master derecho", lane_FXL: "efectos, izquierda", lane_FXR: "efectos, derecha",
lane_VOX: "la voz mezclada", lane_DRY: "la voz como llegó", recMute: "Silenciar", recSolo: "Solo",
stWhat: "Qué", stLive: "La sección que suena (8 compases)", stGo: "Stems desde la FM-1", stFile: "…o desde un backup",
stReading: "Leyendo el backup de la FM-1… ", stRender: "Armando los stems: ", stDone: "Listo: las pistas están arriba.", stNeedDev: "Conectá la FM-1 (Inicio) o elegí un archivo de backup.",
stReading: "Leyendo el backup de la FM-1… ", stRender: "Armando los stems: ", stDone: "Listo: el ZIP con cada pista está en tus descargas, y cada WAV abajo, en Tomas.", stNeedDev: "Conectá la FM-1 (Inicio) o prendé el emulador, o elegí un archivo de backup.",
recSaved: "Toma guardada: está abajo, en Tomas.",
recSrcFm1: "La FM-1 por USB es una entrada de audio: estéreo (USB > AUDIO), u 8 canales en USB > STEMS (las 6 pistas y los efectos por separado). Elegila acá.",
recSrcEmu: "Graba la salida del emulador (prendelo en la pestaña Emulador).",
@@ -398,7 +398,7 @@ const TEXT = {
scrOrient: "The FM-1's screen is square (240 × 240). In portrait it fills the width; in landscape, the height, with the controls beside it. Full screen keeps it centred and as big as it gets either way: turn the phone as you like.",
scrRate: " KB/s", scrFps: " frames/s", scrWaiting: "waiting for the picture…",
emuMidi: "MIDI that plays the emulator", emuMidiAll: "Every input", emuMidiNone: "None", emuMidiOff: "(switch the emulator on)",
recGuideT: "Step by step: record the emulator on a computer and download the track", recG1: "At the top pick «Emulator» (instead of FM-1) and open the EMULATOR tab: press Switch on. It plays on the computer, no FM-1 needed.", recG2: "Make your music in the emulator: the mouse or the computer keyboard plays the buttons (Z–' and Q–O are the keys).", recG3: "Come to this tab, RECORD. In Input pick «JIANT emulator · master (stereo)» for one track, or «· stems (8 channels)» for each track apart.", recG4: "Press Record, press PLAY in the emulator and, when you are done, Stop. The take appears below, in Takes.", recG5: "Download it: «WAV master» is the mix in one file; «Stems (ZIP)» has one WAV per track, aligned, for your DAW; «MIDI» the notes.", recG6: "In your DAW (Ableton, Reaper, FL…): drag the WAVs onto new tracks, all from bar 1. They are already in sync.", emuOpts: "Options: version and MIDI", leadMore: "Read more", spListen: "LISTEN", spListenS: "radio, visuals", spListenL: "Listen and watch", spCreate: "CREATE", spCreateS: "emulator, sound", spCreateL: "Make music", spRec: "RECORD", spRecS: "takes, stems", spRecL: "Record and take the audio with you", spManage: "MANAGE", spManageS: "projects, backups", spManageL: "Keep what you made in order", spDevice: "DEVICE", spDeviceS: "connect, install", spDeviceL: "The FM-1: connection, in and out", spLearn: "LEARN", spLearnS: "guides, manuals", spLearnL: "Understand JIANT", spConnFm1: "Use the FM-1 (USB)", spConnEmu: "Use the emulator", spBackup: "Back up now", spExportProj: "Export the project", spImport: "Import a file", spExportAudio: "Export audio", spStems: "A song's stems", spStemsD: "Each track of a backup in its own WAV, exact, on a phone too.", spHomeT: "Home", vEd: "Audio editor", edTitle: "Audio editor", edLead: "Your takes and files on tracks, as in a DAW: cut, trim, move, fade, raise the gain, normalize, reverse and duplicate, with undo. Then download the mix as a WAV or each track in a ZIP. It all happens in the browser.", edAdd: "Add the take", edFile: "Import audio", edEdit: "Edit", tourV_ed: "Your takes and files on tracks: cut, trim, fades, gain, normalize, and export the mix or each track.", tourV_edT: "Audio editor", ed_split: "CUT", ed_dup: "DUPLICATE", ed_rev: "REVERSE", ed_norm: "NORMALIZE", ed_del: "DELETE", ed_snap: "SNAP", ed_expMix: "Download the mix (WAV)", ed_expTracks: "Each track (ZIP)", ed_empty: "No tracks yet. Record a take (RECORD) and press «Add the take», or import an audio file.", ed_added: "Added: %s", ed_pick: "Pick a clip (tap it).", ed_pickHelp: "Tap a clip to pick it: drag it to move it, its edges to trim it. The ruler on top moves the position. Keys: space, S cut, D duplicate, Del delete, Ctrl+Z undo.", ed_splitHere: "Put the position inside the clip to cut it there.", ed_undone: "Undone.", ed_gain: "GAIN", ed_fin: "FADE IN", ed_fout: "FADE OUT", ed_rendering: "Mixing…", ed_exported: "Done: it is in your downloads.", recArrive: "%n channels arrive", recFewerAndroid: "%got channels come in and the FM-1 sends %need. It is a limit of Chrome on Android with this phone: the system does receive every track over USB (a native app records them), but Chrome hands only %got to the page. For each track apart on the phone: the JIANT Probe app records the stems live, or «A song's stems» (below) makes each track exact from a backup. On a computer with Chrome or Edge they all come in.", recTitle: "Record", recAudio: "Audio", recInput: "Input", recStart: "Record", recStop: "Stop",
recGuideT: "Step by step: record the emulator on a computer and download the track", recG1: "At the top pick «Emulator» (instead of FM-1) and open the EMULATOR tab: press Switch on. It plays on the computer, no FM-1 needed.", recG2: "Make your music in the emulator: the mouse or the computer keyboard plays the buttons (Z–' and Q–O are the keys).", recG3: "Come to this tab, RECORD. In Input pick «JIANT emulator · master (stereo)» for one track, or «· stems (8 channels)» for each track apart.", recG4: "Press Record, press PLAY in the emulator and, when you are done, Stop. The take appears below, in Takes.", recG5: "Download it: «WAV master» is the mix in one file; «Stems (ZIP)» has one WAV per track, aligned, for your DAW; «MIDI» the notes.", recG6: "In your DAW (Ableton, Reaper, FL…): drag the WAVs onto new tracks, all from bar 1. They are already in sync.", emuOpts: "Options: version and MIDI", leadMore: "Read more", spListen: "LISTEN", spListenS: "radio, visuals", spListenL: "Listen and watch", spCreate: "CREATE", spCreateS: "emulator, sound", spCreateL: "Make music", spRec: "RECORD", spRecS: "takes, stems", spRecL: "Record and take the audio with you", spManage: "MANAGE", spManageS: "projects, backups", spManageL: "Keep what you made in order", spDevice: "DEVICE", spDeviceS: "connect, install", spDeviceL: "The FM-1: connection, in and out", spLearn: "LEARN", spLearnS: "guides, manuals", spLearnL: "Understand JIANT", spConnFm1: "Use the FM-1 (USB)", spConnEmu: "Use the emulator", spBackup: "Back up now", spExportProj: "Export the project", spImport: "Import a file", spExportAudio: "Export audio", spStems: "A song's stems", spStemsD: "Each track of a backup in its own WAV, exact, on a phone too.", spHomeT: "Home", vEd: "Audio editor", edTitle: "Audio editor", edLead: "Your takes and files on tracks, as in a DAW: cut, trim, move, fade, raise the gain, normalize, reverse and duplicate, with undo. Then download the mix as a WAV or each track in a ZIP. It all happens in the browser.", edAdd: "Add the take", edFile: "Import audio", edEdit: "Edit", tourV_ed: "Your takes and files on tracks: cut, trim, fades, gain, normalize, and export the mix or each track.", tourV_edT: "Audio editor", ed_split: "CUT", ed_dup: "DUPLICATE", ed_rev: "REVERSE", ed_norm: "NORMALIZE", ed_del: "DELETE", ed_snap: "SNAP", ed_expMix: "Download the mix (WAV)", ed_expTracks: "Each track (ZIP)", ed_empty: "No tracks yet. Record a take (RECORD) and press «Add the take», or import an audio file.", ed_added: "Added: %s", ed_pick: "Pick a clip (tap it).", ed_pickHelp: "Tap a clip to pick it: drag it to move it, its edges to trim it. The ruler on top moves the position. Keys: space, S cut, D duplicate, Del delete, Ctrl+Z undo.", ed_splitHere: "Put the position inside the clip to cut it there.", ed_undone: "Undone.", ed_gain: "GAIN", ed_fin: "FADE IN", ed_fout: "FADE OUT", ed_rendering: "Mixing…", ed_exported: "Done: it is in your downloads.", recArrive: "%n channels arrive", recFewerAndroid: "%got channels come in and the FM-1 sends %need. It is a limit of Chrome on Android with this phone: the system does receive every track over USB (a native app records them), but Chrome hands only %got to the page. For each track apart on the phone: the JIANT Probe app records the stems live, or «A song's stems» (below) makes each track exact from a backup. On a computer with Chrome or Edge they all come in.", stNoRenderer: "The published emulator lacks its stems renderer: tell Juan. Meanwhile, record live with «JIANT emulator · stems».", recTitle: "Record", recAudio: "Audio", recInput: "Input", recStart: "Record", recStop: "Stop",
recProfile: "The FM-1's USB mode (MENU › SYSTEM › USB)", profAuto: "Detect by the channels that come in",
profMaster: "AUDIO · STEREO · IN+OUT: the master (2 channels)", profStems: "STEMS: 8 channels (T1–T6, FX L R)",
profStemsIn: "STEMS+IN: 10 channels (T1–T6, FX L R, VOX, DRY)",
@@ -412,7 +412,7 @@ const TEXT = {
laneTrack: "track, mono", lane_L: "master left", lane_R: "master right", lane_FXL: "effects, left", lane_FXR: "effects, right",
lane_VOX: "the voice as mixed", lane_DRY: "the voice as it came", recMute: "Mute", recSolo: "Solo",
stWhat: "What", stLive: "The section playing (8 bars)", stGo: "Stems from the FM-1", stFile: "…or from a backup",
stReading: "Reading the FM-1's backup… ", stRender: "Making the stems: ", stDone: "Done: the tracks are above.", stNeedDev: "Connect the FM-1 (Home) or pick a backup file.",
stReading: "Reading the FM-1's backup… ", stRender: "Making the stems: ", stDone: "Done: the ZIP with each track is in your downloads, and each WAV below, in Takes.", stNeedDev: "Connect the FM-1 (Home) or switch the emulator on, or pick a backup file.",
recSaved: "Take saved: it is below, under Takes.",
recSrcFm1: "The FM-1 over USB is an audio input: stereo (USB > AUDIO), or 8 channels in USB > STEMS (the 6 tracks and the effects apart). Pick it here.",
recSrcEmu: "Records the emulator's output (switch it on in the Emulator tab).",
@@ -1039,14 +1039,17 @@ daw.onState = () => render();
/* ---- a song's stems from a backup (the FM-1's, read over USB, or a file): the emulator's own renderer (emu/stems.js,
in a Worker) plays it once a track; the result shown in the lanes as a take */
async function stemsFrom(archiveOrNull) {
const base = TOOLS[state.fw].base + "emu/", say = (x) => { $("ststat").textContent = x; };
let base = TOOLS[state.fw].base + "emu/"; const say = (x) => { $("ststat").textContent = x; };
try {
/* a public emulator without its stems renderer (stems.js): the preview's, whole (its renderer, wasm and backup reader) */
const has = async (b) => { try { return (await fetch(b + "stems.js", { cache: "no-cache" })).ok; } catch (_) { return false; } };
if (!(await has(base))) { const alt = TOOLS[state.fw].base + (state.fw === "fm" ? "preview/emu/" : "emu/beta/"); if (await has(alt)) base = alt; else { say(t("stNoRenderer")); return; } }
const BK = await import(base + "fm1backup.js");
let archive = archiveOrNull;
if (!archive) {
const d = state.dev;
if (!d || state.busy) { say(t("stNeedDev")); return; }
archive = await BK.captureBackup((r, o) => d.link.request(r[0], r[1], (o && o.timeout) || 2000), d.version,
if (!archive) { // the FM-1 over USB, or the emulator when it is the target
const L = projLink();
if (!L || state.busy) { say(t("stNeedDev")); return; }
archive = await BK.captureBackup((r, o) => L.link.request(r[0], r[1], (o && o.timeout) || 2000), state.dev && state.target !== "emu" ? state.dev.version : L.name,
(done, total) => say(t("stReading") + Math.round(done / Math.max(1, total) * 100) + " %"));
}
const backup = BK.readBackup(archive), wasm = await (await fetch(base + "felucca.wasm")).arrayBuffer();
@@ -1070,8 +1073,10 @@ async function stemsFrom(archiveOrNull) {
...files.map((f) => ({ label: f.name.replace(".wav", ""), name: `${name}-${f.name}`, blob: new Blob([f.data], { type: "audio/wav" }), small: true }))] };
rec.takes.unshift(take);
daw.setLanes(lanes); daw.show(planes, rec.rate);
download(take.files[0].blob, take.files[0].name); // the ZIP straight to the downloads (each WAV is in Takes too)
say(t("stDone"));
render();
setTimeout(() => { const k = $("takes"); if (k) k.scrollIntoView({ behavior: "smooth", block: "center" }); }, 60);
} catch (e) { say(String(e.message || e)); }
}
$("stgo").addEventListener("click", () => stemsFrom(null));