I'm glad you were able to push your way through your problems. Was it just a different day that helped or has some advice improved your understanding?
You are about to step outside what I am able to help with though. You'll have to write some code to deal with your hardware setup. I haven't really go the time to be setting up buttons on my pi.
What you need to do is set up some software interrupts for the GPIO pins and call commands.
http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-3 should be all you need.
You need to set up your pins > GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Define the method to be called when the pin is triggered > def my_callback(channel):
Link the pin to the method > GPIO.add_event_detect(17, GPIO.FALLING, callback=my_callback, bouncetime=300)
What you want to do when the buttons are pressed is mpc toggle, mpc next and mpc prev.
You should be able to do these by:
import os
os.system('<the command>')
Do things one step at a time. Make sure you can control mpd from python. Then start looking at the GPIO problem.
An important note about GPIO on the pi, python needs to be run as root to do the modifications so your friend sudo will be back.
-- edit after thinking of alternatives --
I originally thought about using a usb keyboard that had 3-5 buttons controlling mpd. You would map the buttons from this small keyboard to the shortcuts in ncmpc (P > and <)
Since you wanted to go the gpio option, I looked around.
I found
http://blog.gegg.us/2017/01/setting-up-a-gpio-button-keyboard-on-a-raspberry-pi/ which enables you to map gpio ports to key presses. I originally passed on it because you couldn't map the keys to shift modified characters. On reflection, this might be an easier method to build upon though.
You would still need to write a program that takes keyboard input and converts it to the right mpc call. This is much easier to test as you could use any keyboard.
Then it is just a matter of getting that dts system working. Once you have the buttons wired up and the dts installed, you can see whether the buttons generate output on a console.
Then link it all together. The advantage of this approach is the program listening to keyboard events doesn't need to be executed as root. You don't have to clean up the GPIO configuration. Hopefully the kernel is handling the interrupt configuration as efficiently as possible.