Oscillator mode
Back in the beginning of the piggy, I’ve setup a loop mode for samples I called oscillator mode. It’s pretty simple: once you got a sample, you know it’s lenght and can adapt the speed at which you scan the sample data so it it tuned to a given note.
It’s got a couple of advantages.
First it means you don’t need to force people to put samples of a given length to be tuned correctly. I’m actually surprised by how little software (i.e. none to my knowledge) does that.
Second, be selecting a rather wide sample, you will skip samples playing hi pitch notes and grab them on low pitched one which gives a different tonal vibes across the keyboard.
Third, by playing with the loop point in the sample, you get some kind of harmonic shift which makes the sound evolve even keeping the same pitch.
A straight forward application of this is to do square wave PWM. If you take a square wave but then reduce the loop length, you will change the cycle duty it the square wave. Since it’s automatically tuned, you don’t have any change in the basic pitch and just get PWM. Easy.
Here’s a little video demonstrating that technique that I’ve implemented in the arduino piano. First a square wave and playing with the loop size, achieving the PWMage, then a bigger NES noise sample that becomes a clear tone if I set the loop small enough.
Enjoy.
PS: Sorry for it sounding a tad shitty but it’s mainly because I’m powering the AP from the usb of my laptop I’m also recording from and there’s a ground loop.


1 Comment
Leave a CommentLeave a comment
RSS feed for comments on this post. TrackBack URI