Can somebody help me ?

54 views
Skip to first unread message

ewe

unread,
Apr 13, 2021, 8:14:06 AM4/13/21
to Multiplayer Piano Forum
hi, I've been wanting a script for a long time to be able to listen to 100% audio volume and be able to use the mouse to play, could some charitable soul enlighten me? pls~

Khorne

unread,
Apr 13, 2021, 12:04:40 PM4/13/21
to Multiplayer Piano Forum
ewe,
Hmm I would like some more information on what you are requesting and I will try to help as best as I can
- Khorne

チャーシィCharsy

unread,
Apr 13, 2021, 12:56:37 PM4/13/21
to Multiplayer Piano Forum
you can already do both
move the slider at the bottom right all the way to the right, that's 100% volume. if it doesn't sound like it, check your device's volume.
you can use the mouse to play, just click on the piano notes.

ewe

unread,
Apr 13, 2021, 1:13:32 PM4/13/21
to Multiplayer Piano Forum
When you move go up and down with the mouse you also raise and lower the volume, and a mouse user has to point to the piano keys and that always leads to hearing 50% of the volume, that is why a script is necessary so that it doesn't matter where this the mouse will always hear 100% of the audio  >.<

チャーシィCharsy

unread,
Apr 13, 2021, 2:16:26 PM4/13/21
to Multiplayer Piano Forum
I don't think there's an easy fix for it, especially since MPP is currently iframed, and the code will probably look much different by the time the new owner finishes rewriting it. For now, you can just override the client's note press code to always use maximum velocity (note volume), which is 1 (0.5 would be 50%).
Something like
MPP.press = function(note, vel) {
    if(this.isConnected()) {
        var vel = 1;
        if(!this.noteBufferTime) {
            this.noteBufferTime = Date.now();
            this.noteBuffer.push({ n: note, v: vel });
        } else {
            this.noteBuffer.push({ d: Date.now() - this.noteBufferTime, n: note, v: vel });
        }
    }
}
try that.

チャーシィCharsy

unread,
Apr 13, 2021, 2:18:15 PM4/13/21
to Multiplayer Piano Forum

It will sound like 50% or whatever to you, but to others it should be 100%
Reply all
Reply to author
Forward
0 new messages