Attempt at a piano?

So I’ve been having an idea for a piano like this for a while, I have no idea if anyone else has done it yet, but I just spent 2-3 hours making this 5 key piano. Notes so far: C, C#, D, D#, E. It uses SurfaceGui textbuttons to detect when the player clicks and releases the click on the key. Each sound is a C with the pitch raised slightly. It’s a small build but I wanted to share it :stuck_out_tongue:

Here’s me playing Mary had a little lamb!
[youtube.com/watch?v=1oemOO3YMko&feature=youtu.be

You should make a full piano next, and scale down the keys. Then use Mouse.Button1Down in the client so you can click and drag across the keys!

That’s a great idea! Thanks for the feedback :wink:

So much cooler than the GUI piano I made back in 2011…

It doesn’t push down fast enough though I think. As a piano player myself, a piano does not make noise when the key is first touched, it makes the noise when the key is pushing down.

also, just a suggestion, maybe add key mapping?

–s--d-- --g–h--j
z—x–c--v–b--n–m

Hehe, thank you!
I’ll tweak the speeds, I only have a 10 year old electric keyboard, so I don’t know how fast it’d really be, but I’ll try to make some adjustments. And I’ll try to add keymapping! (But I highly doubt I can, I’m kinda noobish at lua)

Your piano’s much better than the one I attempted awhile back. ^^;; The animation adds a nice touch.

I don’t have any particular suggestions for the piano that no one’s said.

This is great!
When I get back to school, where we have an electric drum set, I’m going to be working on a little project to interface real instruments with Roblox instruments by accepting a MIDI output from the instrument to an Arduino, and then sending a key command from the Arduino to the computer. So you should totally add key commands, because that would be cool.

1 Like

Reporting a bug in the place as of this post.

Your keys seem rather…glitchy.
I just started spamming the keys and this happened.

I manually pitched about 4 octaves (I think. Or 5!) a year ago, for a piano I was making. I’ll see if I have the piano lying around, it’d be fun to dig it up again. I made it play simple melodies after hitting a certain pattern, which also opened a secret entrance :smiley:

I made this back in 2010

Here’s some math for you if you didn’t already know how to do it:
Pitch=2^(note/12)
:smiley:

I’ve been working on a custom intrument & track building module, and responding to the above post–the Pitch property of Sounds contracts the length of the sound by the same factor (i.e., doubling the Pitch value shrinks the sound by a factor of 2). I believe it’s because you have to do some extra math to distort pitch independently of time without ruining the overtone frequencies–overtones are extra frequencies that, as a byproduct of the original sound vibrations, give a sound its timbre, and messing with them causes a sound to go totally whack and sound terrible. I suppose the ROBLOX engineers got too lazy or something, although it shouldn’t be a hard fix…

Anyhow, I’d suggest you upload multiple piano MIDI sounds–at least one per 2-3 octaves. That doesn’t solve the issue of having fading notes, though, as stringed instruments are supposed to fade over time. It’s really a pain in the neck to work with Sounds in ROBLOX, and I wish the devs would correct this.

1 Like