fig1 is a perspective view of an example of a music production system 10 with a user 12 holding a music module 14 connected to a computer 16 , and user 12 wearing a headset 18 including a microphone 20 and earphones 22 . user 12 is shown singing into microphone 20 and computer 16 is displaying a scene 23 with virtual band characters selected by the user . in this example , the virtual characters are playing instruments and accompanying user 12 as the user sings . audiovisual content such as scene 23 may be developed and displayed subsequent to the user recording the singing instead of simultaneously . fig2 is a block diagram of one example of components and configurations that may be used in music production system 10 . system 10 is shown with music module 14 , computer 16 and headset 18 , which headset includes microphone 20 and earphones 22 . computer 16 may include a processor 24 , input / output ( io ) 26 , memory 28 , a display 30 and digital signal processor ( dsp ) 32 . module 14 is operably connected to headset 18 . music module 14 is operably connected to computer 16 through io 26 . dsp 32 and memory 28 may instead or additionally be included in music module 14 . system 10 may create multiple versions of an input tune as tracks that play simultaneously or independently . in this example , music module 14 is a computer interface device with control inputs related to recording music , composing music , editing recorded music , and adding music effects and accompaniment . the music module may be connected to computer 16 or may be used in a standalone mode to record and play music . computer 16 may include software associated with music module 14 that provides user interfaces for recording and editing the music of user 12 . headset 18 with microphone 20 and earphone 22 connects to module 14 by cable or by a wireless connection . module 14 may be connected to io 26 of the computer by a usb cable or other wired or wireless connection . in some examples , module 14 may be used for substantially all the input and navigation functions for music and audiovisual production . correspondingly , io 26 may be a wireless interface or a wired interface . for example , io 26 may incorporate a wireless 802 . x connection , an infrared connection or another kind of wireless connection . computer 16 may be a laptop , a notebook , a personal data assistant , personal computer or other kind of processor based device . fig3 is a top view of music module 14 showing one configuration of inputs . music module 14 is shaped to resemble a guitar body . module 14 could be shaped to resemble other musical instruments such as a violin or a piano or have any other desired shape . fig3 shows a joystick 34 , a pad a 36 with 4 buttons , a pad b 38 with 5 buttons , a pad c 40 with 4 keys and a string input 42 . inputs may correlate to user interface objects displayed on computer 16 . joystick 34 and pad a 36 may control the movement of a cursor on the computer display and user interface . inputs of pad b 38 may be used to exit a user interface , control volume , select items and turn recording on and off . pad c 40 may access special effects or be used to select an instrument such as drums . the keys of pad c 40 may activate files for a kick drum , a first snare drum , a second snare drum , and a cymbal or other audio device . each input of music module 14 may have multiple uses and functions . one input may select specific functions of other inputs . inputs may include a select key , edit and undo keys , a pitch bend / distortion joystick , a volume control , controls for record , pause , play , next , previous and stop , drum kit keys , and sequencer keys . this configuration is an example and should not be construed as a limitation . other configurations of inputs and music modules may be used and fall within the scope of this specification . music production system 10 with music module 14 in a first recording and / or production mode records an acoustical signal musical input from a user . system 10 may process the recorded input signal to correct qualities such as pitch and tempo and may add special effects and accompaniment . system 10 may correct the pitch in real time and reproduce the signal so that even if a singer may be singing off key , the signal output is an on - key music signal from music system 10 . optionally , in a second mode , production system 10 may generate visual effects to accompany the composed music . system 10 may provide images of characters playing the accompanying music , a character representing the user , a band manager and / or a producer . using module 14 , user 12 may select and design a production and performance venue associated with the recorded music . system 10 may present the characters in a scene such as musicians playing the user &# 39 ; s music on stage in front of an audience . in the first composing mode , user 12 may input an acoustic music signal at microphone 20 . typically , user 12 hums or sings , but user 12 may play an instrument into microphone 20 . user 12 may input music to music module 14 through a connection to another music device . for clarity , only singing into a microphone will be described for musical input in the following examples . this is an example and should not be construed as a limitation . in this example , microphone 20 converts the acoustic signal to an analog electronic signal . the analog signal goes to a digital signal processor ( dsp ) 32 in module 14 or computer 16 . this signal is then sampled and digitized into a time series of values that represents the original acoustic signal . dsp 32 may be an ic configured to modify a digital signal or dsp 32 functionality may be implemented as a software application . dsp 32 , at least in part , and as described further below , functions to shift the tone or pitch of the digitized signal to correlate to the nearest reference frequency in a library of frequencies in memory 28 . dsp 32 further determines the start and end of a frequency and determines a note value to record music notation for the input tune . computer 16 or music module 14 records the corrected singing in memory 28 as an original corrected track . dsp 32 may convert the signal back to an analog signal and output the corrected singing track to earphones 22 or another acoustic signal generating device such as an amplifier and speakers . computer 16 and / or music module 14 may also record the original uncorrected input signal as a separate track . corrected signal , corrected music , corrected music track , or any variations of these terms , for the purposes of this disclosure mean recorded digital music that has been constructively altered in tone , tempo , pitch and / or other quality by system 10 . uncorrected signal , uncorrected music or uncorrected track , or any variation of these terms , for the purpose of this disclosure means recorded analog or digital music which has not been constructively altered in tone , pitch , tempo and / or other quality before being recorded by system 10 . computer 16 may include a software application that provides functionality and user interfaces to further compose , produce and develop the recorded and corrected music . user 12 may use music module 14 to navigate in the user interface of the music production software . user 12 may use inputs on module 14 to select editing or functions in production mode at a user interface displayed on computer 16 . the options , tools and functions available at the user interface may include pitch , distortion , cut and paste , volume settings , play , pause , fast forward , rewind , restart from beginning , etc . user 12 with module 14 may also include special effects for their recorded and corrected music such as reverb , echo , vibrato , tremolo , delay or 3d audio . the user may create additional tracks to play simultaneously with the original corrected music track . the user may create a harmony or accompanying voice track to accompany their corrected music track . system 10 may use the original corrected music track as the harmony by recording it as a second track with the frequency or pitch of the first track shifted . the harmony track is played simultaneously with the original corrected music track and may sound like a second person singing . user 12 may create one or more instrument tracks from a list of available instruments stored in memory 28 to accompany the first corrected music track . the list of instrument assets to choose from may include percussion , reed , strings , brass , synthesized and voice . the key of the instrument music tracks may be adjusted for accompanying instruments so that the output most closely matches the physical capabilities of the selected instrument . thus , a set of notes in a key appropriate for a flute would be selected , or those appropriate for a trumpet while playing the corrected music . the goal is to make the output sound with accompanying instruments realistic , without requiring manual input from the user . fig4 shows a flow chart for music production system 10 process 100 with process steps in the music recording mode . at step 110 , audio input is captured from the microphone . microphone 20 converts an acoustic signal to an analog electrical signal . the input signal must be digitized with a sample rate high enough to reproduce the music with adequate quality . for example , the audio signal may be captured at 25600 hz . every 4th sample may be used to build the analysis buffer which is equivalent to 128 samples every 20 milliseconds . this down - sampled buffer is then filtered using a 4 th order “ butterworth ” bandpass filter to remove frequencies below 50 hz and above 1000 hz . this output is saved in an analysis buffer and direct - monitor buffer . sampling the input analog signal may include measuring and recording amplitude values of the signal at a predetermined rate to produce a time series of values of the analog signal . a frame or buffer consists of a group of values of the digitized input signal over a defined time span . a defined time span might be 20 milliseconds . the digitized values shift through the frame as they are digitized . typically , each set of values defined by the frame are analyzed as described below . a single note may be composed of a hundred frames . a pitch detector at 112 takes the analysis buffer from the input and determines the fundamental frequency of the signal values in the buffer . the system may use an on the fly pitch estimation algorithm derived from the signal represented as a 2 dimensional time delay . the algorithm may use an autocorrelation or difference function . the algorithm compares time sequenced values in the buffer to a time delayed set of the same values to find repeated waveforms and signal frequencies . the time delays correspond to frequencies . the output from this stage is a fundamental frequency value for the frame . a note conditioner at 114 uses both the detected fundamental frequency from the pitch detector , and the analysis buffer from audio input step 110 to determine when notes begin and end . there are two parallel methods employed for this task . the first method is an input amplitude analysis . since no note can exist if the input is silent , the amplitude of the input establishes an absolute baseline for note on and off determination . if the amplitude of the analysis buffer is over a certain threshold and no note is currently playing , a new note is started . if the amplitude of the analysis buffer drops below a certain threshold , any currently playing note is ended . it is also important to detect steep rises and falls in the amplitude , independent of the overall volume . to do this , the note conditioner compares the amplitude of the current analysis buffer to the average amplitude of the previous six analysis buffers . this comparison generates a type of signal derivative . if this derivative is below a certain threshold , any currently playing note is ended . this first method may not be effective in all cases . where the amplitude rises more gradually , this method may miss the change to a new note . to account for this , the note conditioner additionally uses a second method of lookback frequency analysis . the note conditioner in part translates a complex input such as singing into a format that can be reproduced on a much more limited instrument . lookback frequency analysis specifically attempts to detect smooth changes in pitch where no obvious amplitude changes occur and translate this into individual , fixed - pitch note events . to do this , the note conditioner compares the current analysis buffer &# 39 ; s detected frequency with the detected frequency of the analysis buffer four frames previous . if these two detected pitches are separated by more than two and less than seven semitones , the currently playing note is ended and a new note is started . the output from this stage is a set of data for each frame , which contains whether a note is currently playing , whether a new note was just started or ended , the detected frequency of the current note and whether the detected frequency is valid . a composer at 116 determines specific notes being sung from a group of frames representing the note . a note defines not only the frequency , but the duration of the played frequency . a single note may be characterized by a hundred frames with a different fundamental frequency for each frame . the composer also determines which single frequency among a group of frequency values that occur during a note best represents the entire note . from the set of frame fundamental values representing a note , the composer determines one current note pitch value by using a “ consensus ” technique described below . the composer sends the note value directly to an instrument synthesizer . an instrument synthesizer of step 118 takes the note events generated by the composer and synthesizes the audio output from various instruments . it is designed around the “ soundfont ” instrument specification , which defines wav buffers mapped to keyboard zones . notes lying within a zone apply simple pitch - shifting to play the associated wav file back at the correct frequency . the instrument synthesizer functions as a well - defined implementation of a soundfont player . the output from this stage is an audio buffer containing the synthesized waveform . the instrument synthesizer waveform output may include the singer &# 39 ; s voice w / corrected tone and / or pitch . an input monitor of step 120 addresses the issues of latency and lack of reliable pitch during the beginning of a new note . 20 milliseconds buffers of audio input are collected and analyzed to detect fundamental frequencies at the pitch detector of step 112 . this means that any detected frequency is available for re - synthesis through the instrument synthesizer 20 milliseconds after the user inputs their voice . the human voice exhibits unusual harmonic content and extra noise when it begins to vocalize . this may further aggravate the delay of the pitch detection stage in determining an accurate frequency at the very beginning of a new note . this can be considered the “ latency ” of the system and will be at least 20 milliseconds due to thread blocking issues and the difficulty of detecting initial pitches . this greater than 20 milliseconds latency is annoying and noticeable to anyone singing into the microphone and causes a confusing delay to the output . to mitigate this , the input monitor stage mixes the input waveform from the direct - monitor buffer ( which is available every 10 milliseconds from the audio input stage ) with the instrument synthesizer &# 39 ; s output buffer . when the input monitor detects that the note conditioner has begun producing valid pitches , it lowers the volume on the direct - monitor input and raises the proportion of the output signal coming from the instrument synthesizer . the direct monitor input is a leadin and the following instrument synthesizer signal is corrected musical content . in this way , the user will very briefly hear their own voice at the start of a note . when the pitch detection system begins producing reliable values for the output , their voice is quickly muted . this technique reduces the apparent latency in the output . the output from this stage is the audio buffer containing the synthesized waveform mixed with the direct - monitor buffer . an audio effects of step 122 applies audio buffer level effects such as echo , distortion , and chorus to the output audio buffer received from the instrument synthesizer . the output from this stage is an audio buffer containing the effected output . at step 124 , an audio output takes the final buffer from the audio effects stage and presents it to the computer &# 39 ; s sound card to be played through speakers or to earphones 22 . these are examples of steps that may be used in implementing a production music system . the steps used here are for the purpose of describing one example of a system and should not be considered a limitation . a production music system may have more or fewer steps or different steps and fall within the scope of this disclosure . returning to step 112 of fig4 , pitch detection may use a difference equation derived from a two dimensional analysis of an autocorrelation function . autocorrelation is often used for finding a repeated pattern in a signal . autocorrelation determines over what time period a signal repeats itself and therefore the frequency of the signal . the related difference function provides the aperiodicity of a digitized signal across a range of time delays . by taking the minimums of the aperiodicity of a signal , the frequencies in the signals are identified . a difference function used to identify fundamental frequencies is : d ′ ⁡ ( τ ) = ∑ 1 w - τ ⁢ ( x j - x j + τ ) 2 2 ⁢ ⁢ ∑ 1 w - τ ⁢ ( x j 2 - x j + τ 2 ) as described by saurabh sood & amp ; ashok krishnamurthy in “ a robust on - the - fly pitch ( otfp ) estimation algorithm ” previously incorporated by reference . this equation provides a plurality of frequencies from the values in a buffer or frame of data of the digitized signal . fig5 is a graph 160 showing the results of applying the difference function to a frame of data . the vertical axis is aperiodicity and the horizontal axis is time or time delay which correlates to a frequency or wavelength . a fundamental frequency of the signal occurs when aperiodicity is minimized . this occurs at time values where the difference function is a minimum at points as noted at 162 a , 162 b , 162 c and 162 d . system 10 may define the number of minima from each buffer to be analyzed . the fundamental frequency is determined from the set of minima using amplitude and threshold values . there are two cases where frequency selection may fail , where successive minima values differ only by an insignificant amount and where successive minima differ by a significant amount . this is accounted for by two step thresholding . in the first step of the process , the amplitude threshold is small and the temporal threshold is large . example values for the temporal threshold may be 0 . 2 and for the amplitude may be 0 . 07 . this accounts for small differences in amplitude . in the second step of the process , the amplitude threshold is large and the temporal threshold is small . example values for the temporal threshold may be 0 . 05 and for the amplitude threshold may be 0 . 2 . this accounts for large differences in amplitude . fig6 is a flow diagram for the pitch detector of fig4 at step 112 , with an on the fly pitch estimation algorithm 200 using a difference function . at step 202 frame data is acquired for analysis . at step 204 the difference equation is applied to the frame data resulting in an aperiodicity / time plot similar to fig5 . at 206 a set of minima are identified from the data . at 208 the amplitude of the minima are adjusted by parabolic interpolation to compensate for quantization and sampling effects . the minimum threshold value is identified as t g . at 210 small amplitude and large temporal thresholds ( at & lt ;& lt ; tt ) are set . at 212 the temporal threshold test identifies minima values which satisfy the equation :  n - t g t i  & lt ; temporal ⁢ ⁢ threshold ⁢ ⁢ 1 at 214 the candidates satisfying this equation are compared to the amplitude threshold . each minima is compared to the amplitude threshold and if smaller , the value replaces t g . the process is repeated with large amplitude and small temporal thresholds set at 216 . ( at & gt ;& gt ; tt ). among all the candidates using the first temporal threshold value , minima values are identified at 218 that satisfy :  n - t g t i  & lt ; temporal ⁢ ⁢ threshold ⁢ ⁢ 2 candidates satisfying this equation are then compared to the new amplitude threshold at 220 . if smaller , the t g is replaced with the new value . this time delay value defines the fundamental frequency for the frame . these are examples of steps that may be used in implementing a production music system . the steps used here are for the purpose of describing the system and should not be considered a limitation . a production music system may have more or fewer steps or different steps and fall within the scope of this disclosure . fig7 is a diagram 300 describing the consensus technique of composer step 116 of fig4 used to determine a fundamental frequency from the frame frequencies defined at pitch detector step 112 . a set of frequencies for a single note may occur due to vibrato , harmonics or wavering of the singing voice during a note . consensus uses a range which is a frequency span of a set size . the range including the most points represents the strongest “ consensus ” of values . consensus determines the fewest number of ranges of a set size to cover all frequency values for the note . diagram 300 shows fifteen frequencies on a frequency axis that are between 430 and 450 hertz . the legend shows a range 302 that spans a frequency of 3 hertz with a center value 304 . a frequency value 306 is shown that falls in the range 302 . using consensus , the center of the range encompassing the most values , or the highest consensus , is the most accurate note frequency . this technique determines which frequencies during a note are the most likely to have been the note the user was actually singing . in this example , range 308 with five frequencies and a center value of 439 . 7 determines the primary or fundamental frequency and defines the played note . a specific frequency is a characteristic of every note and a frequency may correspond to a note . a reference frequency closest to the determined frequency may be sent to instrument synthesizer 118 . the reference frequency may be a note frequency of the 12 - tone chromatic scale such as in this example , 440 hertz or the note a 4 . the frequency may be fixed to lie on the notes of the c major scale . the frequency may be selected to lie on the notes of the c minor scale . the frequency may be selected within certain octave ranges . the composer sends the selected notes to the instrument synthesizer to be played . the hertz frequency value may be referenced to a midi note index between 0 and 127 . this note index is then “ rounded ” up or down to the nearest legal note for the selected scale or instrument . from there , it is converted back into a hertz frequency value to be sent to the instrument synthesizer . the output from this stage is a determination of whether the note is on or off and updated frequency . in addition to creating the music , the user may want to create a visual representation to accompany the music tracks while playing . in the second animation mode , the user develops virtual animate characters and scenes with music module 14 and an animation user interface on computer 16 . the user interface may provide a menu of virtual characters that can be part of the band and production crew used in playing and producing the music . the user may create their own band with a manager , a producer , a tour bus and stage effects . the software may use beat matching functions to synchronize movements of the animated band members with the user generated composition as it plays . for example , the tracks of a user generated composition typically have a beat or tempo value set by music system 10 . the virtual band member characters may be programmed with a set of repetitive movements such as strumming a guitar or beating on drums . the character movement repetition rate may be set by music system 10 to equal the beat or tempo of the music the characters to play . this may extend to dance movements by the virtual characters . with the animation user interface , user 12 is able to swap out instruments , load saved productions , switch out characters or character dress , control simple functions ( volume , play , pause , fast forward , rewind , restart from beginning ) and re - skin the stage . user 12 may save completed animation productions in different selectable formats that can be played on most dvd players . the first and second operating modes of system 10 may operate simultaneously . in the animation mode , the selected characters may interact with the user and follow a script related to composition or production functions . a virtual producer character may be configured to guide the user in developing and adding tracks to the original corrected music track . the producer may interact with the user by asking questions and making suggestions on adding tracks or other production . the virtual manager character may be programmed to guide the user in developing a band , choosing band members , choosing venues or other options available in the second animation mode . characters may react appropriately to the user &# 39 ; s actions and inputs . for example , the producer may fall asleep in his chair if there is no user input for a fixed period of time . if the user plays music at full volume , the producer may jump up and his hair may stick out . it is believed that this disclosure encompasses multiple distinct inventions with independent utility . while each of these inventions has been described in its best mode , numerous variations are contemplated . all novel and non - obvious combinations and subcombinations of the described and / or illustrated elements , features , functions , and properties should be recognized as being included within the scope of this disclosure . applicant reserves the right to claim one or more of the inventions in any application related to this disclosure . where the disclosure or claims recite “ a ,” “ a first ,” or “ another ” element , or the equivalent thereof , they should be interpreted to include one or more such elements , neither requiring nor excluding two or more such elements .
a music production system is presented that includes a music module to access computer software applications and produce music compositions . the system in a first mode records and corrects the pitch of a tune , typically a tune sung by a user at a microphone . the user may produce additional tracks with the software applications including instruments playing the recorded and corrected tune or to accompany the user while singing the tune . in a second mode , the system generates virtual characters such as band members , a producer and / or a manager to simulate the production and presentation of the recorded tune as a stage show as part of a recording industry . virtual characters may assist in the use of user interface functions during music composition development and orchestration .