I recently made a mod for 1.18 forge/fabric
That extends the vanilla noteblock range from 2 octaves to 6. Instead of just adding sound files and playing them like you do in your datapack, noteblocks++ modifies the noteblock code to support the same range.
all you would need to do to set a noteblock to use the vanilla, upper, or lower octave sets is to set a blockstate property called “octave” to “mid”, “high”, or “low” respectively.
Additional context
https://www.curseforge.com/minecraft/mc-mods/noteblocks
I recently made a mod for 1.18 forge/fabric
That extends the vanilla noteblock range from 2 octaves to 6. Instead of just adding sound files and playing them like you do in your datapack, noteblocks++ modifies the noteblock code to support the same range.
all you would need to do to set a noteblock to use the vanilla, upper, or lower octave sets is to set a blockstate property called “octave” to “mid”, “high”, or “low” respectively.
Additional context
https://www.curseforge.com/minecraft/mc-mods/noteblocks