If you want to continue listening to music without leaving your Mac notebook computer open, you'll need to change your MacBook close-lid settings. You may also want to keep your laptop going while closed if you're downloading an app that will take a while. But unless you've tweaked your Mac, you'll likely find that the display goes to sleep when you close your laptop. Fixing this is simply a matter of downloading an app and choosing a setting from the drop-down menu. Also known as the closed clamshell MacBook mode, this will allow you to continue listening to music or downloading apps with your laptop closed, as long as you get things going before you close the lid.
Use Laptop in Closed Mode
To put your laptop into closed clamshell MacBook mode, you'll need to first make sure you're plugged into a power outlet and have the external devices you want to use already plugged in. You'll then be able to use your laptop as you normally would. However, you'll likely notice that your screen goes dark when you do that. If you want it to stay active, you'll need to adjust your MacBook close-lid settings.
Change Mac Close-Lid Settings
Unfortunately, Apple won't let you change the MacBook close-lid settings. However, you can put your MacBook in closed clamshell MacBook mode using an app. InsomniaX is a free app that resides on your menu bar. When you're ready to hook up to a display, just click on the icon, which looks like a moon with a halo, and choose "Disable Lid Sleep" from the drop-down menu. If you're closing your laptop to listen to music, make sure you start up your app before you do this.
Keeping a Closed Laptop Cool
One reason the MacBook close-lid settings default to hibernate is that keeping it awake while closed could cause it to overheat. If your MacBook overheats, it could shut down as a protective measure, but in general, it simply isn't good for the sensitive parts inside. For that reason, before changing your Mac close-lid settings, consider whether there might be another way to listen to your music, such as streaming it through your phone. There are measures you can take to keep your laptop cool, including using a cooling pad and keeping the room itself cool. Primarily, though, you should keep an eye on your laptop, touching it every now and then to make sure it isn't running warmer than usual.