Otherwise the browser assumes the page didn't do anything with the events and uses its default keyboard handlers. I have find-as-you-type enabled, and pressing keys launches search for me. Handlers need to "eat" the keyboard events to prevent default browser behavior.
edit: oh it's on github, gonna submit an issue
backtick code comments/snippets from source text are. really not widely standardized, I don't think it makes sense to encourage them without an accompanying web standard, or at least some kind of standard
let e = $.Event('keyup'); '09090586 '.split('').map((k, i) => {setTimeout(()=>{$.play(InstrumentPerKeyEnum[k],k,e.type==="keydown")}, i * 200); setTimeout(() => {$.play(InstrumentPerKeyEnum[k],k,e.type==="keyup")}, i * 250)});
I think this is checked regularly, but I'm not sure.
The DOM API is so much nicer than the native one it’s not even funny.
And when you are not dealing with thousands of buttons you realize you don’t need a virtual DOM. You may even come to the conclusion that if you have so much state in a single view, maybe your UI sucks.
And that beneath all the React hype, there were people doing “components“ and “server side rendering” in PHP, Python, Ruby, Java for decades.
But I’m not gonna get grumpy this early in the morning.
Apart from work things the main example would be a that I built a small audio sequencer hacked together with Vue. That project would've been suicidal to do in JQuery but also went far quicker to make than if i would've been messing around with doing everything "properly" in React. (Iirc the entire thing is <1000 loc)
My main "issue" right now is if i should just leave it and let it be useful at the current level (perfect for creating small retro-style chip tunes with fixed audio channel tone generator controls). Or to remake it in React to enable more easily supporting stuff like view plugins (to control parameters custom instrument/filter plugins), I.e. in principle making it more "application" like rather than just a small one-page hack.
Personally I've never known anyone do this for any other reason but educational reasons. When I wanted to learn React, I copied other websites in React. I do similar things when I'm learning Golang, or C, or any other language I'm interested in.
Struggle to imagine any React/Redux engineer I know getting this on the screen in even 3 seconds let alone sub 1. Depresses me how even 10 second webpage load times are considered acceptable in that toolchain, I know it's capable of better but it clearly needs more work to get there than people are willing to put in.
Right now you can only play the first 10 notes (semitones) of the chromatic scale so it makes it a little unusable musically.
It would be awesome and playable if it was:
- All 12 semitones plus octave (13 notes total)
or if limited space for buttons is an issue
- 7 notes of a major scale plus octave (8 notes total)
https://play.google.com/store/apps/details?id=com.castlewrat...
0 9 0 9 0 5 - 8 6 3
1 1 3 1 - 6 5
1 1 3 1 - 8 6
1 1 1 0 - 6 5 3
1 1 0 6 8 6
- modified a bit, as only 10 of 12 notes are reachable.
Thanks for the fun distraction for a few minutes :)
I would love to be able to upload a midi to this...
Back in 2006, a while after the passing of my previous cat (Kira), I became the new subordinate of two six week old sibling tuxedo kittens, Buzz (male) and Blossom (female). They were pre-named by the cat rescue place and I didn't have any better ideas, and so those names stuck for a while. Explaining "Blossom" was sometimes a challenge if you know me, 20st at the time, petrol head, beer, curry, other things, but do love cats.
Anyway, Buzz grew into this almost 5ft long (but not fat, or overweight) slightly clumsy cat in his "teens"; there was a laptop flooded by a glass of water, a not inexpensive B&W speaker broken by an attempted leap (grrr)...usual cat stuff.
Privately I started calling him "Bongo", I don't know why, it just seemed appropriate, and suited him. I also started calling Blossom, his sister mini-bongo around the house, but then mini-puss. Blossom was the runt of the litter (there were three cats in the photo, I offered to take all of them, Buzz was the middle cat, Blossom was the tiny one).
Anyway just a story.
Sadly Bongo (Buzz) passed away due to kidney issues at the age of 10 back in 2014. I miss him, he was so good natured (as is Blossom) and an amazing lump of feline friendlyness, seeing this today brought a wee tear to my eye.
Anyway, some links to these awesome pals:
https://imgur.com/bMr725m ("Bongo")
https://imgur.com/YGZZOAW (Younger days)
https://imgur.com/oq124oJ ("Bongo...again")
https://imgur.com/Fsgmqsd (When Buzz broke into a bag of paperwork when I left the house for a couple of hours)
https://imgur.com/NZLsF59 (They still managed to squeeze into their kitten bed somehow even after five years)
https://imgur.com/voqjl0F (Blossom, pretty much today, a bit of a lopsided sit, but 14 and a half years old and still as crazy as ever).
This is reversed for the Piano and Marimba for some reason which I think should be fixed.
Online tools I've found present note in all octaves, which I found confusing. So I've created own tool — no frameworks, 5603 bytes, entire code displayed on the page (except soundfont-player library).
(I'm musically illiterate but I assume that, except for the meow, all instruments from this site follows the usual music rules. Sorry if what I just written is nonsense)
Quick google search also reveals a few libraries [0] that should help.
The 1 should be one semitone lower, but it's still decent. Contra Walken, there is in fact too much cowbell if you try to play it simultaneously.
Now back to lurking.
You're welcome ^_^
- ability to save played melodies,
- ranked playlist.
Not the same people necessarily, but the same community.