vsariola / sointu

Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac & Linux
MIT License
254 stars 17 forks source link

Warn user about samplerate being other than 44100 (was: Recording seems to skip steps) #129

Closed MartiniMoe closed 7 months ago

MartiniMoe commented 8 months ago

image

On the left you can see my track in Renoise. On the right is Sointu after recording the notes from renoise. As you can see there is a skipped empty step at 05/06. This repeats on steps 12/13, 1F/20 and so on.

Any idea what is causing this?

vsariola commented 8 months ago

Maybe Sointu doesn't get BPM from host correctly? Try setting BPM manually to correct before recording. Alternatively, there is some rounding issue with the rounding of MIDI events frames to row numbers. I'll investigate

vsariola commented 8 months ago

So things go wrong somehow here: https://github.com/vsariola/sointu/blob/c08a319eb793ab6eb24d1b3c83de2c8b9dd4c159/tracker/recording.go#L142

vsariola commented 8 months ago

I don't know how Renoise does BPM changes but if the BPM doesn't stay constant for some reason, it could explain

MartiniMoe commented 8 months ago

Hmm, both were set to the same bpm

vsariola commented 8 months ago

Maybe you are at 48000 samplerate, while Sointu assumes fixed 44100?

MartiniMoe commented 8 months ago

Maybe you are at 48000 samplerate, while Sointu assumes fixed 44100?

Ah, that was it! :tada:

I'm using pipewire and running pw-metadata -n settings 0 clock.force-rate 44100 fixed this for me! Thank a lot :)

vsariola commented 8 months ago

I'll make this into a feature request: warn user about wrong samplerate & document the requirement for 44100. Granted, in the year 2024, that number could be 48000. But there's historical baggage here.

vsariola commented 8 months ago

Nice to hear you are able to compile & run the VSTI on Linux btw :)

vsariola commented 7 months ago

This should get the job done: image