This lab introduces the MIDI Pan Control message. Pan, stereo pan, or panorama, refers to the placement of sound from far left or far right as you face the source. For example when you're facing an orchestra the violins are usually on the left, the violas are in the center, and the cellos are on the right.
MIDI Control Message 10 adjusts the left/right placement of sound.
Controller Name | status | data1 | data2 | Notes |
Control number | Control value | |||
Stereo Pan | $Bn | 10 | 0-127 | 0 is far left 64 is center 127 is far right |
Copy the data from the 03Lab1 and paste it into 03Lab7 at cell A1. Sort the data in cells A2:D59 to separate the NON from the NOF messages.
Copy the NON data, cells A2:D30. Paste into cell A61. Use A61:D89 to create the MIDI Control Pan (10) messages.
You want the song to start panned hard left and end panned hard right. Follow the same procedure you used for 03Lab5 to create the Volume Control messages
Change all Status bytes B61:B89 to $B0. All control status bytes begin with B followed by the channel number.
Change all data1 bytes C61:C89 to 10. The data1 byte is the type of control message, Pan = 10.
Assign these values to these variables
The increment value formula is:
(endPan - startPan) / numCells
Calculate it in an empty cell.
= 4.53571429
Copy the result 4.53571429.
Type 0 (zero) into D61. Select D61 and Choose Fill->Series from the Edit menu. Paste 4.53571429 into the Step value. Use the Fill Series command to create the series.
Use the ROUND function to convert to integer values. Enter this formula into cell F62, =ROUND(D62,0)
Copy E62 and paste the formula into E63:E89. The results should look like this.
Copy E62:E89. Paste Special by Values into D62.
Select A1:D89. Choose these settings and click OK.
Paste the Excel data into MIDIDisplay and click the Play button. Adjust the tempo as desired. You should hear the scale start left, move to center as it reaches the highest note, and move to the right as it descends. It will be more noticeable listening through headphones.
This effect will bounces the sound from left to right on each note. Copy the data in cells A1:D88. Paste into Cell A91. Label Cell A90 as "Ping Pong Stereo"
Select A91:D178. Sort the data to separate the B0's.
The B0's should now be in cells B150:B178. Enter 0 into cell D150, enter 127 into cell D151. Copy both cells, D150:D151.
Select cells D152:D178 and paste. The result should be:
Sort the data in cells A91:D178 back into MIDIDisplay format.
Insert a new row above A92. Enter the Reset All Controllers message as the first MIDI message.
Enter the Reset All Controllers message as the last MIDI message. Use a time stamp of the last NOF + 1000.
Paste the data from cells A91:D180 into MIDIDisplay and click the Play button. Adjust the tempo as desired. You should hear the scale notes bounce between left and right. It will be more noticeable listening through headphones.
Revised John Ellinger, January - September 2013