Instrumental keyboard

Music keyboard project, uses sampled sounds as instrument.

When caching is enabled it would sometimes give the tab an ACCESS_VIOLATION_ERROR on Chrome. I don't know why this happened, but after changing it to save the samples of the sound rather than the sound itself, it seemed to have fixed it.

We've sometimes had a problem when loading a project in presentation mode in Chrome because Snap!! would start running before it had actually loaded all the pieces of the project. This sounds like that. The next release (any day now) fixes it, I believe.

Nice project.

Because I didn't read the project notes carefully, I kept trying to play notes by clicking on the keys. How I finally figured it out was because of a slight bug: When you ask what instrument to play, the user's answer shouldn't play notes!

To my ear the piano sounds too much like the electric piano. I hear that there's a difference, but I think you should use the MIDI concert grand piano, whatever it's called. But, very cool!

great project, but the only way I could actually get it to play sound, was to see inside. idk how it didn't work on the project page.

edit, after I went back to it and reloaded the page, it worked.

That is because I used JavaScript to get a list of all the keys that are pressed, because I didn't want to make 25 on key pressed things. And I don't know how to detect whether the user is typing or not. Hmm... I think Snap! textboxes work by using an invisible text field and when you type, it focuses on the textfield making document.activeElement equal to that text field.

(turns out that wouldn't work because document.activeElement always equals the textarea)

I got the instrument sounds from a Yamaha PSR-EW300 digital keyboard, and I chose the instrument that makes it say "HypeTine" on the letter display. The piano is the grand piano. What did you think the electric piano would sound like?

You know when you do the ASK AND WAIT after the user hits the space bar. Turn off playing notes before that, and turn it back on after.

So, (Disclaimer: I am not a musician) when I'm fooling around with a keyboard at Best Buy or someplace like that, I think I hear a huge difference between the grand piano and the electric piano. Maybe I'm just hearing what I expect to hear. In this project, I don't hear so much of a difference. The electric piano sounds like what I'd expect, you know, synthesized.

Does the Yamaha just have one piano note digitized that it shifts in frequency to make the played notes? Because the different octaves on a real piano are quite different from each other; you can see by looking at the strings where the division points are.

Oh, why didn't I think of turning off the notes? Also, I don't know how the Yamaha makes the keyboard sound pitches.

I just thought of the idea of testing my Yamaha keyboard's sound against the sound of my project. I have concluded that the Yamaha keyboard does have different-sounding octaves, because in a lower octave the piano in my project sounds more like a guitar, but on my keyboard the piano still sounds like a piano.

I think my Yamaha keyboard probably has a separate sound for each note. I noticed while playing the piano the instrument labeled "PurplOrg" that C2 sounds a lot different than C3, but B2 sounds really close to C3. C2 sounds more coarse. I don't know how they handle me holding down a note for more than a minute though. I wish I could search this up and get an easy-to-find answer on stack overflow.