diff --git a/audio.wav b/audio.wav index ed8aad8..c422db3 100644 Binary files a/audio.wav and b/audio.wav differ diff --git a/cleaned_sp.py b/cleaned_sp.py index c793026..1a525d5 100644 --- a/cleaned_sp.py +++ b/cleaned_sp.py @@ -274,6 +274,18 @@ def keep_highest(song_name, offset, songlen, segsize, count, output_name, minfre # -------------------------------------------- Write -------------------------------------------- # + f = open("result_owen_2.txt", "w") + f.write("Song name : " + song_name + "\n") + f.write("Start : " + str(offset) + "\n") + f.write("End : " + str(offset+songlen) + "\n\n") + + f.write("Hit Objects : \n") + for ct in loct: + f.write(str(ct)) + f.write("\n") + + f.close() + return (loct, locs) def convert_to_wav(song_name:str, output_file="audio.wav") -> str: @@ -372,12 +384,28 @@ wavved_song = convert_to_wav("songs/rushe.mp3") ''' ''' # Tsubaki -SONG_LEN = 10 +SONG_LEN = 20 OFFSET = 35.659 BPM = 199 SEGSIZE = 1/(BPM/60) wavved_song = convert_to_wav("songs/TSUBAKI.mp3") ''' +''' +# Owen 1/2 +SONG_LEN = 20 +OFFSET = 1.008 +BPM = 157 +SEGSIZE = 1/(BPM/60) +wavved_song = convert_to_wav("songs/owen(157.00024-1008).mp3") +''' + +# Owen 2/2 +SONG_LEN = 7 +OFFSET = 25.466 +BPM = 157 +SEGSIZE = 1/(BPM/60) +wavved_song = convert_to_wav("songs/owen(157.00024-1008).mp3") + ''' # death SONG_LEN = 8 @@ -388,7 +416,7 @@ wavved_song = convert_to_wav("songs/Night of Knights.mp3") ''' ''' # Bad apple -SONG_LEN = 8 +SONG_LEN = 20 OFFSET = 0.152 BPM = 138 SEGSIZE = 1/(BPM/60) @@ -404,19 +432,20 @@ SEGSIZE = 1/(BPM/60) #wavved_song = convert_to_wav("songs/Freedom Dive (222.22-1058).mp3") wavved_song = convert_to_wav("songs/Freedom Dive (222.22-1058)[filtered].wav") ''' - +''' # Mevalogania SONG_LEN = 7 -OFFSET = 0 +OFFSET = 7.984 BPM = 240 SEGSIZE = 1/(BPM/60) -#wavved_song = convert_to_wav("songs/Megalovania(240-7984).mp3") +#wavved_song = convresult_bad_appleert_to_wav("songs/Megalovania(240-7984).mp3") wavved_song = convert_to_wav("songs/Megalovania(240-7984)[filtered].wav") - -#wavved_song = convert_to_wav("songs/tetris_2.wav") +''' NOTE_DIST = (2**(1/4)) OCTAVE_DIST = 0.05 -keep_highest(wavved_song, OFFSET, SONG_LEN, SEGSIZE/4, 1, "Zblit.wav", minfreq=300, maxfreq=3000, ampthr=500) + +# keep_highest(song_name, offset, songlen, segsize, count, output_name, minfreq=110, maxfreq=5000, ampthr=250): +(loct, locs) = keep_highest(wavved_song, OFFSET, SONG_LEN, SEGSIZE/4, 1, "Zblit.wav", minfreq=330, maxfreq=3000, ampthr=500) print("yipee") diff --git a/result_bad_apple.txt b/result_bad_apple.txt new file mode 100644 index 0000000..56f2c91 --- /dev/null +++ b/result_bad_apple.txt @@ -0,0 +1,63 @@ +Song name : songs/Bad apple (138-152)[filtered].wav +Start : 0.152 +End : 20.152 + +Hit Objects : +0.17748752834467119 +0.6138367346938776 +1.0485873015873015 +1.4824761904761903 +[1.5911723356009069, 1.6998571428571427] +[1.80856462585034, 1.916580498866213] +2.352963718820862 +2.786183673469388 +3.2216031746031746 +3.4390068027210887 +3.6557414965986395 +4.092079365079365 +4.525321995464853 +4.960752834467121 +5.0694263038548755 +[5.178133786848073, 5.286818594104308] +5.394857142857143 +5.8312176870748305 +6.264437641723356 +6.699879818594105 +6.917260770975057 +7.133995464852608 +7.570333333333333 +8.00357596371882 +8.439006802721087 +8.547680272108844 +[8.65639909297052, 8.765083900226756] +8.873122448979592 +9.309471655328798 +9.742714285714285 +10.178133786848072 +10.395537414965986 +10.612272108843536 +11.049222222222221 +11.481841269841269 +11.917272108843537 +12.025945578231292 +12.134641723356008 +12.243371882086167 +12.35137641723356 +12.788360544217687 +13.223145124716552 +13.655741496598639 +14.090480725623582 +14.526897959183673 +14.960072562358276 +15.394879818594104 +15.829607709750567 +16.264414965986397 +16.69919954648526 +17.13463038548753 +17.352011337868483 +17.568780045351474 +18.00577551020408 +18.44058276643991 +18.874732426303854 +19.30789569160998 +19.744233560090706 diff --git a/result_megalovania.txt b/result_megalovania.txt new file mode 100644 index 0000000..7a948c7 --- /dev/null +++ b/result_megalovania.txt @@ -0,0 +1,50 @@ +Song name : songs/Megalovania(240-7984)[filtered].wav +Start : 7.984 +End : 14.984 + +Hit Objects : +[8.078591836734693, 8.132503401360545] +8.204578231292517 +8.288115646258504 +8.34134693877551 +8.527968253968254 +[8.879102040816326, 8.922888888888888] +[9.129260770975057, 9.181766439909296] +9.37977097505669 +9.423172335600906 +9.549498866213153 +9.689034013605442 +9.8049410430839 +9.898104308390023 +10.072764172335601 +10.276834467120182 +10.341426303854876 +10.512015873015873 +10.899748299319729 +11.129272108843537 +11.183319727891156 +[11.385530612244898, 11.428920634920635] +11.57258276643991 +11.688943310657596 +11.76148299319728 +11.881256235827664 +11.935269841269841 +12.076947845804987 +12.293716553287982 +12.344793650793651 +12.503886621315193 +12.549975056689341 +[12.88151700680272, 12.925519274376416] +13.12928344671202 +13.183308390022676 +13.420326530612245 +13.63055328798186 +13.695836734693877 +13.776233560090702 +13.816392290249432 +13.914839002267573 +[14.015201814058956, 14.068489795918367] +14.142446712018142 +14.282956916099774 +14.527979591836734 +14.897560090702948 diff --git a/result_owen.txt b/result_owen.txt new file mode 100644 index 0000000..53ff6a5 --- /dev/null +++ b/result_owen.txt @@ -0,0 +1,97 @@ +Song name : audio.wav +Start : 1.008 +End : 21.008 + +Hit Objects : +[1.0518548752834467, 1.1318095238095238] +1.4385102040816327 +1.8517641723356009 +1.9118095238095238 +2.1988276643990927 +2.590641723356009 +2.984496598639456 +3.3595192743764173 +3.403498866213152 +3.7352448979591837 +3.8218548752834467 +4.10879365079365 +4.192229024943311 +4.494666666666667 +4.894315192743765 +4.968136054421769 +5.245267573696145 +5.644451247165533 +5.823487528344671 +6.041390022675737 +6.4073197278911564 +6.785743764172335 +6.878181405895692 +6.985267573696145 +[7.173113378684807, 7.250256235827664] +7.5618208616780045 +7.628351473922902 +7.929609977324263 +7.970482993197279 +8.309609977324264 +8.702648526077098 +9.100709750566892 +9.465505668934242 +9.65797732426304 +9.850721088435375 +10.227104308390022 +10.614780045351473 +10.673158730158729 +11.0098820861678 +11.083691609977325 +11.266696145124715 +11.379507936507938 +11.758986394557823 +12.156390022675737 +12.535868480725625 +12.714349206349205 +12.896265306122448 +13.279984126984125 +13.37145804988662 +13.665267573696145 +13.722784580498868 +14.048702947845804 +14.099213151927437 +14.140097505668933 +14.435789115646259 +14.817399092970522 +14.940732426303853 +15.216299319727892 +15.625063492063493 +15.759995464852608 +15.945392290249433 +16.147569160997733 +16.36139002267574 +16.444802721088436 +16.724621315192742 +17.101503401360542 +17.144802721088436 +17.187897959183672 +17.296344671201812 +17.379405895691608 +17.48303401360544 +17.875551020408164 +17.958532879818595 +18.27968934240363 +18.440879818594105 +18.653986394557823 +[18.829950113378683, 18.918034013605443] +19.008544217687074 +19.084541950113376 +19.306492063492062 +19.388408163265304 +19.464836734693876 +19.77943990929705 +20.020301587301585 +20.167897959183673 +20.33250113378685 +20.402331065759636 +20.478589569160995 +20.53909977324263 +20.824961451247166 +20.869950113378685 +20.934825396825396 diff --git a/result_owen_2.txt b/result_owen_2.txt new file mode 100644 index 0000000..f488954 --- /dev/null +++ b/result_owen_2.txt @@ -0,0 +1,61 @@ +Song name : audio.wav +Start : 25.466 +End : 32.466 + +Hit Objects : +25.52553514739229 +25.60707709750567 +25.738539682539685 +25.859526077097506 +25.942394557823132 +25.989775510204083 +26.09740589569161 +26.19691836734694 +26.363222222222223 +26.4916462585034 +26.554990929705216 +26.757621315192743 +26.866702947845805 +26.97207709750567 +27.072337868480727 +27.175580498866214 +27.399310657596374 +27.498664399092974 +27.716861678004538 +27.803505668934243 +27.902190476190476 +28.176839002267574 +28.273913832199547 +28.359049886621317 +28.46615873015873 +[28.562768707482995, 28.64804081632653] +[28.756884353741498, 28.83251927437642] +28.949106575963718 +29.01647619047619 +[29.084253968253968, 29.173789115646258] +29.319333333333333 +29.41299546485261 +29.484344671201814 +29.559356009070296 +29.73783673469388 +29.926419501133786 +29.987961451247166 +30.09112471655329 +30.19709977324263 +30.301578231292517 +30.378426303854877 +30.481668934240364 +[30.683539682539685, 30.760727891156463] +30.847587301587303 +31.04754195011338 +31.14048979591837 +31.229185941043085 +31.290421768707482 +31.433086167800454 +31.524730158730158 +31.61157823129252 +[31.72844897959184, 31.816873015873018] +31.988358276643993 +32.095784580498865 +32.20156689342404 +32.29895918367347 diff --git a/result_tsubaki.txt b/result_tsubaki.txt new file mode 100644 index 0000000..e1caa3c --- /dev/null +++ b/result_tsubaki.txt @@ -0,0 +1,124 @@ +Song name : audio.wav +Start : 35.659 +End : 55.659 + +Hit Objects : +35.79228798185941 +35.91021315192744 +36.04037188208617 +36.15184580498866 +36.23495238095238 +36.32842176870748 +36.406290249433106 +36.75744671201814 +36.95995238095238 +37.2967664399093 +37.449056689342406 +37.5271746031746 +37.65802494331066 +37.84421541950113 +[37.947548752834464, 37.990655328798184] +38.125190476190475 +38.411800453514736 +38.60766213151928 +38.70639229024943 +38.821278911564626 +38.8689433106576 +39.10621088435374 +39.28780952380952 +39.45389795918367 +39.684714285714286 +39.864 +39.920814058956914 +40.10293424036281 +40.195848072562356 +40.32245804988662 +40.56655102040816 +[40.74982766439909, 40.82168707482993] +41.003024943310656 +41.14491836734694 +41.392820861678004 +41.57685714285714 +[41.72762811791383, 41.76821768707483] +41.81646031746032 +41.87975963718821 +42.062174603174604 +42.31275283446712 +42.4768231292517 +42.53006575963719 +42.63855782312925 +42.81466893424036 +42.990655328798184 +43.133659863945574 +43.20110884353741 +43.258172335600904 +[43.56973696145125, 43.611335600907026] +43.7077641723356 +44.05415873015873 +44.18567800453515 +44.2824126984127 +44.647401360544215 +44.76270748299319 +45.070519274376416 +45.406018140589566 +45.518750566893424 +45.694918367346936 +45.8018231292517 +46.045814058956914 +46.25060997732426 +46.47650566893424 +46.5686485260771 +[46.845791383219954, 46.91973696145125] +47.06896598639456 +47.17215192743764 +47.29363718820861 +47.33420408163265 +47.43748072562358 +47.647129251700676 +47.71998639455782 +47.972854875283446 +48.054034013605445 +[48.258807256235826, 48.31286621315193] +48.353263038548754 +48.48960090702948 +48.910995464852604 +[49.1158253968254, 49.16668707482993] +49.26697052154195 +49.64987301587301 +49.74669841269841 +49.86911337868481 +50.1181723356009 +50.40005442176871 +50.459453514739224 +50.65728798185941 +50.71109750566893 +[50.84771882086168, 50.893149659863944] +51.33664172335601 +51.39431746031746 +51.636709750566894 +51.688761904761904 +51.743988662131514 +52.00931746031746 +52.11760544217687 +52.15932879818594 +52.20068934240363 +52.25446485260771 +52.47726530612245 +52.55314965986395 +52.8780589569161 +53.04224263038549 +53.08240136054422 +53.177356009070294 +53.29026984126984 +53.49267346938775 +[53.62920408163265, 53.668081632653056] +53.77542857142857 +[54.10584807256235, 54.16563265306122] +54.327820861678006 +[54.431188208616774, 54.479566893424035] +54.691052154195006 +54.992820861678 +55.19167573696145 +55.29097278911564 +55.553512471655324 +55.60739002267574