I would like to use HTML5 or Javascript to create midi generated sounds on my website and so midi requests would only be accessed from a browser (no downloaded programs). The midi requests would be from programming only and would not be from equipment like real pianos. Midi sound would be requested from a virtual online instrument. Any links to articles or advice on how I can generate midi sounds without using audio commands (.mp3 etc) would really be appreciated.Thank you.
Hello,
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.
Geoff
Hey Geoff, thanks for introducing me! 🙂
Steve, please check these projects, hope you'll find something useful for your task:
https://github.com/jazz-soft/JZZ-midi-SMF
https://github.com/jazz-soft/JZZ-gui-Player
https://github.com/jazz-soft/midi-player
Let me know if you need some help with these...
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."
Hi Steve,
I'm looking for the exact same thing as you. I used to have this working on my web site with a Perl script. It allowed visitors to select a chord and hear that played back with a guitar or piano sound of their choice. I put that together many years ago. Worked brilliantly until at some point the hosting company removed my ability to run that script. I would like to get this functionality back and I'm looking for a Javascript/HTML solution as well.
Would love to know what you are finding and if we can maybe help each other.
Thanks,
Erik
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?