Spaces: Runtime error
Runtime error
File size: 1,977 Bytes
0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 9bc86e6 0d9f09c 20f56e4 0d9f09c 9bc86e6 0d9f09c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
inverse_mapping_old = {
36: 'kick',
38: 'snr', # snare
42: 'hh', # hihat
48: 'tom',
49: 'csh', # crash
51: 'ride',
39: 'clap',
56: 'cbl', # cowbell
75: 'claves',
64: 'conga',
70: 'maracas',
76: 'guiro',
69: 'cabasa',
60: 'bongo',
37: 'shkr', # shaker
54: 'tamb', # tambourine
81: 'triangle',
49: 'cymbal',
35: 'kick', # bass drum of some kind
55: 'spl', # splash cymbal
0: 'none',
46: 'hh_open', # hihat_open
44: 'hh', # hihat_pedal
40: 'snr', # snare_rimshot
43: 'tom_high_floor',
-1: 'none',
22: 'kick', # VERIFY
58: 'vibraslap',
53: 'ride_bell',
50: 'tom_high',
59: 'ride_2',
45: 'tom_low',
47: 'tom_low_mid',
}
inverse_mapping = {
36: 'k', # kick
22: 'k', # VERIFY
35: 'k', # bass drum of some kind
38: 's', # snare
40: 's', # snare_rimshot
42: 'h', # hihat
48: 't', # tom
49: 'c', # crash
51: 'r', # ride
59: 'r', # ride_2
39: 'l', # clap
56: 'b', # cowbell
37: 'z', # shaker
54: 'a', # tambourine
81: 'i', # triangle
49: 'y', # cymbal
55: 'p', # splash cymbal
46: 'j', # hihat_open
44: 'h', # hihat_pedal
43: 'u', # tom_high_floor
50: 'w', # tom_high
45: 'x', # tom_low
47: 'q', # tom_low_mid
58: 'v', # vibraslap
53: 'd', # ride_bell
0: 'n', # none
-1: 'n', # none
}
mappings = {
"k": "kick.wav",
"s": "snare.wav",
"h": "hihat.wav",
"c": "cymbal.wav",
"y": "cymbal.wav",
"l": "clap.wav",
'r': "ride.wav",
'j': "hihat-open.wav",
'a': "tambourine.wav",
'z': "shaker.wav",
'u': "tom-high.wav",
'w': "tom-high.wav",
'x': "tom-low.wav",
'q': "tom-low-mid.wav",
't': "tom-mid.wav",
'v': "vibraslap.wav",
}
replacements = {
"hh_closed": "hh",
"hh_open": "hh",
}
replacement_chars = {
"p": "y", # splash cymbal to cymbal
'd': 'r', # ride bell to ride
} |