surikov / webaudiofont

Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
https://surikov.github.io/webaudiofont/
GNU General Public License v3.0
891 stars 92 forks source link

Better explanation of AFTER_TIME #46

Closed Palmer-JC closed 4 years ago

Palmer-JC commented 5 years ago

Srgy,

We have made contact before at the old BabylonJS forum. I have been integrating this repo with an animation system of mine. I have done a lot of breaking of things into classes, using Typescript. The reason I have done so, in addition to understanding the code, is so that I could make a sub-class of Preset, which I call VoiceFont. I have also added a method to Player, to queue zones of this preset type.

This class has an additional property in each of its zone's, phoneme. The class also has additional methods for creating / testing / trimming of zones, as well as saving of the "instrument". None of which this repo has needed to do.

I was making the buffer of vowel zones, about 2 seconds & ahdsr = true. The consonant zones, I was making "to size", which is very small, 0.04 to 0.08 seconds. This is about the size of AFTER_TIME itself.

Which brings me to, what is AFTER_TIME? If this were set to zero, would a series notes of real instruments just run together? If so, I could probably add an additional property to zones with the default value of 0.05, and explicitly set those in VoiceFont to 0. I do not want any gaps for my "instruments".

This is almost starting to run, but the consonant "notes" seem really short to almost not sounding.

FYI, I have also integrated Carnegie Mellon University's ARPABET 10k word phonetic database. I can just type in what I want & syllables are generated. For a look at very old version of my animation system, see & click Talk. Back then I was using sound files & trying to voice sync.

And yes, I plan to sing if possible, so should I be adding 0.05 gaps between my syllables to keep in sync with the real instruments?

Thanks,

Jeff