My experiences to control SAMs is with controllers from Midi Hardware with drawknob organs. Basically the same setup with moving tabs..
https://www.midi-hardware.com/index.html
I'm sure you realize that the SAMs has 2 coils, one for on (stop head out) and one for off ( stop head in).
Using a BBS-1K
https://www.midi-hardware.com/?section=prod_info&product=BBS-1K
All 64 input contacts can be programmed to send note-on ONLY and on a second BBS-1K
all 64 input contacts can be programmed to send note-off ONLY This will tale care of the inputs from 64 SAMs contacts (one contact when you pull the stop and one contact when you push the stop.
Alternately half of the inputs (32) of a BBS-1K can be programmed to send note-on ONLY, while the other half (32) can be programmed to send note-off ONLY. This will tale care of the inputs from 32 SAMs contacts (one contact when you pull the stop and one contact when you push the stop.
Using a MIDECO
https://www.midi-hardware.com/?section=prod_info&product=MIDECO
MIDECO set to mode = 13h: SAM - Stop Action Magnet control, MIDECO then works with only 32 notes because outputs are paired.
When a note-on is received, it triggers an output pulse (connected to the "on" coil)
When a note-off is received, another output pulse (connected to the "off" coil) is triggered
Pulse length defined by the Duration Parameter.
When a MIDECO is used for SAMs, a high power (add on) accessory is used for switching high currents to GND.
https://www.midi-hardware.com/?section=prod_info&product=MIBO
Obviously the note (and MIDI channel) received by a MIDECO decoder input has to be programmed to be the same note (and MIDI channel) as sent by the BBS-1K encoder.
Rgds,
Ed