YAM - alternative Shruthi-1 firmware

I’ve done a first Ambika port of the YAM firmware, also available on GitHub , but since I’m not comfortable with flashing (yet) it is totally untested. Edit: I had forgotten it is easy to upgrade Ambika firmware via SD card, see this .

Cheers

Bonjour!

Attached is a build of YAM 0.02, the latest version of my alternative firmware for Shruthi-1. New in this version is a modified modulation for the (polyblep) saw oscillator. Check the README at GitHub for a summary of changes and notes on patch compatibility before considering an update of your Shruthi-1 firmware.

Enjoy!

1 Like

that looks cool, I will try it on my yellow

This is really good news for us dedicated Shruthi users! :slight_smile: I tried the last incarnation of YAM last night. I was really impressed by the qpwm (great for dark, growly pads) and the fmfb oscillators. The PolyBLEP saw and square/pulse sounds nice too. But some of the factory patches still sounds subjectively better with the “oldsaw” to my ears for some reason. Maybe it has to do with the volume difference between the PolyBLEP and the old saw? Would it be possible to somehow match the PolyBLEP volume with the volume of the old oscillators? I also found that both PolyBLEP oscillators has a sort of amplitude flutter on some mid/high notes. I recorded a short snippet of the PloyBLEP square so you can hear what I mean. Unfortunately the soundcloud quality makes it less apparent (there so much noise). Looking at my originally recorded waveform it is very obvious to see. Is this amplitude flutter something inherent with the PolyBLEP implementation or something that can be remedied?

Thanks for sharing you effort!

This was a VERY cool surprise! Square is no question an improvement. I like having both saws too. Doubtful there’s space for something like this but would be cool to have options to apply say a LFO to the envelopes that acted as a VCA, or vice versa. Maybe adding a ‘VCA’ option in the operator Out section? A man can dream…

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.)

Cheers
B

2 Likes

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

2 Likes

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.

Cheers,
B

2 Likes

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.

Cheers,
B

2 Likes

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’.
Cheers

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