-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconstants.py
More file actions
79 lines (78 loc) · 2.38 KB
/
constants.py
File metadata and controls
79 lines (78 loc) · 2.38 KB
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
AUDIO_EXTS = {".wav", ".aiff", ".aif", ".flac", ".mp3", ".ogg"}
MAX_PREVIEW_ROWS = 500
MIN_BPM_DURATION_MS = 3000 # Skip BPM detection on files shorter than this
# Hardware profiles — maps display name to device constraints.
# path_limit: max total path length in chars, or None for no restriction.
# conversion: dict of audio conversion settings, or None for no conversion.
#
# To add a new device: insert one entry here AND add the option to ui/index.html.
PROFILES = {
"Generic": {
"path_limit": None,
"conversion": None, # No auto-conversion
},
"M8": {
"path_limit": 127,
"conversion": {
"format": "wav",
"sample_rate": 44100,
"bit_depth": 16,
"channels": None, # Keep original
"normalize": False,
}
},
"MPC One": {
"path_limit": 255,
"conversion": None, # User choice - MPC supports many formats
},
"SP-404mkII": {
"path_limit": 255,
"conversion": None, # User choice
},
"Elektron Digitakt": {
"path_limit": None,
"conversion": {
"format": "wav",
"sample_rate": 48000,
"bit_depth": 16,
"channels": 1, # Force mono - Digitakt requirement
"normalize": False,
}
},
"Elektron Analog Rytm": {
"path_limit": None,
"conversion": {
"format": "wav",
"sample_rate": 48000,
"bit_depth": 16,
"channels": None, # Keep original
"normalize": False,
}
},
"Elektron Syntakt": {
"path_limit": None,
"conversion": {
"format": "wav",
"sample_rate": 48000,
"bit_depth": 16,
"channels": None,
"normalize": False,
}
},
"Akai MPC Sample": {
"path_limit": 255,
"conversion": None, # Multi-format: WAV, AIFF, MP3, FLAC, OGG — user choice
},
"TE EP-133 K.O. II": {
"path_limit": None,
"conversion": {
"format": "wav",
"sample_rate": 44100, # Native is 46875Hz; device accepts lower rates as-is
"bit_depth": 16,
"channels": None, # Keep original stereo/mono
"normalize": False,
}
# Note: 20-second max sample length per slot on device
},
}
PROFILE_NAMES = list(PROFILES.keys())