FAST FIND FUNDAMENTAL METHOD

Abstract: The present invention contains three methods for quickly deducing the fundamental frequency of a complex wave form or signal. One method uses the relationships between and among the frequencies of higher harmonics including ratios of frequencies, differences between frequencies, ratios of frequency differences, and relationships stemming from the fact that harmonic frequencies are modeled by functions of an integer variable whose values represent harmonic ranking numbers. Another method depicts the predicted/modeled relationships of the harmonics of selected frequency registers on logarithmic scales, records the frequencies of detected partials on like scales, and moves the scales with respect to each other searching for a match of three harmonics. When such a match is found, possible harmonic ranking numbers and the implied fundamental frequency can be extracted directly. When the detected partials match more that one set of predicted/modeled harmonic relationships, algorithms of the first method are used to select the deduced fundamental. By still another method, harmonic frequencies for a plurality of fundamentals are amassed and organized so that partials linked to an unknown fundamental can be compared with them and the unknown fundamental deduced.

Description: FAST FIND FUNDAMENTAL METHOD CROSS-REFERENCE This application is related to and claims the benefit of Provisional Patent Application Serial No. 60/106,150 filed October 29, 1998 which is incorporated herein by reference. BACKGROUND AND SUMMARY OF THE INVENTION This invention relates to electronic music production and reproduction and to methods for modifying electronic analogs of sound during the process of amplifying and enhancing the signals generated by a note, and in general to systems having the objective of quickly determining the fundamental frequency of a compound wave which is the sum of multiple frequencies. There is an irreducible minimum limit to the length of time required to measure the frequency of a sine wave signal to a specified pitch accuracy (e.g., to ' of a semitone) . That minimum time is inversely proportional to the frequency of the signal being processed. Keeping pitch accuracy constant, the minimum amount of time required to measure the frequency of a pure sine wave of 82.4 Hz would be eight times longer than the minimum time required to measure the frequency of a pure sine wave of 659.2 Hz. Accordingly, the lag time for measuring and reproducing the fundamental frequencies of low bass notes which are produced by instruments not incorporating keyboards (or other means of revealing the fundamental frequency as a note is sounded) is problematic. For example, when the signals from low bass notes are processed by synthesizers before they are amplified and reproduced, an annoying lag time commonly results. Throughout this patent, a partial or partial frequency is defined as a definitive energetic frequency band, and harmonics or harmonic frequencies are defined as partials which are generated in accordance with a phenomenon based on an integer relationship such as the division of a mechanical object, e.g., a string, or of an air column, by an integral number of nodes. The relationships between and among the harmonic frequencies generated by many classes of oscillating/vibrating devices, including musical instruments, can be modeled by a function G(n) such that f n = f. x G(n) where f n is the frequency of the n th harmonic, f is the fundamental frequency, known as the 1st harmonic, and n is a positive integer which represents the harmonic ranking number. Known examples of such functions are: f n = f, x n; and, f n = -- ! x n x[l + (n 2 - 1) β] κ . Where β is a constant, typically .004. A body of knowledge and theory exists regarding the nature and harmonic content of complex wave forms and the relationships between and among the harmonic partials produced both by vibrating objects and by electrical/electronic analogs of such objects. Examples of texts which contribute to this body of knowledge are 1) The Physics of Musical Instruments by Fletcher and Rossing, 2) Tuning, Timbre, Spectrum, Scale by Sethares, and 3) Digital Processing of Speech Signals by Rabiner and Schafer. Also included are knowledge and theory concerning various ways to measure/determine frequency, such as fixed and variable band-pass and band-stop filters, oscillators, resonators, fast Fourier transforms, etc. An overview of this body of knowledge is contained in the Encyclopedia Britannica. Examples of recent patents which specifically address ways to measure a fundamental frequency are: U.S. Patent 5,780,759 to Szalay describes a pitch recognition method that uses the interval between zero crossings of a signal as a measure of the period length of the signal . The magnitude of the gradient at the zero crossings is used to select the zero crossings to be evaluated. U.S. Patent 5,774,836 to Bartkowiak et al . shows an improved vocoder system for estimating pitch in a speech wave form. The method first performs a correlation calculation, then generates an estimate of the fundamental frequency. It then performs error checking to disregard "erroneous" pitch estimates. In the process, it searches for higher harmonics of the estimated fundamental frequency. U.S. Patent 4,429,609 to Warrander shows a device and method which performs an A to D conversion, removes frequency bands outside the area of interest, and performs analysis using zero crossing time data to determine the fundamental. It delays a reference signal by successive amounts corresponding to intervals between zero crossings, and correlates the delayed signal with the reference signal to determine the fundamental . The present invention is a method to quickly deduce the fundamental frequency of a complex wave form or signal by using the relationships between and among the frequencies of higher harmonics. The method includes selecting at least two candidate frequencies in the signal. Next, it is determined if the candidate frequencies are a group of legitimate harmonic frequencies having a harmonic relationship. Finally, the fundamental frequency is deduced from the legitimate frequencies. In one method, relationships between and among detected partial frequencies are compared to comparable relationships that would prevail if all members were legitimate harmonic frequencies. The relationships compared include frequency ratios, differences in frequencies, ratios of those differences, and unique relationships which result from the fact that harmonic frequencies are modeled by a function of a variable which assumes only positive integer values. That integer value is known as the harmonic ranking number. Preferably, the function of an integer variable is f n = f λ x n x (S) l09 2 n where S is a constant and typically, 1 < S < 1.003 and n is the harmonic ranking number. The value of S, hereafter called the sharping constant, determines the degree to which harmonics become progressively sharper as the value of n increases. Other relationships which must hold if the candidate partial frequencies are legitimate harmonics stem from the physical characteristics of the vibrating/oscillating object or instrument that is the source of the signal, i.e., the highest and lowest fundamental frequencies it can produce and the highest harmonic frequency it can produce. Another method for determining legitimate harmonic frequencies and deducing a fundamental frequency includes comparing the group of candidate frequencies to a fundamental frequency and its harmonics to find an acceptable match. One method creates a harmonic multiplier scale on which the values of G(n) are recorded. Those values are the fundamental frequency multipliers for each value of n, i.e., for each harmonic ranking number. Next a like scale is created where the values of candidate partial frequencies can be recorded. After a group of candidate partial frequencies have been detected and recorded on the candidate scale, the two scales are compared, i.e., they are moved with respect to each other to locate acceptable matches of groups of candidate frequencies with groups of harmonic multipliers. Preferably the scales are logarithmic. When a good match is found, then a possible set of ranking numbers for the group of candidate frequencies is determined (or can be read off directly) from the harmonic ranking number scale. Likewise the implied fundamental frequency associated with the group of legitimate partial candidate frequencies can be read off directly. It is the frequency in the candidate frequency scale which corresponds to (lines up with) the "1" on the harmonic multiplier scale. If the function G(n) is different for different frequency registers so that the harmonics in one frequency register are related in ways that are different from the ways they are related in other frequency registers, then different harmonic multiplier scales are generated, one for each of the different frequency registers. Partial frequencies are recorded on the scale appropriate for the frequency register in which they fall and are compared with the harmonic multiplier scale which corresponds to that frequency register. In another matching method, the candidate frequencies are compared to a plurality of detected measured harmonic frequencies stemming from a plurality of fundamental frequencies. The detected and measured harmonic frequencies are preferably organized into an array where the columns are the harmonic ranking numbers and the rows are the harmonic frequencies organized in fundamental frequency order. When three or more detected partials align sufficiently close to three measured harmonic frequencies in a row of the array, the harmonic ranking numbers and the fundamental are known. Since the frequencies of the higher harmonics normally can be determined more quickly than the fundamental frequency, and since the calculations to deduce the fundamental frequency can be performed in a very short time, the fundamental frequencies of low bass notes can be deduced well before they can be measured. Other advantages and novel features of the present invention will become apparent from the following detailed description of the invention when considered in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of a method of deducing the fundamental frequency according to the present invention. Figure 2 is a block diagram of a specific implementation of the method of Figure 1. Figure 3 illustrates a logarithmic scale whereon harmonic multipliers are displayed for Harmonics 1 through 17 and a corresponding logarithmic scale whereon the frequencies of four detected partials are displayed. Figure 4 is an enlargement of a selected portion of the Figure 3 scales after those scales are moved relative to each other to find a good match of three candidate frequencies with harmonic multipliers. Figure 5 is an enlargement of a narrow frequency band of Figure 4 showing how matching bits can be used as a measure of degree of match. Figure 6 is a block diagram of a system implementing the method of Figures 1-4. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to deduce the fundamental frequency, f l r from higher harmonics, anomalous frequencies must be screened out and the harmonic ranking numbers of at least one legitimate harmonic group must be determined. Alternatively, the number of unoccupied harmonic positions (missing harmonics) bracketed by two legitimate harmonics must be determined. The general method, illustrated in Figure 1, selects candidate frequencies. Next, it determines if the candidate frequencies are legitimate harmonic frequencies having the same underlying fundamental frequency. Finally, the fundamental frequency is deduced from the legitimate frequencies. Definitions and Notation The following definitions and notation will be used throughout this patent: f H , f M , f L : The candidate frequencies of a trio of partials, organized in descending frequency order. R H , R M , R L : The ranking numbers associated with f H , F L : The lowest fundamental frequency, f λ , which can be produced by the source of the signal . F H : The highest fundamental frequency, f l f which can be produced by the source of the signal . F,^: Highest harmonic frequency which can be produced by the source of the signal. Relationships and Limiting Conditions The method uses relationships between and among higher harmonics, the conditions which limit choices, the relationships the higher harmonics have with the fundamental, and the range of possible fundamental frequencies. Examples are: If f R = f[ x G(R Z ) models the frequency of the R z th harmonic, and If f H , f M and f L are legitimate harmonic frequencies, and If R H , R M and R L are the ranking numbers associated with f H , f M f L , then the following ratio relationships must hold: a) Ratios of detected candidate frequencies must be approximately equal to ratios obtained by substituting their ranking numbers in the model of harmonics , i.e., λ M • L L ^R M • X R L b) The ratios of differences between detected candidate frequencies must be consistent with ratios of differences of modeled frequencies, i.e., < H - f M ) ÷ (fM- f L ) = (f RH -f RM )÷(f RM - fR L ) c) The candidate frequency partials f H , f M , f L , which are candidate harmonics, must be in the range of frequencies which can be produced by the source or the instrument . d) The harmonic ranking numbers R H , R M , R L must not imply a fundamental frequency which is below F L or above F H , the range of fundamental frequencies which can be produced by the source or instrument . e) When matching integer variable ratios to obtain possible trios of ranking numbers, the integer R M in the integer ratio R H / R M must be the same as the integer R M in the integer ratio R M / R L , for example. This relationship is used to join Ranking Number pairs {R H , R M }and {R M , R L }into possible trios {R H , R M , R L }. Summary of Methods The methods analyze a group of partials or candidate frequencies and ascertain whether or not they include anomalous frequencies. Preferably each group analyzed will contain three partials. If the presence of one or more anomalous frequencies is not determined, the group is considered to be a group of legitimate harmonic frequencies. The ranking number of each harmonic frequency is determined, and the fundamental frequency is deduced. When the presence of one or more anomalous frequencies is determined, a new partial or candidate frequency is detected, measured and selected and anomalous frequencies are isolated and screened out. This process continues until a group of legitimate harmonics frequencies remain. In the process, the ranking numbers of legitimate harmonic frequencies are determined and verified. The fundamental frequency is then computed by a variety of methods. Adjustments are made considering the degree to which harmonics vary from Method I The following is an example of a method implementing the compact flow chart of the method of Figure 1 to deduce the fundamental frequency and is illustrated in Figure 2. The method tests a trio of detected candidate partial frequencies to determine whether its members consist only of legitimate harmonic frequencies of the same fundamental frequency. When that is not true, additional candidate frequencies are inducted and substituted for ones in the trio at hand until a trio of legitimate harmonics has been found. When such a trio is found, the ranking numbers associated with each member are determined and the fundamental frequency is deduced. The method as described herein illustrates the kinds of logical operations that will be accomplished either directly or indirectly. The actual implementation will incorporate shortcuts, eliminate redundancies, etc., and may differ in other ways from the implementation described below. The method is presented as a set of steps described in general terms and in parallel a numerical example illustrates the required calculations for various steps . Definitions of Instrument Constants K x is the highest harmonic ranking number which will be assigned/considered. The value of K λ is set by comparing the expected % error in the measurement of the frequency of the K x th harmonic with the value of the quotient of the integer ratio [(K- + 1) ÷ K ÷ [K- ÷ (K x - 1)] A default value for K x will be set equal to 17 and will be revised to conform to knowledge of the instrument at hand and the expected error in frequency measurements . K 2 is the maximum expected number of missing harmonics between two adjacent detected harmonic frequencies. The default value of K 2 is set equal to 8. K 3 is equal to the expected maximum sum of the missing harmonics between two harmonics containing one intervening or intermediate harmonic, plus 1. The default value for K 3 is set equal to 12. Step 1. Set constants/parameters for the instrument or signal source. Example: F H = 300 Hz, F L = 30 Hz, F mx = 2,100 Hz; K x = 17, K 2 = 8, K 3 = 12 For simplicity and brevity, the function describing the relationship between and among harmonic frequencies G(n) is assumed to be f 1 x n. Step 2. Detect, measure and select the frequencies of three partials, for example. The frequencies are detected and measured in the order in which they occur. Three frequencies or partials, having an energy level significantly above the ambient noise level for example, are selected as candidates of possible legitimate harmonics. Higher frequencies, and consequently higher order harmonic frequencies, naturally are detected and measured first. The following example assumes an exception where a lower harmonic is detected before a higher one, and illustrates how that exception would be processed. Example: 1 st frequency measured = 722 Hz, 2 nd frequency measured = 849 Hz, 3 rd frequency measured = 650 Hz. Step 3. The three candidate frequencies are arranged in order of frequency and labeled f H , f M , f L - Example: f H = 849 Hz, f M = 722 Hz, f L = 650 Hz Step 4. Possible trios of ranking numbers are determined for the candidate frequencies f H , f M , f L . The quotients of the ratios f H /f M and f M /f L are compared to the quotients of integer ratios I a /I b , where I a and I b are both < K x , a given threshold. Here K 2 is set equal to 17 for illustrative purposes. When the quotient of a frequency ratio is sufficiently close to the quotient of an integer ratio, that integer ratio is retained as one representing a pair of possible ranking numbers for the frequency ratio it matches. The ratios may also be f H /f L an< M /f or £H/ £M anc ^ H /f or an Y ° tne inverses. Example: For f H /f M = 1.176, the closest integer ratio quotients are 1.1818 = 13/11 and 1.1667 = 7/6 or 14/12. Note that 26/22 is not considered because 26 > 17. For f M /f L = 1.111, the closest integer ratio quotients are 1.111 = 10/9 and 1.10 = 11/10. When the common frequency of the two ratios are equal, then a possible trio of ranking numbers {R H , R M , R L } is formed. In this example, it is when the denominator of the integer fraction f H /f M i s equal to the numerator of the integer fraction f M /f L . Example: Since only f H /f M = 13/11 and f M /f L = 11/10 lead to the same ranking number for f M , the only possible trio in this example is {R H , R M , R L }= {13, 11, 10 }. Step 5. All possible trios of ranking numbers are eliminated which imply a fundamental frequency f x outside the range defined by F L and F H . Example: The fundamental l is the candidate frequency divided by its ranking number. The only possible trio, {13, 11, 10} , is not screened out because f H /13 = 65.308, f M /ll = 65.636, and f L /l0 = 65.00 are all within the range defined by F L = 30 and F H = 300 Step 6. The differences D HM = f H - f M and D M _ L = f H - f L are calculated and the ratio D H M /D M L is computed. Other difference ratios which could have been similarly used are D HL /D MIj or D HL /D HM . Example: D HιM = 849-722=127, D KL = 722-650 = 72, and D HιM /D MιL = 127 / 72 = 1.764. Step 7. The quotient of the difference ratio D H,M / D M#L i s compared to the quotients of small integer ratios I c /I d where I c < K 2 , and I c + I d < K 3 . Note: Throughout the example, the value of K 2 = 8 and K 3 = 12. K 2 = 8 corresponds to the assumption that f H and f M differ by no more than 7 times the fundamental frequency, or the harmonic ranking numbers R H and R M differ by no more than 7. Likewise, K 3 = 12 assumes that f H and f L will differ by no more than 11 times the fundamental frequency and the ranking numbers R H and R L differ by no more than 11. A cursory review of field data confirms these assumptions. If the other difference ratios are used, the values of K 2 and K 3 are appropriately set using the same analysis. Example: D HM / D HL = 1.764 ~ 1.75 = 7/4. This ratio at first qualifies for consideration because 7 < 8 and 7 + 4 < 12. Step 8. Any difference ratio which implies a fundamental frequency f r < F L is disqualified. Example: Here the difference ratio 7/4 implies that the difference between the highest frequency f H = 849 Hz and the lowest frequency f L = 650 Hz which equals 198 Hz, should be approximately equal to (7+4) or 11 times the fundamental frequency. Thus, the implication is that f l = 199/11 = 18.1, which is less than F L = 30. The same is true for D H;M /I C and D ML /I d . This alone implies that one or more anomalous frequencies exist. Step 9 will show that still another comparison implies anomalous frequencies are in this trio of candidate frequencies. Step 9. Any trio of ranking numbers R H , R M , R L is disqualified if the integer ratio I c /I d which matches the frequency difference ratio is inconsistent with the corresponding ranking number ratios (R H -R M ) ÷ (R M -R j . Example: The only possible ranking number trio was {13, 11, 10 } . It is screened out because 7/4 ≠ (13 - 11) ÷ (11 - 10) = 2. Step 10. a) If there are unresolvable inconsistencies, go to Step 11. Example: The first time through, before a new frequency is selected and anomalous frequencies are eliminated, there were unresolvable inconsistencies. All possible ranking number trios were screened out, and the difference ratio led to an inconsistency, b) If there are no unresolvable inconsistencies, and a consistent trio has therefore been found to be legitimate, go to Step 17 to deduce the fundamental frequency. Example: In this case, after a new frequency has been inducted and the 2 nd frequency in the original trio has been replaced, no unresolvable inconsistencies are found as shown below. Step 11. Have all the frequencies that have been measured and detected been selected? If no, go to Step 12, if yes, go to Step 16. Steps 12-14. To find a trio of candidate frequencies, the original three candidate frequencies are used with one or more additional candidate frequencies to determine a legitimate trio. If it is the first time through the process for a trio, proceed to Step 13 to select a fourth candidate frequency and on to Step 14 to replace one of the frequencies in the trio. The determination of a legitimate trio consisting of the fourth candidate frequency and two of the original trio of candidate frequencies is conducted beginning at Step 3. If the first substitution of the fourth candidate frequency does not produce a legitimate trio, Step 12 proceeds directly to Step 14. A second original candidate frequency is replaced by the fourth candidate to form a new trio. If this does not produce a legitimate trio, the fourth candidate will be substituted for a third original candidate frequency. If no legitimate or consistent trio has been found after substituting the fourth candidate frequency for each of the frequencies in the original trio, which is determined as the third pass through by Step 12, go to Step 15. Example: Since there are unresolvable inconsistencies in the original trio {849, 722, 650} , a new frequency is selected. The new frequency is 602 Hz. The value 849 is replaced by 602 to form the trio {722, 650, 602}which is designated as new candidate trio {f H , f M , f L } . For f H ,/f M , = 1.111, the closest integer ratios are 10/9, 11/10, and 9/8. For f M /f L = 1.0797, the closest integer ratios are 14/13, 13/12, and 15/14. There are no matching ranking numbers . Again, no consistent trio is found. A different frequency in the original trio is replaced, i.e., 722 is replaced by 602 and the original frequency 849 reinserted to form the trio {849, 650, 602}which is designated as new candidate trio {f H , f M , f L }. For f H /f M = 1.306, the closest integer ratios are 13/10, 17/13, and 14/11. For f M /f L = 1.0797, the closest integer ratios are 14/13, 13/12, and 15/14. £ n /£ tt ~ 17/13 and f M /f L ~ 13/12 form a possible ranking number trio which is {R H , R M , R L } = {17, 13, 12}. (f H - f M ) ÷ (f M - f L ) = 199/48 = 4.146 =4. (R H - R M )÷( R M - R L ) = 4/1 = 4, which is consistent with the frequency difference ratio. Also f H ÷ R H =49.94,f M ÷R M =50,f L ÷R L =50.17. All are greater than F L = 30. All conditions are met and therefore R H , R M , and R L are assumed to be 17, 13 and 12 respectively and the candidate frequencies 849, 650, 602 are considered a legitimate trio. The fundamental frequency is now determined at Step 17. Step 15. A fifth and sixth candidate frequencies are selected. The fourth frequency is combined with the fifth and sixth candidate frequencies to form a new beginning trio and the method will be executed starting with Step 3. Step 12 will be reset to zero pass throughs . Step 16: If after all frequencies detected and measured have been selected and determined by Step 11 and no consistent or legitimate trio has been found at Steps 7-10, the lowest of all the frequencies selected will be considered the fundamental . Step 17. Deduce the fundamental frequency by any one of the following methods for example wherein G(n) = n, f H = 849 Hz, f„ 650 Hz, f L 602 Hz, {R H , R M , R L } = {17, 13, 12}: a) f 1 = f„/R H b) 11 = fM / ^M d) x = <f H " f M ) ÷ (R H - R M ) Example: After a consistent legitimate trio of frequencies with associate ranking numbers is found to be {849, 650, 602} and {17, 13, 12}: a) 1 = 849/17 = 49.94 Hz b) f i 650/13 = 50.00 Hz c ) f _ 602/12 = 50.17 Hz d) i (849 - 650) - (17 - 13) = 49.75 Hz e ) f i (650 - 602) - (13 - 12) = 48.00 Hz f ) f i (849 - 602) - (17 - 12) = 49.4 Hz The deduced fundamental could be set equal to any of a variety of weighted averages of the six computed values . For example : The average value of f x , using the ratio method of computation, e.g., a) through c) above, = 50.04 Hz. The value of f lt considering that frequency difference method which spans the largest number of harmonics, as given by f) above, = 49.4. Averaging the values of f ± computed by the ratio methods and the difference method which spans the greatest number of harmonics gives (50.04+49.4)÷2=49.58. These three averaging methods should produce reasonable values for the deduced fundamental frequency. The last is preferred unless/until field data indicate a better averaging method. b) If the harmonics of the instrument at hand had been modeled by the function f n = f λ x n x (S) log 2 n , where S>1, a more precise method of deducing the fundamental would be as follows : a) fl = (f H ÷ s'° 82RH ) ÷ R H b) fl = (f H ÷S lθ8 Λ)÷R M c) f x = (f L ÷S lθ8 ^) ÷ R L d) f. = [(f H ÷ S ,oε 2 R H) -(f M ÷ s'° 82RM )] - (R„ - R M ) e) f x = [(f M ÷S log2RM ) -(f L ÷S 10 ^)] - (R - R L ) f ) f_ . = [ (f H ÷ S ,oε ^ H ) - (^ ÷ s^^ ) ] - (R H - R L ) If the sharping constant S had been set equal to 1.002, the deduced values of the fundamental would have been as follows: a) f. = 49.535 Hz. b) f x = 49.63 Hz. c) f 1 = 49.81 Hz. d) f 1 = 49.22 Hz. e) f τ = 47.51 Hz. f) f τ = 48.88 Hz. The average value of f l f using the ratio method of computation, e.g., a) through c) above, equals 49.66 Hz. The value of f 17 considering that frequency difference method which spans the largest number of harmonics as given by f) above, equals 48.88 Hz. Averaging the values of f 1 computed by the ratio method and the difference method which spans the greatest number of harmonics gives (49.66 +- 48.88) ÷ 2 = 49.27. Any of these three averaging methods may be used to deduce the fundamental . The last is preferred. If after Step 9 is completed, two or more consistent sets of ranking numbers remain, the fundamental f x should be recalculated with each set of ranking numbers and the lowest frequency obtained which is consistent with conditions described in Steps 3 through 9 is selected as the deduced fundamental frequency f x . The description and examples given previously assume harmonic frequencies are modeled by f n = f. x G(n) = f λ x n x (S) log 2 n where 1 < S < 1.003. The latter function, with S being this close to 1, implies that f n / f m will be approximately equal to the integer ratio n/m, that the ratio of the frequency differences (f H -f M ) ÷ (f M -f L ) will be approximately equal to a small integer ratio and In the general case, trios of legitimate harmonic partials are isolated and their corresponding ranking numbers are determined by a) Comparing the quotients of f H ÷ f M and f M ÷ f L to the quotients of ratios G(R H ) ÷ G(R M ) and G (R M ) ÷ G(R L ) respectively. b) Comparing the frequency difference ratios (f H - f M ) ÷ (f M - f L ) with function difference ratios [G (R H ) - G(R M )] ÷ [G(R M ) - G(R L )]. c) Comparing fundamental frequencies that are implied by possible combinations of ranking numbers to both the lowest fundamental frequency and the highest harmonic frequency that can be produced by the instrument at hand. Method II An aJternative method for isolating trios of detected partials which consist only of legitimate harmonic frequencies having the same underlying fundamental frequencies, for finding their associated ranking numbers, and for determining the fundamental frequency implied by each such trio is illustrated in Figures 3, 4 and 5. The method marks and tags detected partial frequencies on a logarithmic scale and matches the relationships between and among those partials to a like logarithmic scale which displays the relationships between and among predicted/modeled harmonic frequencies . Hereafter an example is used to clarify the general concepts. It illustrates a method that could be used to match or find a best fit of received signals to the signatures or patterns of harmonic frequencies and only illustrates the kinds of logical operations that would be used. The example should be considered as one possible incarnation and not considered as a limitation of the present invention. For purposes of this example it is assumed that the harmonics produced by the instrument at hand are modeled by the function f n = f x x n x (S) l09 2 n , where n is a positive integer 1, 2,..., 17, and S is a constant equal to 1.002. Based on that function, a Harmonic Multiplier Scale, hereafter called the HM Scale, is established where each gradient marker represents a cent which is 1/100 of a semitone or 1/1200 of an octave. The first mark on the scale represents the harmonic multiplier 1, i.e., the number which when multiplied by f x gives f x . Each successive mark on the scale represents the previous multiplier number itself multiplied by [2 x S] 1/1200 Assume that a string of bits is used each representing one cent. The n th bit will represent the multiplier [(2 x S) 1/1200 ] (n - 1} . Selected bits along the HM Scale will represent harmonic multipliers and will be tagged with the appropriate harmonic number: f j will be represented by bit 1, f 2 by bit 1200, f 3 by bit 1902, f 4 by bit 2400,..., f 17 by bit 4905. This scale is depicted in Figure 3. Another scale is established for marking and tagging candidate partial frequencies as they are detected. The starting gradient marker, represented by bit 1, will represent the frequency F L ; the next by F L x[(2x s) 1 ' 1200 ] 1 , the next by F L x [ (2 x S) 1/1200 ] 2 . The n th bit will represent F L x [ (2 x S) 1/1200 ] "- 1 . This scale is known as the Candidate Partial Frequency Scale and is hereafter called the CPF Scale. It is depicted along with the HM Scale in Figure 3. As partials are detected their frequencies are marked and tagged on the CPF Scale . When three have been so detected, marked and tagged, the CPF Scale is moved with respect to the HM Scale, searching for matches. If a match of the three candidate frequencies is not found anywhere along the scales, another partial frequency is detected, marked and tagged and the search for three that match continues. When members of a trio of candidate partials match a set of multipliers on the CPF Scale to within a specified limit, then the candidate frequencies are assumed to be legitimate harmonic frequencies, their ranking numbers matching the ranking numbers of their counterparts on the CPF Scale. Likewise, the implied fundamental can be deduced directly. It is the frequency position on the CPF matching the "1" on the HM Scale. Figure 4 shows the portion of the scales in which the detected candidate frequencies lie after the scales have been shifted to reveal a good alignment of three frequencies, i.e., the 4 th frequency detected, 421 Hz, combined with the 1st and 3 rd frequencies detected, 624 Hz and 467 Hz. One method for measuring the degree of alignment between a candidate partial and a harmonic multiplier is to expand the bits that mark candidate partial frequencies and harmonic multipliers into sets of multiple adjacent bits. In this example, on the HM Scale, 7 bits are turned on either side of each bit which marks a harmonic multiplier. Likewise, on the CPF Scale, 7 bits are turned on either side of each bit marking a candidate partial frequency. As the scales are moved with respect to each other, the number of matching bits provides a measure of the degree of alignment. When the number of matching bits in a trio of candidate frequencies exceed a threshold, e.g., 37 out of 45 bits, then the alignment of candidate partials is considered to be acceptable and the candidate frequencies are designated as a trio of legitimate harmonic frequencies. Figure 5 illustrates the degree of match, e.g., 12 out of a possible 15, between one candidate partial frequency, i.e., 624 Hz, and the multiplier for the 12 th harmonic. When an acceptable alignment or match is found, the implied ranking numbers are used to test for unresolvable inconsistencies using the logical Steps 6 through 9 of Method 1. If no unresolvable inconsistencies are found and the implied fundamental is lower then F L or higher than F H , then the scales are moved in search of alignments implying a higher fundamental or a lower fundamental respectively. When no unresolvable inconsistencies are found and the implied fundamental lies between F L and F H , then the implied fundamental f 1 becomes the deduced fundamental . Some classes of instruments/devices have resonance bands and/or registers which produce harmonics which are systematically sharper than those in other resonance bands and/or registers. Likewise, the harmonics of some instruments may be systematic and predictable in some frequency bands and not in others. In these cases, Method II can be used as follows: 1. Isolate the frequency bands where S is consistent throughout the band. 2. Build an HM Scale to be used only for the frequencies in that frequency band based on the S for that band. 3. Build other HM Scales for other frequency bands where different values of S apply. 4. When frequencies are detected, locate them in the CPF Scale which is constructed with the value of S appropriate for the band that contains that frequency. 5. Ignore detected frequencies which lie in frequency bands where the harmonics are not predictable. 6. Search for matches between harmonic multiplier patterns and detected candidate frequency patterns using like scales (same S value) . Method III Another method of deducing the fundamental frequency entails the detection and measurement or calculation of harmonic frequencies for a plurality of fundamental frequencies. The frequencies are organized in an array with fundamental frequencies being the rows and harmonic ranking numbers being the columns. When a note with unknown fundamental frequency is played, the frequencies of the higher harmonics, as they are detected, are compared row by row to the harmonic frequencies displayed in the array. A good match with three or more frequencies in the array or with frequencies interpolated from members of the array indicate a possible set of ranking numbers and a possible deduced fundamental frequency. When a trio of detected frequencies matches two or more trios of frequencies in the array, and thus two or more fundamental frequencies are implied, the deduced fundamental frequency is set equal to the lowest of the implied fundamental frequencies that is consistent with the notes that can be produced by the instrument at hand. The array is an example of only one method of organizing the frequencies for quick access and other methods may be used. Methods I, II and III above can be used to isolate and edit anomalous partials. For example, given a monophonic track of music, after all partials have been detected during a period of time when the deduced fundamental remains constant, these methods could be used to identify all partials which are not legitimate members of the set of harmonics generated by the given fundamental . That information could be used, for example, for a) editing extraneous sounds from the track of music; or b) for analyzing the anomalies to determine their source . Normally three or more legitimate harmonic frequencies will be required by either Method I, II, or III although in some special cases only two will suffice. In order to deduce the fundamental frequency from two high-order harmonics, the following conditions must prevail : a) It must be known that anomalous partial frequencies which do not represent legitimate harmonics are so rare that the possibility can be ignored; and b) The ratio of the two frequencies must be such that the ranking numbers of the two frequencies are uniquely established. For example, suppose the two frequencies are 434 Hz and 404 Hz. The quotient of the ratio of these frequencies lies between 14/13 and 15/14. If F L = 30 Hz, then the ranking numbers are uniquely established as 14 and 13, since brake 434 ÷ 15 = 28.9 which is less than 30 and thus disqualified. The difference of the two candidate frequencies is 30, which is acceptable since it is not less than F L . Also, the ratio (F H -F L ) ÷ (R H -R L ) =30 which again is not less than F L . The function f n = f ± x n x (S) los 2 n is used to model harmonics which are progressively sharper as n increases. S is a sharping constant, typically set between 1 and 1.003 and n is a positive integer 1, 2, 3,..., T, where T is typically equal to 17. With this function, the value of S determines the extent of that sharping. The harmonics it models are consonant in the same way harmonics are consonant when f n = n x f x . I.e., if f n and f m are the n th and m th harmonics of a note, then f n/ f ra = f 2n/ f 2 = f 3n/ f 3m = — = f n/ f km where k is a positive integer. A system which implements the method is shown in Figure 6. A preprocessing stage receives or picks up the signal from the source. It may include a pickup for a string on a musical instrument. The preprocessing also conditions the signal . This may include normalizing the amplitude of the input signal, and frequency and/or frequency band limiting. Next a frequency detection stage isolates frequency bands with enough energy to be significantly above ambient noise and of appropriate definition. The fast find fundamental stage performs the analysis of the candidate frequencies and deduces the fundamental . The post processing stage uses information generated by the fast find fundamental stage to process the input signal. This could include amplification, modification and other signal manipulation processing. The present method has described using the relationship between harmonic frequencies to deduce the fundamental . The determination of harmonic relationship and their rank alone without deducing the fundamental also is of value. The fundamental frequency may not be present in the waveform. The higher harmonics may be used to find other harmonics without deducing the fundamental. Thus, post processing will use the identified harmonics present . Although the present invention has been described with respect to notes produced by singing voices or musical instruments, it may include other sources of a complex wave which has a fundamental frequency and higher harmonics. These could include a speaking voice, complex machinery or other mechanically vibrating elements, for example. Although the present invention has been described and illustrated in detail, it is to be clearly understood that the same is by way of illustration and example only, and is not to be taken by way of limitation. The spirit and scope of the present invention are to be limited only by the terms of the appended claims .

Claims: What is claimed: 1. A method of deducing a fundamental frequency from harmonics present in a signal, the method comprising: selecting at least two candidate frequencies in the signal; determining if the candidate frequencies are a group of legitimate harmonics frequencies having a harmonic relationship; and deducing the fundamental frequency from the legitimate frequencies. 2. A method according to Claim 1, wherein determining legitimate frequencies includes using one or more of ratio of the candidate frequencies, difference of the candidate frequencies and ratio of the candidate frequency with the difference. 3. A method according to Claim 2, including determining if the ratios are equal to a ratio of harmonic model f n = f x x G(n) where f λ is a fundamental frequency and n is a ranking number of the candidate frequency. 4. A method according to Claim 3, wherein G(n) = n x (S) log 2 n , where S is a constant. 5. A method according to Claim 3, wherein G(n) = n. 6. A method according to Claim 1, wherein determining legitimate frequencies includes determining if a ratio of the candidate frequencies is substantially equal to a ratio of acceptable harmonic ranking numbers . 7. A method according to Claim 1, wherein determining legitimate frequencies includes determining acceptable harmonic ranking numbers for the candidate frequencies. 8. A method according to Claim 7, wherein acceptable harmonic ranking numbers are determined as a function of the source of the signal. 9. A method according to Claim 1, including selecting three candidate frequencies in the signal and determining legitimate harmonic frequencies includes using one or more of ratios of the candidate frequencies, differences of the candidate frequencies, and ratio of differences of the candidate frequencies. 10. A method according to Claim 9, including determining three acceptable harmonic ranking numbers for the candidate frequencies from the ratios of the three candidate frequencies. 11. A method according to Claim 9, including determining ratios of integers which are substantially equal to the ratios of the candidate frequencies and determining harmonic ranking numbers for each candidate frequency from a match of a number from the integer ratios of one of the candidate frequency with the other two candidate frequencies . 12. The method according to Claim 9, including determining harmonic ranking numbers for the candidate frequencies; and determining if the difference ratio is equal to the ratio of the difference of the ranking numbers. 13. The method according to Claim 9, including determining a ratio of integers which are substantially equal to the difference ratio; and determining if the integers of the ratio are in a predetermined range. 14. A method according to Claim 13, including determining if the integers of the ratio are each below a first value and the sum of the integers is below a second value . 15. A method according to Claim 9 including selecting a fourth candidate frequency in the signal if the first three candidate signal are not determined to be group of legitimate frequencies and determining if the fourth candidate frequency and two of the first three candidate frequencies are a group of legitimate frequencies having a harmonic relationship . 16. A method according to Claim 1 wherein determining legitimate frequencies includes comparing the candidate frequencies to a fundamental frequency and its higher harmonics to find at least one acceptable match. 17. A method according to Claim 16, wherein a harmonic scale is created for the harmonics, a candidate scale is created for the candidate frequencies, and the candidate scale and the harmonic scale are moved relative to each other to find at least one acceptable match. 18. A method according to Claim 17, wherein the candidate scale and the harmonic scale are logarithmic scales of the same base. 19. A method according to Claim 17 including creating a plurality of harmonic scales and corresponding candidate scale of different harmonic relationships . 20. A method according to Claim 16 including storing a plurality of groups of harmonic frequencies with their ranking numbers and comparing the candidate frequencies to the group of harmonic frequencies to determine at least one acceptable match. 21. A method according to Claim 1 wherein determining legitimate frequencies includes: creating a logarithmic harmonic scale for a group of harmonics; creating a logarithmic candidate scale, for the candidate frequencies of the same base at the harmonic scale; and moving the candidate scale and the harmonic scale relative to each other to find at least one acceptable match. 22. A method according to Claim 21, including determining the ranking number of the candidate frequencies from the match of the candidate scale to the harmonic scale, and using the ranking numbers to determine a group of legitimate frequencies. 23. A method according to Claim 1, including determining the ranking number of the legitimate frequencies; and wherein the fundamental frequency is deduced using one or more of the legitimate frequency being divided by its ranking number and differences of the legitimate frequencies being divided by differences of their ranking numbers. 24. A method according to Claim 23, wherein the fundamental frequency is deduced using a weighted average of the quotients. 25. A method according to Claim 23, wherein the fundamental frequency is deduced by dividing the legitimate frequencies by (S) log 2 n , where n is the ranking number and S is a constant . 26. A method of determining a fundamental frequency from harmonics present in a signal, the method comprising: selecting at least two candidate frequencies in the signal; and deducing the fundamental frequency from ratio, difference and harmonic ranking number of the candidate frequencies. 27. A method of determining a set of partial frequencies in a signal which are legitimate harmonic frequencies of a common fundamental frequency, the method comprising: selecting at least two candidate frequencies m the signal; comparing relationships of the candidate frequencies with corresponding modeled relationships of harmonic frequencies; determining a harmonic ranking number for each candidate frequency; and deducing the common fundamental frequency from the candidate frequencies and the ranking numbers. 28. A method according to Claim 27, wherein the modeled relationship is f n = f x x n x (S) log 2 n , where n is the ranking number, f 1 is a fundamental frequency and S is a constant. 29. A method of determining a set of partial frequencies m a signal which are legitimate harmonic frequencies of a common fundamental frequency, the method comprising: selecting at least two candidate frequencies m the signal; marking the candidate frequencies on a logarithmic candidate scale; and comparing the candidate frequencies on the logarithmic candidate scale to a logarithmic harmonic scale which includes a modeled harmonic relationship of harmonic frequencies to determine if the candidate frequencies are legitimate harmonic frequencies of a common fundamental frequency. 30. A method according to Claim 29, including determining harmonic ranking numbers for the candidate frequencies and the common fundamental frequency of the candidate frequencies from the comparison. 31. A method according to Claim 29, wherein the modeled relationship is f n = f 1 x n x (S) log 2 n , where n is the ranking number, f 1 is a fundamental frequency and S is a constant . 32. A method of determining a set of partial frequencies in a signal which are legitimate harmonic frequencies of a common fundamental frequency, the method comprising: selecting at least two candidate frequencies in the signal; comparing the candidate frequencies to a plurality of groups of harmonic frequencies to find acceptable matches; and selecting the lowest deduced fundamental frequency from the acceptable scale matches as the legitimate harmonic frequencies of a common fundamental frequency. 33. A method according to Claim 1, including storing the method as instructions in a digital signal processor.

Inventors: SMITH JACK W, SMITH, JACK, W.
Applicants: PAUL REED SMITH GUITARS LIMITE, PAUL REED SMITH GUITARS, LIMITED PARTNERSHIP
Application year: 1999
Main classification: G10H
IPC codes: G10H1, G10H3, G10H7, G10L11