openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

update linearResampleTo() and hermiteResampleTo() in ofSoundBuffer class.

Open sadmb opened this issue 3 years ago • 3 comments

update resampling code in order to fix the following bugs.

  1. They were crashed when end had negative number.
  2. They only had 2 loops with high speed resampling
screenshot 2022-08-28 22 12 31 .

sadmb avatar Aug 28 '22 14:08 sadmb

Ping @roymacdonald

dimitre avatar Aug 28 '22 15:08 dimitre

If negative values, suggests file format was signed and not unsigned, might need to convert bit shift up to get valid representation of audio and not clipped out the bottom spectrum

What input data type were you using in that example?

On Mon, 29 Aug 2022 at 1:28 am, Dimitre @.***> wrote:

Ping @roymacdonald https://github.com/roymacdonald

— Reply to this email directly, view it on GitHub https://github.com/openframeworks/openFrameworks/pull/7062#issuecomment-1229485762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGK2HBFATK52DXK5U546UTV3OAR3ANCNFSM573D2YPQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

danoli3 avatar Aug 29 '22 02:08 danoli3

OF uses signed floats between -1 and 1. I would rather use an external library to deal with resampling as it is non trivial. I made an addon using libsamplerate which can be ported to all platforms and it gives me correct results all the time, while the of implementation fails often. I would love to see such implemented. If you give me the gonI would be happy to implement for all platforms

roymacdonald avatar Aug 29 '22 03:08 roymacdonald