how input midi instruments to the mixer

Device model mac mini m1 / ipad air
Version of operating system newest
Version of djay newest
Hardware/controllers used DDJ FLX 4:

Hi there,
I am pretty newby on this topic. try to work myself into a setup, which allows me to mix with two decks and at the same time integrate some midi synths or beat machine into the mix. what I got to happem is a mappimg of the audio output of my midi synth app into the FLX 4 controller but this is only putdirectly onto the master chanell. this way I can not cue the synth sound with headphones, before I introduce it to the mix and I cannot mix it in day pro. what kind of setup / hardware do I need to make this happen as simple as possible?
thany for your time
frank

hi on controllers like race one u can use the line input and switch one of ur decs to line u can also do this on the ddj 800