RE a variable voltage source, something like this is a good choice
https://www.ebay.com/itm/3-5-30V-to-4-30V-DC-DC-Booster-Convert-Step-Up-Voltage-Regulator-LM2587-T9/332526504225?epid=18007435243&hash=item4d6c1fc921:g:GD0AAOSwRE5aYs7IA range of input voltages and variable output (voltages). You can do 12 VDC in and 24 VDC or whatever out. You can get cheaper DC to DC boosters (basically the same board from off shore sources for much less. Something like a $1 or so if you can wait for slow (month or more) shipping.
https://www.ebay.com/itm/263434043915?vectorid=229466&lgeo=1&item=263434043915&rmvSB=trueAside from that, I agree with Grant. and wouldn't suggest using a LDR either. They are not meant to drive a MIDI encoder.
As far as using a slide type (linear) pot, I've had my 3 (2 swell, 1 crescendo) for a little over 10 years with no issues, using a pot encoder from Roman Sowa. Something like this would work The encoder I have (POT 32) isn't made anymore.
https://www.midi-hardware.com/index.php?section=prod_info&product=PDS&R2=USDThis board scans 32 - inputs in 4 X 8 matrix configuration for a pedal board) in addition to 3 potentiometer or external voltages It has user defined update rate and resolution of the pot inputs. Esp useful on a theatre organ (like my Rodgers 340) as the swell peds are "exercised" probably more than on a classical instrument.
When I bought the slider pots (from Mouser) I bought 3 extra,
just in case. They are still in the plastic bag they came in. It does pay to buy good ones.
Basic advice, keep it simple, as in the KISS principle.
Rgds,
Ed