[
{
"function": "time_to_samples",
"name": "time_to_samples_sr22050",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 22050,
"expected": [
0,
2205,
11025,
22050,
55125
]
},
{
"function": "time_to_samples",
"name": "time_to_samples_sr48000",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 48000,
"expected": [
0,
4800,
24000,
48000,
120000
]
},
{
"function": "samples_to_time",
"name": "samples_to_time_sr22050",
"samples": [
0,
2205,
11025,
22050,
44100
],
"sr": 22050,
"expected": [
0.0,
0.1,
0.5,
1.0,
2.0
]
},
{
"function": "samples_to_time",
"name": "samples_to_time_sr48000",
"samples": [
0,
2205,
11025,
22050,
44100
],
"sr": 48000,
"expected": [
0.0,
0.0459375,
0.2296875,
0.459375,
0.91875
]
},
{
"function": "frames_to_samples",
"name": "frames_to_samples_hop512_nfftNone",
"frames": [
0,
1,
5,
10,
50,
100
],
"hop_length": 512,
"n_fft": null,
"expected": [
0,
512,
2560,
5120,
25600,
51200
]
},
{
"function": "frames_to_samples",
"name": "frames_to_samples_hop512_nfft2048",
"frames": [
0,
1,
5,
10,
50,
100
],
"hop_length": 512,
"n_fft": 2048,
"expected": [
1024,
1536,
3584,
6144,
26624,
52224
]
},
{
"function": "frames_to_samples",
"name": "frames_to_samples_hop256_nfftNone",
"frames": [
0,
1,
5,
10,
50,
100
],
"hop_length": 256,
"n_fft": null,
"expected": [
0,
256,
1280,
2560,
12800,
25600
]
},
{
"function": "frames_to_samples",
"name": "frames_to_samples_hop256_nfft2048",
"frames": [
0,
1,
5,
10,
50,
100
],
"hop_length": 256,
"n_fft": 2048,
"expected": [
1024,
1280,
2304,
3584,
13824,
26624
]
},
{
"function": "samples_to_frames",
"name": "samples_to_frames_hop512_nfftNone",
"samples": [
0,
256,
512,
1024,
2048,
10000,
22050
],
"hop_length": 512,
"n_fft": null,
"expected": [
0,
0,
1,
2,
4,
19,
43
]
},
{
"function": "samples_to_frames",
"name": "samples_to_frames_hop512_nfft2048",
"samples": [
0,
256,
512,
1024,
2048,
10000,
22050
],
"hop_length": 512,
"n_fft": 2048,
"expected": [
-2,
-2,
-1,
0,
2,
17,
41
]
},
{
"function": "samples_to_frames",
"name": "samples_to_frames_hop256_nfftNone",
"samples": [
0,
256,
512,
1024,
2048,
10000,
22050
],
"hop_length": 256,
"n_fft": null,
"expected": [
0,
1,
2,
4,
8,
39,
86
]
},
{
"function": "samples_to_frames",
"name": "samples_to_frames_hop256_nfft2048",
"samples": [
0,
256,
512,
1024,
2048,
10000,
22050
],
"hop_length": 256,
"n_fft": 2048,
"expected": [
-4,
-3,
-2,
0,
4,
35,
82
]
},
{
"function": "frames_to_time",
"name": "frames_to_time_sr22050_nfftNone",
"frames": [
0,
1,
5,
10,
50
],
"sr": 22050,
"hop_length": 512,
"n_fft": null,
"expected": [
0.0,
0.023219954648526078,
0.11609977324263039,
0.23219954648526078,
1.1609977324263039
]
},
{
"function": "frames_to_time",
"name": "frames_to_time_sr22050_nfft2048",
"frames": [
0,
1,
5,
10,
50
],
"sr": 22050,
"hop_length": 512,
"n_fft": 2048,
"expected": [
0.046439909297052155,
0.06965986394557823,
0.16253968253968254,
0.2786394557823129,
1.207437641723356
]
},
{
"function": "frames_to_time",
"name": "frames_to_time_sr48000_nfftNone",
"frames": [
0,
1,
5,
10,
50
],
"sr": 48000,
"hop_length": 512,
"n_fft": null,
"expected": [
0.0,
0.010666666666666666,
0.05333333333333334,
0.10666666666666667,
0.5333333333333333
]
},
{
"function": "frames_to_time",
"name": "frames_to_time_sr48000_nfft2048",
"frames": [
0,
1,
5,
10,
50
],
"sr": 48000,
"hop_length": 512,
"n_fft": 2048,
"expected": [
0.021333333333333333,
0.032,
0.07466666666666667,
0.128,
0.5546666666666666
]
},
{
"function": "time_to_frames",
"name": "time_to_frames_sr22050_nfftNone",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 22050,
"hop_length": 512,
"n_fft": null,
"expected": [
0,
4,
21,
43,
107
]
},
{
"function": "time_to_frames",
"name": "time_to_frames_sr22050_nfft2048",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 22050,
"hop_length": 512,
"n_fft": 2048,
"expected": [
-2,
2,
19,
41,
105
]
},
{
"function": "time_to_frames",
"name": "time_to_frames_sr48000_nfftNone",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 48000,
"hop_length": 512,
"n_fft": null,
"expected": [
0,
9,
46,
93,
234
]
},
{
"function": "time_to_frames",
"name": "time_to_frames_sr48000_nfft2048",
"times": [
0.0,
0.1,
0.5,
1.0,
2.5
],
"sr": 48000,
"hop_length": 512,
"n_fft": 2048,
"expected": [
-2,
7,
44,
91,
232
]
}
]