The latest article in Low Tech Magazine is on compressed air energy storage.
Reading around led me to Blade compressors.
There's a fairly clear video here, starting 60 seconds in.
Essentially the cylinder is a hollow doughnut/toroid as the cylinder with a piston moving around inside. 2 holes in the cylinder, an input and output are separated by a disc which has a slot in it to let the cylinder through (watch the video).
This got me thinking. its a nice design but pretty impractical for a home builder to cobble together. The 'blade' needs to match up perfectly with the piston, and the cylinder has a slot cut into it to attach the piston to.
To avoid the slot the entire thing could be turned into a linear motor. In my head there would be a ball bearing for the piston, copper coils around the cylinder to propel the piston. The problem then is syncing up the blade to open when the piston is approaching and then I thought what about a second ball bearing? one ball bearing goes around the loop compressing the gas, once it gets to the ball bearing 'cylinder head' it hits it, the cylinder head gets knocked out of position becoming the new cylinder (like a Newtons cradle, thus the name) and the old cylinder stops becomes the new cylinder head. the new cylinder does it's loop, before hitting and replacing the current cylinder head and the cycle repeats.
Much googling hasn't turned up any alternatives, and I can't think of any show stopping issues.
Why not use some kind of magnetic swinging door/latch or actuator to swing a baffle that either redirects the exhaust air out the check valve to your compressed air storage tank or lets the ball roll through and then shuts the baffle/door behind it? You already have a bunch of magnets involved, and timed electronics going on, what's one more?
When I was thinking about your design, it looked theoretically identical to a series of very small piston chambers all linked in series. If you replaced each magnet coil set with a short linear actuator acting as a double action pump with a one way check valve leading into the next chamber, then you get that same "increasing pressure as you go around the loop" effect.
Perhaps you might consider doing something where you get a series of magnet cylinders to move back and forth between your magnetic coils as your "pistons" with one way check valves on the end of each "cylinder" to trap the air as it moves from chamber to chamber.
You might even consider something where you get two magnets to move towards each other for "compression" while simultaneously drawing air in behind them as "intake"; then when they reverse direction, two magnet cylinders are "compressing" the air they just drew in them by moving towards each other. Something like an "opposed piston" engine...