how to setup jack sound server for any music program ?
There are admittedly few tutorials on this topic. A point to start with is
- JackAudio FAQ
- Jack Documentation
- Ubuntu Help - Jack How To (maybe outdated)
- Ubuntu Help - Ubuntu Studio
- Using Jack audio and getting audio to play though headphones
- How can I use Jack for all my system sounds?
- Playing a MIDI keyboard without JACK / how to use JACK and PulseAudio/ALSA
- Arch Wiki: Pulseaudio and Jack
- PulseAudio Documentation
You may also find installing the ubuntustudio-audio package helpful.
Two very useful programs that can help you immensely are qJackctl and Patchage.
With qJackctl you have a graphical medium to configure advanced sound settings. With Patchage you have a graphical representation of your sound system and can easily route any output to any input (so long as it's supported).
This is extremely technical but Markbuntu has an excellent solutions guide on the ubuntuforums:
Good starting point also is LinuxMusicians. There you will find a many useful informations.