| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package App::testyourears; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 1 |  |  | 1 |  | 14313 | use 5.006; | 
|  | 1 |  |  |  |  | 5 |  | 
| 5 | 1 |  |  | 1 |  | 5 | use strict; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 17 |  | 
| 6 | 1 |  |  | 1 |  | 7 | use warnings; | 
|  | 1 |  |  |  |  | 5 |  | 
|  | 1 |  |  |  |  | 47 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | =encoding UTF-8 | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | =head1 NAME | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | App::testyourears - A script to test the tone perception of your ears. | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | =head1 VERSION | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | Version 0.001 | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | =cut | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | $App::testyourears::VERSION=0.001; | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | $ testyourears | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | This is a script designed to test the accuracy of the tone | 
| 29 |  |  |  |  |  |  | discrimination of the users ears. Two tones are produced and the user | 
| 30 |  |  |  |  |  |  | must vary one of them until both match. The script repeatedly | 
| 31 |  |  |  |  |  |  | generates a tone with a randomly | 
| 32 |  |  |  |  |  |  | chosen unknown frequency and sends it through your earphones to one of your | 
| 33 |  |  |  |  |  |  | ears to be compared with a tone of a frequency under the user's | 
| 34 |  |  |  |  |  |  | control that is sent to his other ear. When the user believes the | 
| 35 |  |  |  |  |  |  | tones agree the test continues with a new random tone. The output of | 
| 36 |  |  |  |  |  |  | the program is a text file with the chosen frequencies and the | 
| 37 |  |  |  |  |  |  | discrepancies between both ears. The user can the plot the results with an | 
| 38 |  |  |  |  |  |  | external program or process them with whatever tool he choses. | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head1 INSTRUCTIONS | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | Test the accuracy of your ears. | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | Use your headphones/earphones. | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | Press the (Re)init button to initialize a random tone. | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | Choose a file to save the results. | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | Repeatedly, press the Reference and Current buttons while | 
| 51 |  |  |  |  |  |  | modifying the frequency knobs until you believe both tones | 
| 52 |  |  |  |  |  |  | match. You might want to set the volume for each channel. If the tone | 
| 53 |  |  |  |  |  |  | is inaudible (maybe due to a too high or low frequency), you can | 
| 54 |  |  |  |  |  |  | =change it by Reiniting. | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | After matching a tone, Reinit and repeat the process until you get | 
| 57 |  |  |  |  |  |  | tired, and then Stop. | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | You may Peek (but you shouldn't) to find out how | 
| 60 |  |  |  |  |  |  | you are doing. | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | The result is a text file with three columns of data: the target frequency, | 
| 63 |  |  |  |  |  |  | the matching frequency and the difference in semi-tones. After the | 
| 64 |  |  |  |  |  |  | test is concluded, this file may be processed with external | 
| 65 |  |  |  |  |  |  | tools. For example, the may be plotted with *gnuplot.* | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | =head1 AUTHOR | 
| 70 |  |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | W. Luis Mochán, Instituto de Ciencias Físicas, UNAM, México | 
| 72 |  |  |  |  |  |  | C | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | =head1 ACKNOWLEDGMENTS | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | This work was partially supported by DGAPA-UNAM under grants IN108413 | 
| 77 |  |  |  |  |  |  | and IN113016. | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | =cut | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | 1; |