In this chapter, we will discuss some of the math used in musical operations. If you just cringed when I said the m word, have no fear. We’ll be looking at the math behind musical things you already know how to do like transposing music by some interval and adding chord tones to a root note. We will also look at some of the things that will help make your program look better and more accessible to users. By the end of this chapter, you will have made a program that harmonizes MIDI notes. Let’s build a MIDI synthesizer. You remember how to do this. Create a new patch and 1. Create a new object called notein 2. Create 2 number boxes 3. Connect the first 2 outlets of notein to both number boxes 4. Create a new object called noteout 5. Connect the first outlet of each number box to the first 2 inlets of noteout Done! This is just about as simple as it gets for building a MIDI synthesizer. In fact, you don’t even really need the number boxes; they’re just displaying the pitch and velocity data as they come in. However, for now, we’ll leave the number boxes in to ensure that data are fl owing properly. Remember that if you forget which outlet connects to which inlet, you can hold your mouse over an inlet or an outlet to reveal a small window displaying the type of data that is being received or sent. 6. Create a new object called kslider Kslider is graphical object that resembles a keyboard. It has two inlets that receive pitch and velocity, respectively. 7. Create 2 number boxes beneath kslider’s 2 outlets 8. Connect the outlets of kslider to the inlet of each number box, respectively In a moment, we will integrate the kslider into the existing objects in our patch. For now, let’s 9. Lock the patch and click on kslider’s keys Note that each key on kslider’s graphical keyboard sends the corresponding MIDI pitch out its left outlet.