Choose your subject. Be as precise as possible. The more defined your subject, the more likely your book will appeal to a specific readership.
Do your research. You'll need to refine your knowledge, even if you're relying primarily on your own expertise. A textbook must be authoritative. A misstatement of fact compromises your authority and sabotages the project.
Organize your materials. Compose on outline that determines the order and structure of your book. You might find it helpful to use a published textbook similar to yours as a template.
Write. Sit down at your computer, fire up your word processor, and put your ideas into words. You will undoubtedly require musical examples, so make sure you have a decent music notation program. If photos are required, you'll also need a photo editing program. Acquiring a basic proficiency with these programs and learning to integrate them with one another will make your job much easier.
Lay out the finished manuscript. The better your book looks, the more it will appeal to readers. If you have the resources to hire a graphic designer, do it. In publishing, beauty is more than skin deep.
Choose the method of publishing. You can distribute the book yourself as an e-book by converting the finished manuscript to a PDF file and placing it on your website for download. You can also print the manuscript and submit it to traditional publishers, or you can use an online print-on-demand service. The latter can also distribute your book online. Some will even place it in brick-and-mortar stores.