Example #1
0
	def performRecognition(self,contour):
		contour = contour.replace('A','u').replace('S','r').replace('D','d')
		songs = midiSong.findSong(contour) 
		if songs == None:
			return songs
		elif (len(songs) == 50):
			self.failuretype = True
			return None
		else:
			print(len(songs))
			if (self.sorttype == "occ"):
				quicksort.quicksort(songs)
				songs.reverse()
			else:
				stringSort.stringSort(songs, self.sorttype)
			return songs
Example #2
0
 def performRecognition(self, contour):
     contour = contour.replace('A', 'u').replace('S', 'r').replace('D', 'd')
     songs = midiSong.findSong(contour)
     if songs == None:
         return songs
     elif (len(songs) == 50):
         self.failuretype = True
         return None
     else:
         print(len(songs))
         if (self.sorttype == "occ"):
             quicksort.quicksort(songs)
             songs.reverse()
         else:
             stringSort.stringSort(songs, self.sorttype)
         return songs
Example #3
0
import midiSong
##searches the database for the following contours
##used songs that most people would know

jayzHKLife = "rduduuurduuuu"
blnk182WMAA = "drurrrrdrurrrrrr"
billyJPianoM = "ddrrdrrurrdd"
SmashMouthAllStar = "rrurdrdurrdurr"
RHCPCalifornication = "rdurdrdurrrrdu"

foundSongs = midiSong.findSong(RHCPCalifornication)

if foundSongs == None:
    print("no songs found")

else:
    for song in foundSongs:
        print(song.name, "\t", song.artist, "\t", song.occ)
        print(song.fileLocation)
Example #4
0
import midiSong
##searches the database for the following contours
##used songs that most people would know


jayzHKLife = "rduduuurduuuu"
blnk182WMAA = "drurrrrdrurrrrrr"
billyJPianoM = "ddrrdrrurrdd"
SmashMouthAllStar = "rrurdrdurrdurr"
RHCPCalifornication = "rdurdrdurrrrdu"

foundSongs = midiSong.findSong(RHCPCalifornication)

if foundSongs == None:
    print ("no songs found")

else:
    for song in foundSongs:
        print(song.name, "\t", song.artist, "\t", song.occ)
        print (song.fileLocation)