GPIO High/Low while playing on RPi

Hello Community,

is there a feature within Kodi to allow setting the GPIO pins on a Raspberry Pi to high while Kodi is Playing a song/music? That GPIO pin shall be set to low after the music has stopped.
I found a little Python script which is exactly doing this with a work-around, but I find that quite useful to have that setup out of Kodi directly.

Marc