Skip to content

the ultimate vocal synthesizer - sing, speak, beatbox, and more

Rust

Drop DemoSong.syllables: demo songs come from Rust's DemoSong, which has no such field, so the TypeScript side never ran

Joshua Pham0a703f199505
diff --git a/src/ui/singing.ts b/src/ui/singing.ts
index a40ceee..77e2c1b 100644
--- a/src/ui/singing.ts
+++ b/src/ui/singing.ts
@@ -71,8 +71,6 @@ export function ensureDictionary(): void {
.load()
.then(() => {
const s = useSing.getState();
- // a song that brings its own syllables (another language's front end) is not re-read as English
- if (DEMO_SONGS.some((d) => d.syllables && d.lyrics === s.lyrics)) return;
const syllables = lyricsToSyllables(s.lyrics);
useSing.setState({ syllables, cursor: Math.min(s.cursor, Math.max(0, syllables.length - 1)) });
})
@@ -271,7 +269,7 @@ export async function playDemo(name: string, body: BodyMix, ready?: () => Promis
// letter-to-sound rules
}
if (token !== demoToken) return;
- const syl = song.syllables ?? lyricsToSyllables(song.lyrics);
+ const syl = lyricsToSyllables(song.lyrics);
if (!syl.length) return;
const shift = song.octave[nearestBody(body)] * 12;
const notes = song.notes.map((n, i) => ({ midi: n[0] + shift, beats: n[1], syl: syl[i % syl.length] }));
diff --git a/src/wasm/types.ts b/src/wasm/types.ts
index db04757..f5e5715 100644
--- a/src/wasm/types.ts
+++ b/src/wasm/types.ts
@@ -238,8 +238,6 @@ export interface DemoSong {
lyrics: string;
notes: [number, number][];
octave: { male: number; female: number; child: number };
- /** sung syllables from a language front end (IPA), used instead of reading the lyrics as English */
- syllables?: Syllable[];
}
export interface VowelRef {