some changes
This commit is contained in:
parent
02c5579186
commit
a59c0c4e08
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -271,10 +271,10 @@ def localize_frequencies(song_name, offset, songlen, segsize, output_name):
|
|||
let_ring_currentLength = 0
|
||||
let_ring_freq = -200
|
||||
|
||||
let_ring_freqLeniency = 37
|
||||
let_ring_freqLeniency = 50
|
||||
|
||||
let_ring_leniencySecond = 0.07
|
||||
let_ring_lengthLeniency = 2
|
||||
let_ring_lengthLeniency = 1
|
||||
|
||||
# remove
|
||||
# i = time, j = freq
|
||||
|
@ -565,7 +565,7 @@ def parse_after_filter(song_name, offset, songlen, segsize, dt0):
|
|||
print("\n\nSegSize :", segsize, "\nFFT :", len(fft_list), "\nFFT[0] :", len(fft_list[0]), "\npfreq :", len(pfreq), "\n\n")
|
||||
|
||||
timing_points = []
|
||||
prev_append = 2
|
||||
prev_append = 1
|
||||
|
||||
for i in range(len(fft_list)):
|
||||
# retrieve dominant freq
|
||||
|
@ -651,23 +651,29 @@ void_freq_clean(convert_to_wav("ctype.mp3"), 0.042, 5, 1/(149.3/60)/8, 100, 3000
|
|||
localize_frequencies(convert_to_wav("ctype_void.mp3"), 0, 5, 1/(149.3/60)/12, "ctype_filtered.mp3")
|
||||
retrieve_all_from_song("ctype_filtered.mp3", 0, 5, 149.3, dta=1/(149.3/60)/128, dtf=1/(149.3/60)/8)
|
||||
'''
|
||||
#OFFSET = 0.042
|
||||
#BPM = 149.3
|
||||
|
||||
SONG_LEN = 5
|
||||
OFFSET = 0.042
|
||||
SEGSIZE = 1/(149.3/60)
|
||||
OFFSET = 117.790
|
||||
BPM = 150
|
||||
SEGSIZE = 1/(BPM/60)
|
||||
|
||||
wavved_song = convert_to_wav("Galaxy Collapse.mp3")
|
||||
|
||||
# remove high/low frequencies (often noise)
|
||||
void_freq_clean(convert_to_wav("tetris_2.wav"), OFFSET, SONG_LEN, SEGSIZE/8, 100, 3000, 0.05, "tetris_2_void.wav")
|
||||
#void_freq_clean(wavved_song, OFFSET, SONG_LEN, SEGSIZE/8, 100, 3000, 0.05, "Zvoided_song.wav")
|
||||
|
||||
# crops any part with let ring
|
||||
localize_frequencies(convert_to_wav("tetris_2_void.wav"), 0, SONG_LEN-0.01, SEGSIZE/16, "tetris_2_f.wav")
|
||||
localize_frequencies(convert_to_wav("Zvoided_song.wav"), 0, SONG_LEN-0.1, SEGSIZE/8, "Zcleaned_song.wav")
|
||||
|
||||
# find timings
|
||||
tp = parse_after_filter("tetris_2_f.wav", 0, SONG_LEN-0.01, SEGSIZE/16, OFFSET)
|
||||
tp = parse_after_filter("Zcleaned_song.wav", 0, SONG_LEN-0.1, SEGSIZE/8, OFFSET)
|
||||
|
||||
# write
|
||||
write_result("tetris_2.wav", OFFSET, SONG_LEN-0.01, SEGSIZE/16, tp, "tetris_2_result.wav")
|
||||
write_result(wavved_song, OFFSET, SONG_LEN-0.1, SEGSIZE/8, tp, "Zoutput_song.wav")
|
||||
|
||||
#retrieve_all_from_song("tetris_2_f.wav", 0, 5, 149.3, dtf=1/(149.3/60)/8)
|
||||
#retrieve_all_from_song("Zcleaned_song.wav", 0, 5, 149.3, dtf=1/(149.3/60)/8)
|
||||
print("yipee")
|
||||
|
||||
|
||||
|
|
BIN
tetris_2_f.wav
BIN
tetris_2_f.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue