YAM - alternative Ambika firmware



I,ve now ported my alternative firmware YAM (Yet Another Mutation) originally developed for Shruthi to Ambika.

The latest source code and README is available on GitHub . Here’s the status of the firmware when I post this:

  • PolyBlep implementations replace the original band-limited ‘saw’ and ‘square’ oscillators for higher fidelity and less memory footprint (Polyblep implementation inspired by, but less general than, Oliviers prototype for STM). For ‘square’ this primarily mean that the oscillator now have a more proper sounding PWM, i.e. more edginess, and no loudness drop for PWM modulation parameter above 0. For ‘saw’ there is no gentle high pass pre-filtering and the modulation is different. The parameter for saw now add mix of a 2nd saw edge, resulting in a saw with sub oscillator (actually super oscillator) sound.
  • Triangle oscillator (‘triangle’) is no longer band-limited (to reduce memory footprint) and is folded (instead of clipped) upon modulation.
  • Added a quad PWM oscillator (‘qpwm’) very similar to the quad saw (‘pad’). The modulation parameter simultaneously affects both detuning of the four pwm oscillators and the pulse width.
  • Added an alternative FM oscillator (‘fmfb’) with feedback modulation. Just as for the regular FM oscillator, the modulation parameter defines the FM amount, but for modulation values above 64 increasing amount of feedback is added. At moderate levels the feedback adds ‘grit’. At higher settings it adds digital distortion (deliberately left in).

NOTES ON PATCH (PROGRAM) COMPATIBILITY with official Ambika firmware:
Due to qualitative differences of the ‘saw’ and ‘square’ oscillators etc, levels may have to be adjusted somewhat to mimic original patches. If you really miss the original saw oscillator from the official firmware, this one is still available as ‘oldsaw’ (it’s high-pass sampled and have a different character).

I’ve attached built binaries that can be used to update the firmware using the instructions in the manual BUT DO SO AT YOUR OWN RISK!

EDIT: deleted attached firmware file. See an updated README on GitHub, and later firmware builds later in this thread.



Be careful when renaming the firmware files and putting them on the SD card for firmware upgrade.

The controller file should be named AMBIKA.BIN, and you need to put six copies of the voice card file named VOICE1.BIN, VOICE2.BIN,…, VOICE6.BIN. It’s all in the manual .

If you mix up the controller and voice card files you may end up in this situation.


Great! Are the additional oscillators ‘indexed’ at the end or will they interfere with current patches? Thanks.
Edit: It looks like you moved the new oscillators to the end. Awesome.


Seems amazing Bjarne, good job! Will gove this a spin as soon as possible. Thank you!


@funkyfli Yes I moved the new oscillators to the end for the sake of improved patch compatibility (even though it made the code somewhat ugly).

Glad you like it!


Out of the blue question but how is everyone getting along with this update?


It works fine for me but of course I’m biased :slight_smile:


It’s time for a bug report and an update!

I’m not sure if you’ve noticed but I’ve found a bug - there’s harsh digital distortion when using dual ‘qpwm’ oscillators. The problem is most likely due to CPU overload and I don’t have a solution for this bug at the moment.

I’ve added a new polyblep saw oscillator similar to the CS-80 inspired ‘csaw’ found in Braids. Attached is a build for the daring of you, and as per usual, the source and README is found here . Always read this and be careful if and when updating the Ambika firmware!

Edit: deleted attached firmware file

Have a nice weekend


Another issue found :frowning:

The harsh digital distortion due to CPU overload does not only occur with dual oscillators quad oscillators, but also the fm oscillators. Since these oscillators work fine on Shruthi, I conclude that there is significantly less CPU cycles for oscillators available on Ambika. I need to get back to the drawing board and figure out what to do about the quad and fm oscillators in YAM for Ambika.

Sorry for the inconvenience.



Just a note that this is highly appreciated, speaking for two (2 excited Ambika owners over here)



I (believe I) have fixed the digital distortion issues due to CPU overload for the FM and Quad oscillators. Attached is a build of the firmware available on GitHub .

I’ve found out that it’s not always very intuitive to understand what’s the bottleneck based on the C++ alone. I’ve had to look at the disassembled code to find the issues. For the Quad oscillators it turned out that it was 16 bit phase comparisons that was too much, so I had to replace them with somewhat ugly 8 bit comparisons instead (yielding the exact same output though).

For the FM oscillators I had to replace an interpolated table lookup with a straightforward table lookup for the modulating sine wave. Even though this theoretically implies some additional bit of quantization noise, I’ve done some A/B listening tests, and cannot hear any differences whatsoever.


Edit: deleted firmware file


@accountboy Glad you like it!


I am really excited to try this out.



The saw and square have much more ‘punch’ now, and the new csaw is fat and warm. Fmfb sounds like the fm should: with the distortion.

Recent update removed the subtle distortion the qpwm had before. It sounded quite interesting with the distortion appearing randomly when tweaking the modulation parameter. Didn’t notice any unwanted distortion on fmfb though. After the update it sounds cleaner with more pronounced grit and distortion starting points when increasing the modulation. Actually I can’t decide which firmware to keep: the one with unwanted distortion or the one without. I wish I could keep them both.

Thank You Bjarne! You’re a Hero!


With the firmware, would I need to adjust the individual voice cards or just change out data on the SD card? New to this, a bit lost :confused:


@gummi you need to put the AMBIKA.BIN, VOICE1,…,VOICE6.BIN on SD card and follow the Firmware Update section in the manual .

But beware, as evident in this thread you can mess up if you’re uploading the wrong firmware file to the voice cards.



I think I am capable of handling that:)

If I love the new Polyblep oscillators enough such that I found the original saw/squ/tri redundant, is there any way to remove them from the firmware and put the new ones in the front of the oscillator options?


@gummi As stated in the README on GitHub the new saw,square and triangle replace the original oscillators as the first oscillator options. The old saw is at the end of the selection, together with the qpwm, fmfb, and csaw. Since it’s open source you can of course change whatever you want, but you’ll have to know what you’re doing. It’s not hard to change order of oscillator options but you may mess up patch compatibility (more).


Whoops ! I thought you meant that all the new saw/squ/tri are at the bottom. I’m at work and juggling projects, reading comprehension is poor right now:(

Excited to load them after work, in a clearer state of mind !


@gummi No worries. I’ve chosen a compromise between backwards compatibility and changes that works well for me (and I hope, many others). I’m sure others could have chosen either a “100% compatibility” or a “let’s start from scratch” approach. Cheers