Is it possible to output different audio to HDMI and built-in speaker simultaneously?

After I connected my Macbook Pro to an HDTV with HDMI cord, I can choose to output audio to either the HDMI port or the built-in speaker. And I know that it it possible to create a "congregate" audio device so that the same audio can be outputted to both the HDMI port and the built-in speaker.

I would like to know if it is possible to output different audio to the HDMI port and the built-in speaker simultaneously? i.e. Play a movie on the HDTV and play its sound from there, but for everything else play the sound from the built-in speaker.

Thank you.

Hardware: MacBook Pro (Retina, 15-inch, Mid 2015)
OS: OS X El Capitan


You could try using AirFoil. I use it on my Mac to send audio out from a specific application to multiple sources (which can include the internal speaker as well as any external audio output device).

My use case though is to allow Spotify to send its audio out to my AirPlay speaker while allowing the internal speakers to still play only system notification sounds.

Check it out here: https://rogueamoeba.com/airfoil/mac/

(note I do not work for AirFoil, just an awesome product).