Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design of a Guitar Tab Player in MATLAB Summary Lecture Module 1: Modeling a Guitar Signal.

Similar presentations


Presentation on theme: "Design of a Guitar Tab Player in MATLAB Summary Lecture Module 1: Modeling a Guitar Signal."— Presentation transcript:

1 Design of a Guitar Tab Player in MATLAB Summary Lecture Module 1: Modeling a Guitar Signal

2 What Was the Problem? To design and implement a guitar tab player Primarily for amateur guitar players Guitar tabs don’t always seem to represent the song Is the amateur player playing it wrong or is the guitar tab wrong? Research shows that there is not exactly such a device available (even if some are very close). If one existed, it could be worthwhile to try to make it better or less expensive.

3 How Does One Begin? First you need knowledge. In this case you need to learn more about guitar tabs and guitar sounds. However already two steps seem to appear: 1. How to generate the guitar sound automatically without playing the guitar (module 1) 2. How do you translate/enter the guitar tab information so the device can play the music (module 2)

4 How to Generate Guitar Signals? 1. Using a bunch of analog oscillators 2. Using the computer sound card (speaker output) and creating guitar string waveforms with a program 3. Converting guitar tabs to operate a programmable electronic keyboard 4. Making a robotic arm that could play the guitar Generally one starts by brainstorming some possible solutions and then starts eliminating some of them

5 Creating Sounds How does one create sounds using the computer? You need a program that can control the sound card (media player and.wav files) or use MATLAB and it sound.m function What goes into a.wav file? PCM, 8000Hz, 16bits mono, or other settings. This means direct samples (no compression algorithm), 8000 samples per second, 16 bits of precision per sample (65536 possible voltage levels), mono for one guitar signal. The sampling rate is therefore very important. You will need to learn more about how the sampling rate is chosen (an engineer should never guess the value!!!)

6 Sound Card in Windows

7 Sampling Good amount of samples Not enough samples Sampling Theorem: One must sample at least twice as fast as the highest frequency contained in the signal

8 Guitar String Theory StringFundamental Frequency Low E82 Hz A110 Hz D147 Hz g196 Hz b247 Hz High e330 Hz A 1, A 2, A 3, A 4, etc are NOT given by the theory

9 Checking with Measurements Difficult to describe (model) Cannot find A 1, A 2, A 3, A 4, etc from the time waveform. Cannot even tell if this is a sum of harmonic sine functions

10 Frequency Spectrum Single sinewave Sum of several sinewaves

11 Fast Fourier Transform

12 fundamental (82 Hertz) second harmonic (164 Hertz) third harmonic (246 Hertz) forth harmonic (328 Hertz) fifth harmonic (410 Hertz) f = 82 Hz, amplitude = 0.7251 f = 164 Hz, amplitude = 0.9789 f = 246 Hz, amplitude = 1.0000 f = 328 Hz, amplitude = 0.4764 Spectrum of Guitar Signal The values of A 1, A 2, A 3, A 4, etc, can be easily found but we can also check that the frequency spectrum is very consistent with the theory

13 Checking Model Against Measurements The model does not decay over time as the actual signal does. The model does “sound” close to the actual signal

14 Improvements Based on the Measurements Addition of a decay function:

15 Final Model A1A2A3A4A5A6A7A8A9A10 Low E0.39200.65261.00.98910.57230.02070.31770.01280.01060.0032 A0.25560.56451.00.80820.73040.50810.30030.12010.03570.0049 D0.45810.85000.80461.00.75950.50040.22610.12570.02980.0078 g0.38070.73260.91960.03940.64060.25080.15120.02450.00040.0029 b0.54651.00.93800.83250.54120.32900.10770.00130.00100.0009 High e0.60650.69781.00.76740.29790.00170.00050.00200.00080.0007 StringFundamental Frequency Low E82 Hz A110 Hz D147 Hz g196 Hz b247 Hz High e330 Hz Using measured A 1, A 2, A 3, A 4, etc for all 144 string/fret combination will not drastically improve the model but will add much more complexity.

16 Evaluation The model for the guitar string follows a logical method and everything seems to fit. When listening to the model and the actual signal, one cannot hear significant differences. However when running the guitar tab player, one feels that it sounds more like an electronic keyboard than a guitar These differences do not seem to be easy to characterize mathematically. Therefore, it will difficult to improve the model without significant effort and time.

17 Suitability for the Project The project is not about making the perfect synthesized guitar sound. The project needs a fairly good sound so that the amateur guitar player can recognize the melodies in the song, and in particular check to see if the guitar tab “sounds” strange or not. As a result the amateur player can decide to learn how to play the song with this guitar tab or not. In this case, the model seems adequate.

18 Importance to Society The project benefits society since a guitar tab player can be used by amateur guitar players to select the best guitar tab to use when learning how to play the guitar. This solution shows how with the current technology (computer sound card), one could use techniques that in the past were not practical such as the use of Fast Fourier Transform to advance our general scientific knowledge.


Download ppt "Design of a Guitar Tab Player in MATLAB Summary Lecture Module 1: Modeling a Guitar Signal."

Similar presentations


Ads by Google