I’ve done some googling and some forum digging here and it’s just taking too long to find out what I think should be quite straightforward.
I want arduino to read the amount of light in the room with a photoresistor (very basic), then map this to a specific range of numbers (1-1000 for example) (doable) and use this value to control the amplitude of an external audio signal (<-stuck).
For example raspberry is playing an mp3 on a loop. This is sent out from the line jack and then that amplitude would be controlled by arduino.
(I know raspberry has volume control inside and that it can be modulated via gpio, but theres only ~30 increments (in integers) of control, so that would not sound smooth, i believe.)