OpenNBS / OpenNoteBlockStudio

An open-source Minecraft music maker.
https://opennbs.org/
MIT License
730 stars 50 forks source link

The sample rate setting in the audio export is applied as a post-processing filter/effect, sometimes creating jagged lines #360

Open Creeper-Juice opened 1 year ago

Creeper-Juice commented 1 year ago

This bug is going to be quite hard to describe, but I'll try to explain it: When increasing the "Sampling rate" option in the audio export, it takes a not-increased file and "upscales" it, instead of accurately placing the samples. I hope this will make more sense in the reproduction steps.

To Reproduce Steps to reproduce the behavior:

  1. Make a new song
  2. Place a note, preferably in a very high octave
  3. Export the song as an audio track with a very high sampling rate (so don't use mp3)
  4. Analyze the file in some waveform audio viewer/editior and notice the "unnatural"/"jagged" look of the waves

Expected behavior The sampling rate is taken into account when exporting the song, rather than being "upscaled" as a post-processing filter/effect.

Observed behavior The sample rate setting is applied as a post-processing filter/effect.

Image audio

I know this is a very subtle and difficult to explain bug, but I've tried making this as easy to understand as possible.