top of page

Signal Processing

Guitar Tuner - Frequency Analysis

This project features the design and implementation of a guitar tuner application. This application was designed via the principle of frequency analysis of the played guitar string. When a guitar string vibrates, it produces a sinusoidal sound wave characterized by an amplitude and a frequency. This frequency value will be transformed into a “peak” in the frequency domain.

 

The principle behind this tuner is to find the frequency of the 1st fundamental peak and compare it to known guitar string frequencies. If the peak frequency is higher, the pitch of the string should be lower, on the other hand, if it’s lower, the pitch should be increased. The algorithm will calculate if this frequency is included in a given interval around each string frequency. This interval is usually a quarter-tone but this application also includes a semi-tone interval for larger tuning with the more commonly used quarter-tone used for greater accuracy tuning. These interval lengths are around 2,5 Hz (quarter-tone) or 4,5 Hz (semi-tone).

 

The main interface contains two main tuning characteristics. The first is a static tuning method, initiated by the "Plot" button, after a guitar string is played. The second is a dynamic tuning characteristic initiated by the "Start" button.

 

The static tuning characteristic (on the side), shows the frequency peak of the current tuning corresponding to the played guitar string. An analysis result is shown, comparing the played string and its deviation from the known frequency of the corresponding, tuned string. However, if the "Start" button is pressed, the dynamic tuning method takes place. A red rectangle is shifted along the scaled axis, limited according to the chosen interval of tuning (Quarter or Semi-tone). As the guitar string is tuned, the red rectangle will move closer to the green line in the center, corresponding to the correct pitch of the tested string. This slider thus indicates how the pitch should be adjusted to achieve the correct tuning. If the red rectangle is thus placed on the right, the frequency is too high and the pitch should be decreased. On the left side, thus indicates the frequency is too low and the pitch should be increased.

 

 

Image Processing Application

An area of research, currently undertaken within the railway and transport industry, is the possibility of using image processing techniques for detection of lateral skew of wheel and rail sets. Till now, investigation has been undertaken on the CTU roller rig. In this project, a high frequency camera is used to capture with an adjustable frame rate, the images produced by the motion of the CTU roller rig. The sequences of images produced by the high frequency camera, require image processing to detect the distance captured between the wheel flange and rail head of the roller rig assembly. Further to this it may also, provide the ability to monitor other conditions, such as wearing of the wheel flanges and rail heads as well as other abnormalities in the motion of the roller rig stand.

 

The first image on the side, depicts the main interface of the image processing application. The main frame in the side section of the application provides the user with the first measured image of the image sequence, produced by high frequency camera. Here the user may select the necessary points (in pixels) for definition of the lateral distance. In this case we are interested to know the distance between the wheel flange and rail head.

 

The following image, depicts the used method for detection of the wheel and rail distance. Here the matching template method was used to detect two points of definition within a sequence of images and be able to translate these templates into a lateral distance, within each of the produced frames. The module used for this method was OpenCV for python, for more information visit:

 

 

 

After the image processing algorithm is implemented a data file "d.txt" is generated with a list of all recorded values. A scaling function is incorporated to convert the calculated distances from pixels to millimeters as needed for real task implementation of the CTU roller rig.

 

 

Features of the Guitar Tuning Application

Guitar Tuning Application - Result of the Static Tuning

Guitar Tuning Application - Result of the Dynamic Tuning

Main Interface of the Image Processing Application

Python Image Processing - Matching Template Algorithm

Python Image Processing - Resulting Lateral Skew on CTU Roller Rig

bottom of page