The text-to-speech (TTS) functionality now supports independent text input for each of the 8 sample banks. When you switch banks, the text field displays and edits the text associated with that specific bank.
Test: Verify each bank maintains its own TTS text
- Open the application
- Select the Sampler track
- In bank 1, enter "Hello from bank one" in the TTS text field
- Click bank 2 selector button
- Verify the text field is now empty or shows default "Hello World"
- Enter "This is bank two" in the text field
- Click bank 3 and enter "Bank three speaking"
- Switch back to bank 1
- Expected: Text field should show "Hello from bank one"
- Switch to bank 2
- Expected: Text field should show "This is bank two"
- Repeat for all 8 banks
Success Criteria: Each bank's text is preserved when switching between banks
Test: Verify TTS generates different audio for different text in different banks
- In bank 1, enter "Alpha" and click GEN button
- Wait for generation to complete
- Switch to bank 2, enter "Bravo" and click GEN
- Switch to bank 3, enter "Charlie" and click GEN
- Switch to bank 4, enter "Delta" and click GEN
- Place notes on the sequencer for the sampler track
- While playing, switch between banks using the bank selector buttons
- Expected: Each bank should play its unique TTS-generated sample
Success Criteria: Different TTS samples play for each bank
Test: Verify TTS text persists across save/load operations
-
Set unique text for each bank:
- Bank 1: "One"
- Bank 2: "Two"
- Bank 3: "Three"
- Bank 4: "Four"
- Bank 5: "Five"
- Bank 6: "Six"
- Bank 7: "Seven"
- Bank 8: "Eight"
-
Click the "Export Song" button to save your project
-
Clear/reset the project (reload page or start new)
-
Click "Import Song" and load the saved file
-
Switch through all 8 banks
-
Expected: Each bank should show the correct text that was saved
Success Criteria: All TTS phrases are restored from saved file
Test: Verify TTS text persists when saving/loading from cloud
- Set different text in banks 1-4
- Save the song to cloud storage
- Clear/reset the project
- Load the song from cloud storage
- Verify all bank texts are restored
Success Criteria: Cloud save/load preserves TTS phrases
As mentioned in the problem statement:
"Right now it loads and generates one tts sample ok, but I can't test farther because the keys don't play anything on the livekeyboard in sampler mode right now."
The live keyboard issue is a separate problem not addressed by this implementation. This feature ensures that:
- TTS text is properly stored per bank
- Text persists when switching banks
- Text is saved/loaded with projects
Once the live keyboard issue is resolved, the TTS samples should play correctly when triggered.
ttsPhrases: Array of 8 strings stored in App state- Default value:
["Hello World", "Hello World", ...](8 elements) - Persisted in
SavedSongData.ttsPhrases
- User types in TTS input field in SamplerPanel
setCurrentTtsText()creates new array with updated text at active bank indexonTtsPhraseChange()callback updates App state- When bank switches,
currentTtsTextcomputed value shows correct bank's text
- Files saved without
ttsPhraseswill default to "Hello World" for all banks - No breaking changes to existing save files