rncbc / samplv1

samplv1 - an old-school polyphonic sampler
https://samplv1.sourceforge.io
GNU General Public License v2.0
38 stars 9 forks source link

harmonics appear #24

Closed tjingboem closed 1 year ago

tjingboem commented 6 years ago

3th, 5th, 7th harmonics appear when i play a clean sine sample at the rootkey (and others).

What i did:

  1. generated a 3 second sine with Audacity. This looks totally clean in Baudline. sine_audacity
  2. imported the sine into Samplv1 with settings that should not add harmonics. samplv1
  3. played Samplev1 at its rootkey but get all those harmonics. sine_samplv1 This shows the 220 Hz sine as generated by Audacity, but also a 3 x 220Hz, 5 x 220Hz, 7 x 220Hz. They do have less amplitude, but are still very present.

I wonder if Samplv1 can be improved so that it reproduces the 220Hz sinewave without distortion? However, if this is "normal" behavior for a sampler, could you please provide a small explanatiion?

The sine wave of 3 seconds is attached. sine.wav.zip

rncbc commented 6 years ago

hi

most probably the root cause is having the "DYN Limiter" turned on, as is by default.

also, some aliasing introduced due to the sample-rate conversion on load if the sample-rate of the file (.wav) is of different than the running processing one (as of jackd).

byee

tjingboem commented 6 years ago

most probably the root cause is having the "DYN Limiter" turned on, as is by default.

Partially true. i have made a video (attached) and have set a loop around the entire sample Limit-2018-07-22_15.19.31.mp4.zip ;

  1. Limiter = off, velocity = 64 (start of video) --> 3 harmonics
  2. Limiter = on, velocity = 64 (at 28 seconds) --> 3 harmonics
  3. Limiter = on, velocity = 127 (at 52 seconds) --> 5 harmonics
  4. Limiter = off, velocity = 127 (at 116 seconds) --> 3 harmonics

So: Limiter does add extra distortion when amplitude is at full power. Normal behavior i would say.

also, some aliasing introduced due to the sample-rate conversion on load if the sample-rate of the file >(.wav) is of different than the running processing one (as of jackd).

The sine is generated using Audacity at 48kHz and is without distortion. I run Jack so my whole system runs at 48kHz. No conversion of the sample is needed...

I hope i don't bug you too much with this issue - don't shoot the messenger :)