I'm sure that one of the regular users of this forum, 'Sema', will contact you shortly regarding his system available via Github called I think JAZZ-Soft or something like that. I think that this system does pretty much what you want. So just hang in there a little while.
I am not sure what you mean by midigenerated sound, because midi in itself is only a signal source to play up a mapped sound. That sound must somehow be generated at fly by computer"software osciillatior" or be a prerecorded audio "clip" in wav, mp3 or maybe other format.
So the midi alone just tell you what "notevalue" played and how it was played.
So your program must have two parts and i do not think midi even necessary, depending upon what kind of sound picture you want to trigger.
Basicly midi "as i understand it" is a note trigger protocol, "with lot of another control capacity, volume e t c"
I think what you want is a tonegenerator that is triggered. https://onlinetonegenerator.com/
I think for anything more advance you would have to read up on Nyqvist sampling theorem to make sampled instruments tuned into "notes".
I once i wrote an algorithm to overcome the donald duck effect produced by upsampling a note into higher frequensy.
It was just a statistical approach keeping the sampling length the same "sort of a bitwig", long before sampletank existed.
Yeah i just pushed in bits.
So you should Google for howto build a HTML5 tonegenerator.
Just relearned that an octave in hz is just a double of the basefrequency A note 440 so next 880? But lower is just half 220 so multiples, so two ocaves above must be 1760`?
And then it is just divide respective octave into semitones using same philosophy?
I guess it is when Nyqvist theorem come into play it get alot more confusing...
"By international agreement (adopted by the International Standards Organization (the ISO) in 1939 in London), the reference frequency for tuning instruments is 440 Hz. An octave higher than 440 Hz is 880 Hz. An octave lower than 440 Hz is 220 Hz. A perfect fifth higher than 440 Hz is 660 Hz."
Would love to know what you are finding and if we can maybe help each other.
Hello Erik and Steve i am not sure what you try to accomplish, is it to "playup/trigger" a "soundclip/sample" at buttonpush?
Or is it to playup sounds using software rendered oscillators?
Should each interface button trigger a sampled "note" or would you like oscillators that work on different frequensies to create the range of notes?
Should the sounds be mapped/tuned into 12 seminotes over multiple octaves?
I guess you talk about either resampled "pitched/tuned" samples, or software synths using oscillators to playup via a software "virtual keyboard?"
Or is it just sampled sound playback you want to achieve?