To get accurate spark timing, you will need many pulses per revolution of the crank. On my 4 cylinder suzuki, it has 22 pulses and a 2 non-pulse are to determine 'TDC on #1 cylinder.
For a single cylinder engine I would think you need at least 6 pulses per revolution.
high performance/drag racing style engine runs an MSD crank trigger ignition. 4 magnets located around a trigger wheel on the balancer at 90 degree intervals corresponding to each 4 TDC positions (V8). A pickup fires the ignition each time a magnet flies past.
These engines turn 10,000 rpm plus and make thousands of horsepower.
The trick I can see here is having the pickup trigger advanced
some amount before you actually want the ignition to fire and work a delay into the controller. This allows you time for processing. (I've got no idea how much timing a 2 stroke engine runs but to use my drag engine as an example, we run (depending on gear, fuel, weather and other tune up factors) somewhere around 38 degrees BTDC ignition timing. The pickup is actually adjusted to be somewhere around 40 - 42 degrees. The processing in the ignition controller then fires at 38 (as seen if you check the timing with a timing light).
You can then work a 'retard' curve into your controller, referencing RPM or boost/MAP or any other factor you care to use. Remember, the controller can only retard the timing from your base setting. It can't predict into the future to fire before the trigger, it can only trigger after the trigger, so your pickup must be set at the maximum amount of advance you want anywhere in the curve, then retard back from that value in your curve.
In my case we pull 1 degree out when it shifts from low to top gear, and can ramp a few degrees out on launch if traction is marginal, or plot an entire curve for each gear based on RPM or time.
The maths/interfacing for an Arduino to do this and whether it can actually do the job; I have no idea. But I do know it works with only 1 reference per cylinder TDC event in some pretty high performance applications, so it may well be possible.
Have fun with it!