Waveform modeling simulation tests..
Haha, not so good. Not so good.
I ran some simulation tests today using cool edit 2000 and milkytracker. Made a generic 32byte waveform, played it at a specific note, and recorded the output. I then isolated the particular repeating waveform shape. Cropped it and repeated it for a two cycle wave I could mess with.
Now, they sounded very clean. I was at G4 I believe. So I did my test by removing 6 samples from one of the waveforms (which is close to 6.3 of the TIMER step). I got my pitch change like expected, but I also got something else 😛
Repeating on the pair of waveforms gave a distinct tonal change to the sound. More than just a pitch drop. At this point, I was pretty pissed. I hadn’t even reached G5 range yet, and here I am already having problems. Having different tonal sounds at different pitch levels isn’t exactly unusable, but it’s not exactly desirable either. Muddy isn’t exactly the right word, but compared to pair of exactly even waveform cycles, it’s a good enough word to describe the different. Where one sounds very clean, and the other more sounds harsh/gritty/dirty.
So.. after a while of messing around, I came to the idea that maybe I should ‘muddy’ the clean pair. You know, so the pitch drop has somewhat of the same sounding tonal/muddy range. I ditched the smooth almost looking sine wave for a SAW pair instead. Both the SAW waveforms have a flat tail at the end. On one of them, I made 6 samples at a different peak amplitude. And on the other one, I left it alone. Both SAW waveforms are of the same length still. Sure enough, out goes the clean sound and in comes the muddiness. Perfect.
Now to test cutting out those six sample of the first SAW making it that much shorter than the second one. Sure enough, the pitch dropped and the tonal range was very similar. Then it dawned on me… I’m introducing additional frequencies on the first waveform not exactly matching the second waveform. And removing the 6 samples is actually doing the exact same thing.
Was does this all mean? It means I have a way of controlling the tonal changes and the pitch changes. I don’t have any math behind it, so I had to tweak the amplitude level on the clean pair by ear. I even tried it on the sine-ish waveform pair (although with a different amplitude range). The good thing is that it works, the bad side is that it requires a bit more code to do this (and possibly little bit bigger LUT). The other negative side is, the type of waveform will have to be tweaked a certain way and with some rules applied. But that aside, brand new timbre control for the PCE is still on track.
Here’s an ascii example:
__/| __/| __/ | __/ | __/ | | __/ | / |_|_/ |___ ------------------------------ ### ### __/| __/| __/ | __/ | __/ | __/ | / |__/ |___ ------------------------------ ## ###
The top waveform is the even/clean one. Notice the spike in the tail end. The clean waveform represents the TIMER clock divided by a whole number. The second waveform is missing that spike and it one TIMER tick shorter on *one* of the pair of SAW types. This represents TIMER divided by a whole number + 1/2.