How do I pitch piano keys correctly?

I’m trying to make a piano. But i’m having trouble pitching notes correctly.

image

I am using pitch shift for every sound but it doesn’t work all that well. Does anyone know how to pitch each note correctly?

2 Likes

Perhaps you can try using Sound PlaybackSpeed on the properties.

2 Likes

The formula for pitch shifting is

local pitch = 1 + math.pow(2, n/12)

swap n with how many semitones you want to pitch up the note

What exactly does the N stand for in the “n/12”?

N is just a variable for any number. What it means tho is the number of semitones you want to pitch up

the amount of notes you wanna pitch it up by
if it was a C note and you put N to lets say 2, it would be the note D

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.