YAM - alternative Shruthi-1 firmware

double post

I guess the PRD option kinda does that already…

@Modularmind I cannot hear what you refer to as amplitude flutter for high notes with the polyblep square, and the soundcloud snippet is really noisy/distorted, especially the last two notes. If you have a better recording to illustrate what you mean, please send it.

Note that the polyblep is not totally bandlimited, so at high notes, there’s still some small amount of aliasing. Also, the platform is so computationally constrained by the 8 bit resolution and limited room for calculations, that there’s really no room for magic. I’ve struggled quite hard to get the necessary division etc for polyblep running at all. The polyblep oscillators are by no means substitutes for real analog oscillators. I cannot hear any more flutter or similar than for the original saw, square and PWM oscillators though.

I should mention that the polyblep oscillators have two (necessary) discontinuities that are quite audible when pitch modulation/bend/vibrato pass them :

  1. for midi note 107 (C10) both the saw and square oscillators reverts to a basic polyblep saw.
  2. pwm pulse width is constrained to be at least as wide as an oscillator increment.

I don’t think it makes much sense to mimic the original saw level, because that would unnecessarily compromise audio quality of the polyblep saw, and the character would still be different because of the (lack of) high pass filtering. It’s very straightforward to change the oscillator level, or simply reverting to the old saw. (I considered keeping the old saw as the first oscillator, but I thought that was too conservative. Note that Olivier actually proposed ditching the old saw altogether.)



besides we shouldnt live and die by the factory presets :D. Looking forward to finding some time to play with this.

I think we need to build a new set of presets for this.

@Modularmind I forgot to mention that the polyblep saw drops in level when modulation is increased and the high octave saw is mixed. This is because the modulation works by adding a second edge in the middle of the saw, but the slope of the saw is constant (because that’s the only computationally possible way of doing this). So at max modulation you’ll have two saw waves (one octave up) of half amplitude instead of just the one. I hope this makes sense. Cheers


It’s a tricky balance between backwards compatibility and progress. I’ve aimed for a reasonable compromise - two steps forward and one back.

@Bjarne I hope it came across that I really appreciate the effort you’ve put into this. And I like the result a lot too.

I’ll try to attach the wav files of the “flutter” I described. I’m not sure that is the correct way to describe what I hear and see on the waveform. Maybe it’s aliasing. I know too little about these things to say.

First file is a recording of some notes with the polyblep square (open filter and no modulations). Second file is a recording of one note from the shruthi (open filter and no modulations). I had oldsaw as osc1 and ployblep saw as osc2. I played the note first with pure oldsaw, then i turned the mix fast to pure polyblep saw, so you clearly can hear the difference.

I hope this can help.

@modularmind Yes, I absolutely got your appreciation - I didn’t mean to sound defensive.

I’m still not sure I hear any more flutter or other distortion in your sound clips though:

  • saw: Both the waveform and what I hear of the polyblep saw sound as stable as the original saw in level an consistency. The difference I hear (and sort of see on the waveform) is that the old saw is “tamer” in the sense that it has both less high harmonics (less aliasing due to low pass filtering) and less bottom end (due to the high pass filtering), while the polyblep is a little more edgy/crisp. Edit: if you want to compare to a ‘naive’ saw you can select the first wave of the ‘waves’ wavetable.

  • square: In my ears (and by the look of the waveform), the polyblep square seems quite clear and stable. You could compare it to the dirty pwm, and while the dirty pwm is aliasing like crazy, I think both the polyblep square and the pwm are equally “stable/non-fluctuating”. Again, just like the original saw, the original square (no longer included) had less bottom end and aliasing/clarity due to high pass filtering and more low pass filtering.

With 8-bits, ~40kHz samplerate, and polyblep anti-aliasing, I’m pretty convinced that this is what you can achieve. Maybe I can provide a more conclusive answer in terms of proper spectrum analysis etc later on. Also, I guess some of the other signal processing sawwy people on this forum (Olivier for sure :wink: can provide even more insight.

I’m glad you appreciate the firmware. If you really need it, it would be quite simple to do a conversion tool that replaced the new saw with the old saw for your legacy patches. I don’t think I’ll have the time for it though. I’m not a big fan or user of massive preset banks, but I still aim for reasonable backwards compatibility for the sake of migrating personal favorites, and homemade patches.

Thanks for taking the time and posting the sound clips.



It’s me spamming away again :slight_smile:

The source for YAM 0.03 for Shruthi-1 is now checked in, and a fresh build is attached for the daring of you. Always check the README at GitHub and think twice before upgrading your Shruthi!

New this time is that I’ve improved patch backwards compatibility with the official firmware by moving all the additional oscillators (‘oldsaw’, ‘qpwm’ etc) to after the wavetables (even though it made the code somewhat ugly). I also threw in a port of the ‘wavquence’ oscillator from Ambika as an added bonus.



Yay! Thanks for that!

Oh, man. With the wavquence oscillator someone will have to update @badtidude Shruthi Wave Generator to work with this firmware.

No need to do that now as updating the YAM firmware will make editing the SWG a necessity for it to work properly again.

1 Like

I’ve spent some more time with the polyblep oscillators and I’m liking them more and more. In real patches, I can’t hear the “flutter”, and the fidelity is definitely better than with the old oscillators. Still I’m glad you decided to keep “oldsaw”, because it has it’s own character that fit in nicely in some patches.

I’ve found that on a couple of patches that use the non-bandlimited triangel oscillator the sound is very different compared to how they sound with the bandlimited triangel, especially if any other mix mode than “sum” is chosen (e.g. “xor”). I’ve tried substituting triangle with the ztriangle oscillator with good result.

Thanks for moving the new oscillators after all the old ones.

@Modularmind Thanks for the feedback and testing. I’ve also noticed that the xor operator (that I really like btw) is one of the most sensitive too subtle waveform and level changes. I guess it makes sense when you think about that it works at the bit level. Usually I’ve found that some level tweaking can recreate the ‘sweet spot’.

If this firmware was coding in the west midlands in the UK it could be called YAMYAM :slight_smile:

I will check out this new build when i get back to the studio, interested to see what the ‘wavquence’ oscillator is like.

Hey Bjarne, I just installed YAM on two of my shruthis. The new oscillator models are pure dope. Really good. The improved “analog” waveforms also sound nice. Here’s some demos I put together quickly:

1 Like

Nice demos TheSlowGrowth! Both the fmfb and qpwm oscillators were ‘obvious’ extensions of Oliviers original oscillators that I just had to try out. I’m happy how it turned out.

It’s time for YAM 0.04!

The source and updated README is available at GitHub , and a build is attached, but think twice before upgrading your Shruthi!

The biggest change is an added ‘csaw’ oscillator similar to the CS-80 inspired saw available for Braids. I’ve also fixed a bug in the ‘crush’ oscillator that I introduced when replacing the band-limited triangle earlier.

Have a nice weekend!


Any chance this will would ever be implemented for Shruthi XT :)? Am I right that it does not take in Shruthi-1 firmware but own version?