Keyboards like the Korg Pa80 have great auto accompaniment algorithms that can allow you to compose, practice or just jam along with background music that you can control.
In the case of the Korg, you need to configure the unit so that it uses incoming MIDI data to control the key of the accompaniment. This is accomplished in the Global Edit Environment menu page 8, here is an extract from Korg’s manual
—-From Korg Manual—
PAGE 8 – MIDI IN CONTROLS (1)
This page is where you can program various MIDI IN features, like the Chord Recognition channel and the Harmony channel for the (optional) Vocal/Guitar Processing Board. There are two separate Chord channels. This is very useful when you must send chords to Pa80 on two channels (like with some MIDI Accordions).
Chord1 channel Notes entering this channel are sent to the Chord Recognition engine.
Chord2 channel Notes entering this channel are sent to the Chord Recognition
Harmony channel Notes entering this channel are sent to the Harmonizer effect
in the Vocal/Guitar Processor Board (if installed).
Velocity Input Use this parameter to set a fixed velocity (dynamics) value for all MIDI notes entering. This is useful when playing the Pa80 with an organ or a MIDI Accordion. Normal Normal velocity values are received. 40…127 All received velocity values are converted to the selected value.
The Korg has many controllable options. As a simple first step to get going first set the Chord 1 channel to the same channel as your YRG. The dafault for the YRG is MIDI channel 1.