Good point - this was where I was failing.
I'm glad to hear that took care of it!
I'm now just wrestling with trying to find the correct key to put the notes on.
If you know the sample rate of a single-cycle wave and the number of samples in it, you can compute the pitch as follows:
log2((sampleRate/sampleCount)/440)*12
... which will tell you the pitch in semitones calibrated so that zero is A3. Negative numbers count down the scale, positive count up. Of course, it has to be a
true single cycle wave for this to work. (If there are multiple cycles in the sample the computed pitch will be off by a factor of the number of cycles, and the attempt to convert it to semitones will fail horribly.)
Back to considering the best case where it really is a single-cycle wave. Let's say it's a 200 sample wave at 44.1kHz. log2((44100/200)/440)*12 is -11.96069841560567. This might look disastrous at first glance, but it's actually pretty typical. It means this cycle is
close to 12 semitones down from A3, which means you should pitch it as A2. It's just going to sound sharp. Fortunately, PXToolkit lets you fine tune in cents which are hundredths of semitones. So you just need to tune it -4 cents to get it the rest of the way to -12. Does that make sense?
If you don't have a calculator handy with log2 built in, you can use the
Wolfram Alpha website, which I find invaluable.
Would it be a possible enhancement request for the PXToolkit to allow looping of SCW files in the audio preview? This would help in allocating them to the correct key.
PXToolkit currently only loops samples when the original sample has a loop specified in it. That's true in both the previews and after you've exported the sample to the Prophet X. Looping the
whole sample would sometimes make sense so perhaps that should offered as an option when there's no loop in the file? Worth thinking about. Unfortunately I have quite a bit of work to do before I can upload a new PXToolkit release, as the open-source development tools I rely on have changed quite a bit and the older version no longer works on macOS Catalina. I'll see if I can't make time in the next week or two.