-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow one-shot tuning metadata #1126
Comments
TL/DR: This is the correct behavior. The wavetable oscillator is assuming that one cycle is 1024 samples, even for one shots. The approach to make this better is too big a change for 1.6.2. More detail. OK so here's what's happening. The one-shot player is assuming that a "single cycle" is 1024 samples. So if you play it at C (midi note 60) it will play across a 1024 sample block in one wavelength. This is exactly what you want for a wavetable synthesizer. But it has an odd effect in one-shot land. So lets look for a second. WaveTables are imported at 44.1khz so we can use that as a sample rate here. 1024 samples at 44.1khz is 23.21 ms and that wavelength is 43.06 hz. 43.06 Hz is close enough to note 31 in our tuning (the F) that the pitch shift gets explained. So basically right now a one shot, if you want true tuning with a one-shot, needs to have a cycle-per-1024-samples or be pitch adjusted. To test this I made a .wav file with a 1024 (with this script) and it was exactly in tune with the square wave oscillator and what not. OK so what to do about this? Clearly this is not a 'mistake' per se but it is more a 'fundmental feature of cramming one shots into a wavetable oscillator'. There is a workaround I can imagine, though, but I don't want to do it for 1.6.2. The workaround is: with my .wav tagging thing I introduced the ability to add a surge chunk. I also added a version number. So I could make a surge chunk which indicated "this is a one-shot tuned to this frequency". Then what we would do is store that on the wavetable and when we calculate the playback frequency, make sure that we take the base frequency into account. That calculation is a little tricky due to our variable tuning; and is a little far reaching since it adds new information to the wavetable structure and requires changes to the WT and Window oscillator as well as the wave and wt i/o and dafa format. So for now the best thing is: This behavior is correct and compensate accordingly. If you sampled at C you can figure out the difference to tune a patch of course. Or you could generate all your samples stretched to 43.06 hz and then they should also work! (or some octave multiple of 43.06 hz of course). |
yeah thats totally fine. Thanks for the detailed explanation. I will redo my one-shots for VSCO, I want people to be able to load them and not be confused by the pitch being off. |
Cool. Let me know when you have the replacement files! And thanks. |
Wouldn't this one be covered by #1069? As it is, it might be a duplicate? |
It’s related but not exactly a duplicate. If I ever manage to add a sampler we need to figure out what to do with the oneshots. It is probably more related to the issue about adding a wav import screen for I tagged wavs tbh |
Sure but when you add SFZ import, SFZ itself can specify if it's a oneshot or not... |
oh yeah; the one shot playback on the wavetable oeprator is different than what an sfz will do is all i'm saying. |
Ah, this is WT osc related! All good, then :) |
This one could probably be linked to #3436? |
yes |
Aight we can close this one then since the issue has been referenced. |
Not sure if this is a bug or limitation of the current system:
If you import a pitched one-shot, and turn keytracking off the sample plays back 31 semitones above it's original key.
So in order to get a pitched one-sample to play a "C" by default, I have to import an "F" a couple octaves lower..
Just making a few more one-shots and I wanna know, should I wait for a fix?
or just work with this?
I only have a couple presets that actually take advantage of the one-shots so far, so if it's an easy fix I can edit those presets no problem.
If it's a tricky limitation thing I can totally work with it.
The text was updated successfully, but these errors were encountered: