original_docstring: 
              Find all samples (beats) of a given key in a given section.
          
docstring: Find all samples (beats) of a given key in a given section.
docstring_tokens: Find all samples ( beats ) of a given key in a given section .
code: def searchSamples(self, j, key):
          """
              Find all samples (beats) of a given key in a given section.
          """
          hashkey = "_%s-%s" % (j, key)
          if not hashkey in self.sampleCache:
              if self.sections:
                  pool = self.sections[j % len(self.sections)]
              elif self.original.analysis.bars:
                  pool = self.original.analysis.bars
              elif self.original.analysis.segments:
                  pool = self.original.analysis.segments
              else:
                  raise Exception("No samples found for section %s." % j+1)
              a = self.getSamples(pool, key)
              for tries in xrange(0, 5):
                  if len(a):
                      break
                  key = (key + 7) % 12
                  a = self.getSamples(pool, key)
              else:
                  for tries in xrange(0, 5):
                      if len(a):
                          break
                      if self.sections:
                          j = (j + 1) % len(self.sections)
                      elif self.original.analysis.bars:
                          j = (j + 1) % len(self.original.analysis.bars)
                      elif self.original.analysis.segments:
                          j = (j + 1) % len(self.original.analysis.segments)
                      key = (key + 2) % 12
                      a = self.getSamples(pool, key)
              self.sampleCache[hashkey] = a
          return self.sampleCache[hashkey]
code_tokens: def searchSamples ( self , j , key ) : hashkey = "_%s-%s" % ( j , key ) if not hashkey in self . sampleCache : if self . sections : pool = self . sections [ j % len ( self . sections ) ] elif self . original . analysis . bars : pool = self . original . analysis . bars elif self . original . analysis . segments : pool = self . original . analysis . segments else : raise Exception ( "No samples found for section %s." % j + 1 ) a = self . getSamples ( pool , key ) for tries in xrange ( 0 , 5 ) : if len ( a ) : break key = ( key + 7 ) % 12 a = self . getSamples ( pool , key ) else : for tries in xrange ( 0 , 5 ) : if len ( a ) : break if self . sections : j = ( j + 1 ) % len ( self . sections ) elif self . original . analysis . bars : j = ( j + 1 ) % len ( self . original . analysis . bars ) elif self . original . analysis . segments : j = ( j + 1 ) % len ( self . original . analysis . segments ) key = ( key + 2 ) % 12 a = self . getSamples ( pool , key ) self . sampleCache [ hashkey ] = a return self . sampleCache [ hashkey ]
short_docstring: Find all samples (beats) of a given key in a given section.
short_docstring_tokens: Find all samples ( beats ) of a given key in a given section .
comment: """
              Find all samples (beats) of a given key in a given section.
          """