jan-ka / sams-still-alive Goto Github PK
View Code? Open in Web Editor NEWexperiment to have speech synthesis sing to still alive
License: MIT License
experiment to have speech synthesis sing to still alive
License: MIT License
ToneJS is native typescript. No reason to not also use it for this project. As long as parcel keeps working or a better replacement can be found.
Browsers look for the favicon at the base url, not the path. There are two options to go about this:
parcel-reporter-static-files-copy
Some linux variants appear to come with no default voices. There are easy ways to fix this. Adding a small section about this and linking it in the app should go a long way.
Reported working:
Known broken:
display the lyrics while they are sung instead of the placeholder text
this should cut down a bit on repitition and perhaps also allows to remove @cimonitor/parcel-transformer-package-version
again by injecting the package version through pug vars.
If a browser reports "no voices", the control structure breaks too early. Leaving parts of the scene dangling around. This needs a cleanup and possibly a rework of how scenes are switched. (Maybe something more elaborate than a really primitive state machine)
I can't find any way to react to the end of playing the song. This makes handling the UI for that case rather clunky.
Transport emits an end
event, but not when the current playback has ended. Is this a configuration issue? Library limitation?
Only the first part of the song is prepared for singing. The rest of the song should be mapped, for completeness sake.
As @tonejs/midi
is now loaded anyway, maybe we can do the mapping locally too.
Currently stage
is stored in the underlying element of ControlButton
. Might as well be stored in the Class itself
sams-still-alive/src/ControlButton.ts
Line 15 in 7d9f580
Each time the song hits Drum 1, there's an error about wrong timing.
Error: Start time must be strictly greater than previous start time
at assert (index.b71e74eb.js:12994:27)
at OmniOscillator.start (index.b71e74eb.js:19471:31)
at MembraneSynth._triggerEnvelopeAttack (index.b71e74eb.js:25119:25)
at MembraneSynth.triggerAttack (index.b71e74eb.js:24884:14)
at MembraneSynth.triggerAttackRelease (index.b71e74eb.js:25032:14)
at Part.callback (index.b71e74eb.js:640:27)
at Part._tick (index.b71e74eb.js:28127:30)
at ToneEvent._tick (index.b71e74eb.js:27794:18)
at TransportEvent.invoke (index.b71e74eb.js:20396:18)
at index.b71e74eb.js:19917:60 2685.428 'standard kit'
The error is caught and deranked to warn
sams-still-alive/src/Caroline.ts
Line 83 in 7d9f580
Currently, a note just triggers the SpeechSynthesis. Maybe there's a way to coax the synthesis a bit more to actual singing by dynamically playing with the pitch and rate.
The finest “resolution” is possibly on the word level, but this also probably means it sounds dumb, since the SpeechSynthesis can no longer guesstimate the sentences' pronunciation. Worth a try, thought.
Some instruments seem far louder than others, or perhaps they get louder as they accumulate, making it very hard to pick out the voice. The music should be about equal in perceived volume to the voice.
It would be fun if there was one voice that we could default to, even if it is utterly terrible.
There should be enough material from early speech synthesis experiments that could not rely on samples.
Even "just" having a tonal approximation of speech would be fun if we don't need to define it through midi, even thought we can potentially accomplish this through notejs.
This is a strictly experimental and optional step.
src/VoiceSelect.ts and src/ControlButton.ts are currently handled through external classes, the same effect could be achieved by using custom elements instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.