Unless otherwise specified, these measurements were conducted using the fundamental pitches (pitch argument of 1) of these sounds played 20 times a second; i.e. The command used is /playsound <sound> master @a ~ ~ ~ 1 1 1 run in a repeating command block. These measurements can be verified with a tuning program or electronic equal tempered tuner.
The sounds block.note_block.basedrum , block.note_block.hat , and block.note_block.snare are excluded from this list, as they are not instruments of definite pitch.
These sounds include:
The block.note_block.bass sound is sharp by about 15 cents
The block.note_block.cow_bell sound is sharp by about 22 cents (not out of tune when played at its lowest possible pitch of 0.5)
The block.note_block.didgeridoo sound is sharp by about 6 cents (sharp by 22 cents when played at its highest possible pitch of 2)
The block.note_block.guitar sound is sharp by about 19 cents
How to reproduce
Open a new creative world
Run the command /playsound minecraft:block.note_block.harp master @a ~ ~ ~ 1 1 1 in a repeating command block. You should notice that the note is an F# and is relatively in tune.
Run the command /playsound minecraft:block.note_block.guitar master @a ~ ~ ~ 1 1 1 in a repeating command block. You should notice that the note is about 19 cents sharp.
With the addition of the new noteblock sounds in 19w09a I decided to run through all the sounds and collect all the out of tune sounds into one bug report.
It's actually closer to 18 or 19 cents sharp in the snapshots