autocorr
        
        autocorr — 
     Autocorrelation of a sequence.
    
       
      
        
        Description
        
       This opcode takes in an input array and computes its autocorrelation.
    
       
      
        
        Syntax
        kout[] autocorr kin[]
       
      
        
        Performance
        
      kout[] -- output array containing the
      autocorrelation output. It will be created if it does not exist.
         
        
      kin[] -- input array containing the
      sequence for autocorrelation.
    
       
      
        
        Examples
        
      Here is an example of the autocorr opcode. It uses the file
    autocorr.csd.
        
          
          
            Example 80. Example of the autocorr opcode.
          
          
            See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
            
              
              
<CsoundSynthesizer>
<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>
0dbfs = 1
instr 1
kin[] fillarray 1,0,1,0,1,0,1
kout[] autocorr kin
kcnt init 0
while kcnt < lenarray(kout) do
 printk2 kout[kcnt]
 kcnt += 1
od
turnoff
endin
</CsInstruments>
<CsScore>
i1 0 1
</CsScore>
</CsoundSynthesizer>
             
           
         
        
       
      
      
        
        Credits
        
      
        
          
            | Author: Victor Lazzarini | 
          
            | NUI Maynooth | 
          
            | 2021 | 
        
        
    
        New in version 6.16