Hiya! If you know me at all or have seen my name somewhere, I’m usually referred to as “That one piano guy” lol. So with that, I’m sure you can assume what this post is going to be about
Here, I am releasing some of my more popular Virtual Piano models! Inside you should find some directions and just about everything that you should need!
I ask that you please leave the credits (name) on the models or somewhere in your game description (given you make only minor edits or none at all). For those just using this as a reference, feel free to credit yourself for your hard work! I hope you all enjoy, if there are any issues feel free to drop them down below and I’ll try my best to get back to you all!
You want to go inside of studio to open and use .rbxm models. You can’t open them from your files as you would a Roblox game file for instance. When you load up into your studio, you’re going to want to click the ‘Model’ tab, and then insert the model from a file.
I’m not quite sure I understand what you mean here
They are physical piano models that you play using your laptop keyboard. But in order to use them, you have to actually insert the model, they aren’t just audio files of piano music
If that helps answer your question any, I glad I could help! If not, shoot me back a message!
Really nice models, I don’t know if I’ll ever end up using them, but they work really nice. Though I think the keys should stay dark as long as they are held and return to their color when you release. It feels a bit awkward having a key darkened when you already let go of it, or return to normal when you’re still holding it.
After 20 minutes of tinkering (the code’s quite a bit of a mess), I fixed that visual feedback issue in the PianoGui portion. Doing the same with the 3D movement and the sound would require adding an additional path for key up, which would probably require a bit of a rewrite.
I’ve actually realized this is uselss considering roblox’s new audio filtering system has blocked use of the audios needed to play the pianos in the first place!
Sorry to wake up an ond thread, but does anyone know of a way to play a song automatically on loop? sort of how that old autohotkey hack used virtualpiano.net to play these pianos.
The simplest way is to interface with the events that trigger the piano to actually play a note using a table of timings and keypresses.
local bps = 70 / 60
local t = {
{"i-f"},
{"s"},
{"a"},
{"o"},
{"i-f"},
{"u-f", bps * 2}
}
-- equiv. to: "[if] s a o [if]| |[uf]"
local Connector = workspace.GlobalPianoConnector
for _, data in ipairs(t) do
local waitTime = data[2] or bps
task.wait(waitTime)
for _, note in ipairs(data[1]:split("-")) do
Connector:FireServer("play", note, 1, 0)
end
end
Last night I actually did fiddle with this and figured out you’ll have to do something like this, It doesn’t look nice clarity-wise but it was something I quickly put together:
local bps = (70 / 60) / 3
local transpo = 0
local song = {
"u-f", "g", "h", "k", "i-f", "|l" ,"s", "|k", ...
}
-----
local Connector = workspace.Pianos.RemoteEvents.GlobalPianoConnector
local letterNoteMap = "1!2@34$5%6^78*9(0qQwWeErtTyYuiIoOpPasSdDfgGhHjJklLzZxcCvVbBnm"
local function letterToNote(key)
local note = letterNoteMap:find(key, 1, true)
if note then
return note + trans
end
while true do
for _, keyData in ipairs(song) do
if key:match("^|") then
task.wait(bps / 2)
key = key:sub(2)
else
task.wait(bps)
end
for _, key in ipairs(key:split("-")) do
local note = LetterToNote(key)
Connector:FireServer("play", { Note = note, Transposition = transpo, Volume = 1 })
end
end
end
To be honest, it doesn’t really matter, but for clarity put it inside the piano.