Mathematical Equations for Music

This screen permits you to enter the coefficients for a polynomial, reciprocal, logarithmic or  trigonometric equation, and view the resultant graph on the screen. 

The easy way to use this screen is to try the demonstrations by clicking the buttons at the foot of the screen. These are designed to illustrate musical applications for the respective types of equation. When any of these demos is on the screen, click the blue  More Information button at top left, to read details about this particular equation and its application to music.

If you wish to be more adventurous, you can select a type of equation, and set its parameters, by using the panel at the top of the screen. You will also need to set the limits for the X and Y axes.

If you want the X and Y axes at bottom and left of the screen, respectively, so they both only show positive values, set Min x and Min y to zero. The drop down box for type of equation has 5 choices which are:- Polynomial, Square root of polynomial, Reciprocal, Logarithmic and Trigonometric. Once you have selected one of these, a new panel entitled Parameters will appear at top right of the screen, into which you need to type the coefficients for your equation. For example, for a Polynomial  or Square root of a polynomial   there are up to 4 parameters needed, named a, b, c and d.  These are the coefficients for a cubic polynomial of the form 
y = ax3 + bx2 + cx + d.  
If you only require a quadratic, simply leave coefficient a as zero.  If you want the equation for a straight line y = cx + d    set both a and b to zero.

When all parameters have been set, click the Draw Graph  button at top right.  There is a cross-hair facility which makes it easy to read off values from the axes.  To switch this on, tick the box labelled Turn moving cross-hair ON.  Then move the mouse onto your curve. After a small delay, a pair of green lines at right-angles to each other will appear, intersecting at your mouse location. You can move the mouse around the screen, and the cross-hair will follow.     If you want a more permanent pair of lines, hold down the left mouse button at your point of desired intersection. If you release the mouse, the lines will disappear, but if you move the mouse away then release it, the lines will remain on the screen.

To clear the current graphs off the screen, click the green button at top left Clear and reset chart.  If you change the limits of the coordinate axes, click this same green button to make the new limits take effect on the screen.  

The trigonometric sine or cosine curve is relevant to music, because it is the basis for the equation for a sound wave, and it generates the wavy pattern typical of musical notes. There is an animated diagram in the Simple Harmonic Motion screen, available from the menu at Theory -> Maths and Physics -> Simple Harmonic Motion.   Another illustration of the sine curve can be found in the screen on vibrating strings, available at   Theory ->Maths and Physics - Vibrating Strings and Pipes.

Select Trigonometric from the type of equation drop-down box, if you wish to try out a sine curve. Try setting a=40, b = 0.25  c=0   d=0, then click the button Draw Graph.   You should see a wavy curve, with an amplitude of 40 (equivalent to the loudness of the sound), and a wavelength of 4p.

If you want to draw a circle, select square root of polynomial from the type of equation drop-down box,   set a = 0, b= -1,  c=0,  d=900 (for a radius of 30 which is the square root of 900), and click the button Draw Graph  You should see a circle with its centre on the Cartesian origin, and its radius = 30.


Manual.htm     02 November 2006         MENU  Theory -> Maths and Physics -> Mathematical equations for music