Hi,
Nice pedal.
Typically in a virtual organ console the position of the swell pedal is determined by measuring the voltage across a variable resistor. Most commonly either a slide or rotary potentiometer is mechanically coupled to the swell pedal. Then a MIDI encoder converts this voltage to a numeric value as part of a MIDI message that is sent to the computer.
The pedal you pictured has discrete contacts and is designed to be used in a traditional pipe organ with a limited number of inputs for swell shade position. You could use these existing contacts but it wouldn't be ideal.
Perhaps the easiest thing to do would be to use a linear potentiometer and a small MIDI encoder such as the midihardware.com MBBS (https://www.midi-hardware.com/index.php?section=prod_info&product=MBBS) or the Highly Liquid MIDI CPU or the Teensy (Arduino compatabile) board.
If you wanted to use the existing contacts and were content with the fixed positions ( 8, 16, or 32) you could use a series of resistors to create a varying resistance as the pedal is moved and use one of the encoders as described above. If you went the Teensy (Arduino) route you could read the inputs directly and calculate your own values in software, no additional potentiometer required.
As always, lots of options!