graue/luasynth

Stuff sounds different when sample rate changed

Opened this issue · 0 comments

I've been using this command to test sample rate changes:

./luasynth osc -oscType Square -freq 200 -length 10 \
  | ./luasynth adsr -attack 30 -decay 500 -sustainLevel -6 -sustainLen 1000 \
  | ./luasynth filter -filtType Notch -center 600 -q 5 \
  | ./luasynth delay -len 900

separately with export RATE=44100, 22050, and 88200. It sounds slightly different at 44.1KHz and 88.2KHz (if you convert the 88.2KHz back down to 44.1KHz, invert it and mix with the 44.1KHz, there's an echoing buzzy sound). And it sounds really different at 22KHz, mostly I think due to the oscillator, and the way it's generating square waves (it should ideally be bandlimited and not a literal "square" wave), but I think there's more than that going on and I'm not sure what's up here.

This issue is a reminder to investigate.