mms-lib 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. mms_lib-0.1.0/LICENSE +18 -0
  2. mms_lib-0.1.0/PKG-INFO +54 -0
  3. mms_lib-0.1.0/README.md +44 -0
  4. mms_lib-0.1.0/pyproject.toml +23 -0
  5. mms_lib-0.1.0/setup.cfg +4 -0
  6. mms_lib-0.1.0/src/mms/__init__.py +5 -0
  7. mms_lib-0.1.0/src/mms/assets/text/features.json +58 -0
  8. mms_lib-0.1.0/src/mms/assets/text/mapping.json +141 -0
  9. mms_lib-0.1.0/src/mms/assets/text/profile.json +552 -0
  10. mms_lib-0.1.0/src/mms/assets/text/settings.json +1 -0
  11. mms_lib-0.1.0/src/mms/cli.py +184 -0
  12. mms_lib-0.1.0/src/mms/core.py +324 -0
  13. mms_lib-0.1.0/src/mms/dataclass.py +413 -0
  14. mms_lib-0.1.0/src/mms/evaltools.py +23 -0
  15. mms_lib-0.1.0/src/mms/midi_reader.py +217 -0
  16. mms_lib-0.1.0/src/mms/mido/__init__.py +58 -0
  17. mms_lib-0.1.0/src/mms/mido/frozen.py +93 -0
  18. mms_lib-0.1.0/src/mms/mido/messages/__init__.py +37 -0
  19. mms_lib-0.1.0/src/mms/mido/messages/checks.py +107 -0
  20. mms_lib-0.1.0/src/mms/mido/messages/decode.py +114 -0
  21. mms_lib-0.1.0/src/mms/mido/messages/encode.py +72 -0
  22. mms_lib-0.1.0/src/mms/mido/messages/messages.py +267 -0
  23. mms_lib-0.1.0/src/mms/mido/messages/specs.py +140 -0
  24. mms_lib-0.1.0/src/mms/mido/messages/strings.py +78 -0
  25. mms_lib-0.1.0/src/mms/mido/midifiles/__init__.py +21 -0
  26. mms_lib-0.1.0/src/mms/mido/midifiles/meta.py +598 -0
  27. mms_lib-0.1.0/src/mms/mido/midifiles/midifiles.py +509 -0
  28. mms_lib-0.1.0/src/mms/mido/midifiles/tracks.py +127 -0
  29. mms_lib-0.1.0/src/mms/mido/midifiles/units.py +46 -0
  30. mms_lib-0.1.0/src/mms/mido/parser.py +103 -0
  31. mms_lib-0.1.0/src/mms/mido/tokenizer.py +101 -0
  32. mms_lib-0.1.0/src/mms/mido/version.py +22 -0
  33. mms_lib-0.1.0/src/mms/tools.py +27 -0
  34. mms_lib-0.1.0/src/mms_lib.egg-info/PKG-INFO +54 -0
  35. mms_lib-0.1.0/src/mms_lib.egg-info/SOURCES.txt +37 -0
  36. mms_lib-0.1.0/src/mms_lib.egg-info/dependency_links.txt +1 -0
  37. mms_lib-0.1.0/src/mms_lib.egg-info/entry_points.txt +2 -0
  38. mms_lib-0.1.0/src/mms_lib.egg-info/requires.txt +1 -0
  39. mms_lib-0.1.0/src/mms_lib.egg-info/top_level.txt +1 -0
mms_lib-0.1.0/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT No Attribution
2
+
3
+ Copyright 2025 MRDXHMAGIC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
mms_lib-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.4
2
+ Name: mms-lib
3
+ Version: 0.1.0
4
+ Summary: Extract from MIDI-MCSTRUCTURE NEXT Project
5
+ Requires-Python: >=3.14
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: packaging
9
+ Dynamic: license-file
10
+
11
+ # MMS Convertor SDK
12
+
13
+ Extract from MIDI-MCSTRUCTURE NEXT Project
14
+
15
+ ### Fast Start
16
+
17
+ ```python
18
+ import mms
19
+ import json
20
+
21
+ mms.init()
22
+
23
+ with open("example.mid", "rb") as io:
24
+ midi_data = io.read()
25
+
26
+ for time, command in mms.convertor(midi_data, "new_bedrock"):
27
+ print(time, command)
28
+ ```
29
+
30
+ ### Advance Usage
31
+
32
+ ```python
33
+ import mms
34
+ import json
35
+
36
+ mms.init()
37
+
38
+ with open("example.mid", "rb") as io:
39
+ midi_data = io.read()
40
+
41
+ mms.profile.settings.command_type = 1
42
+ mms.profile.settings.compression_level = 3
43
+
44
+ json_data = {}
45
+ for time, data in mms.read_midi(midi_data, mms.profile.profile["new_bedrock"]).items():
46
+ if str(time) not in json_data:
47
+ json_data[str(time)] = []
48
+
49
+ for i in data:
50
+ json_data[str(time)].append(i.dump(False))
51
+
52
+ with open("example.json", "w", encoding="utf-8") as io:
53
+ json.dump(json_data, io, indent=2)
54
+ ```
@@ -0,0 +1,44 @@
1
+ # MMS Convertor SDK
2
+
3
+ Extract from MIDI-MCSTRUCTURE NEXT Project
4
+
5
+ ### Fast Start
6
+
7
+ ```python
8
+ import mms
9
+ import json
10
+
11
+ mms.init()
12
+
13
+ with open("example.mid", "rb") as io:
14
+ midi_data = io.read()
15
+
16
+ for time, command in mms.convertor(midi_data, "new_bedrock"):
17
+ print(time, command)
18
+ ```
19
+
20
+ ### Advance Usage
21
+
22
+ ```python
23
+ import mms
24
+ import json
25
+
26
+ mms.init()
27
+
28
+ with open("example.mid", "rb") as io:
29
+ midi_data = io.read()
30
+
31
+ mms.profile.settings.command_type = 1
32
+ mms.profile.settings.compression_level = 3
33
+
34
+ json_data = {}
35
+ for time, data in mms.read_midi(midi_data, mms.profile.profile["new_bedrock"]).items():
36
+ if str(time) not in json_data:
37
+ json_data[str(time)] = []
38
+
39
+ for i in data:
40
+ json_data[str(time)].append(i.dump(False))
41
+
42
+ with open("example.json", "w", encoding="utf-8") as io:
43
+ json.dump(json_data, io, indent=2)
44
+ ```
@@ -0,0 +1,23 @@
1
+ [project]
2
+ name = "mms-lib"
3
+ version = "0.1.0"
4
+ description = "Extract from MIDI-MCSTRUCTURE NEXT Project"
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ dependencies = [
8
+ "packaging",
9
+ ]
10
+
11
+ [project.scripts]
12
+ mms = "mms.cli:main"
13
+
14
+ [build-system]
15
+ requires = ["setuptools>=64", "wheel"]
16
+ build-backend = "setuptools.build_meta"
17
+
18
+ [tool.setuptools.packages.find]
19
+ where = ["src"]
20
+
21
+ [tool.setuptools.package-data]
22
+ mms = ["assets/**/*"]
23
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,5 @@
1
+ from .core import init, read_midi, convertor, profile
2
+ from .dataclass import Settings, Note, Lyrics
3
+
4
+ __all__ = ["init", "read_midi", "convertor", "profile", "Note", "Lyrics", "Settings"]
5
+ __version__ = "0.1.0"
@@ -0,0 +1,58 @@
1
+ {
2
+ "undefined": [],
3
+ "16": ["linear_note"],
4
+ "17": ["linear_note"],
5
+ "18": ["linear_note"],
6
+ "19": ["linear_note"],
7
+ "20": ["linear_note"],
8
+ "21": ["linear_note"],
9
+ "22": ["linear_note"],
10
+ "23": ["linear_note"],
11
+ "56": ["linear_note"],
12
+ "57": ["linear_note"],
13
+ "58": ["linear_note"],
14
+ "59": ["linear_note"],
15
+ "60": ["linear_note"],
16
+ "61": ["linear_note"],
17
+ "62": ["linear_note"],
18
+ "63": ["linear_note"],
19
+ "64": ["linear_note"],
20
+ "65": ["linear_note"],
21
+ "66": ["linear_note"],
22
+ "67": ["linear_note"],
23
+ "68": ["linear_note"],
24
+ "69": ["linear_note"],
25
+ "71": ["linear_note"],
26
+ "72": ["linear_note"],
27
+ "73": ["linear_note"],
28
+ "74": ["linear_note"],
29
+ "75": ["linear_note"],
30
+ "76": ["linear_note"],
31
+ "77": ["linear_note"],
32
+ "78": ["linear_note"],
33
+ "79": ["linear_note"],
34
+ "80": ["linear_note"],
35
+ "81": ["linear_note"],
36
+ "82": ["linear_note"],
37
+ "83": ["linear_note"],
38
+ "84": ["linear_note"],
39
+ "85": ["linear_note"],
40
+ "86": ["linear_note"],
41
+ "87": ["linear_note"],
42
+ "88": ["linear_note"],
43
+ "89": ["linear_note"],
44
+ "90": ["linear_note"],
45
+ "91": ["linear_note"],
46
+ "92": ["linear_note"],
47
+ "93": ["linear_note"],
48
+ "94": ["linear_note"],
49
+ "95": ["linear_note"],
50
+ "105": ["linear_note"],
51
+ "109": ["linear_note"],
52
+ "110": ["linear_note"],
53
+ "124": ["linear_note"],
54
+ "612": ["linear_note"],
55
+ "percussion": {
56
+ "undefined": []
57
+ }
58
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "undefined": "harp",
3
+ "default": "harp",
4
+ "0": "harp",
5
+ "1": "pling",
6
+ "2": "pling",
7
+ "6": "guitar",
8
+ "7": "iron_xylophone",
9
+ "8": "iron_xylophone",
10
+ "9": "bell",
11
+ "10": "bell",
12
+ "11": "iron_xylophone",
13
+ "12": "iron_xylophone",
14
+ "13": "xylophone",
15
+ "14": "chime",
16
+ "16": "flute",
17
+ "17": "flute",
18
+ "18": "flute",
19
+ "19": "flute",
20
+ "20": "flute",
21
+ "21": "flute",
22
+ "22": "flute",
23
+ "23": "flute",
24
+ "24": "guitar",
25
+ "25": "guitar",
26
+ "26": "guitar",
27
+ "27": "guitar",
28
+ "28": "guitar",
29
+ "29": "guitar",
30
+ "30": "bass",
31
+ "31": "bass",
32
+ "32": "bass",
33
+ "33": "guitar",
34
+ "34": "guitar",
35
+ "35": "bass",
36
+ "36": "bass",
37
+ "37": "bass",
38
+ "38": "bass",
39
+ "39": "bass",
40
+ "40": "flute",
41
+ "41": "flute",
42
+ "42": "flute",
43
+ "43": "didgeridoo",
44
+ "45": "pling",
45
+ "46": "harp",
46
+ "47": "iron_xylophone",
47
+ "48": "flute",
48
+ "49": "flute",
49
+ "50": "flute",
50
+ "51": "flute",
51
+ "52": "didgeridoo",
52
+ "53": "flute",
53
+ "54": "flute",
54
+ "55": "orchestra_hit",
55
+ "56": "trumpet",
56
+ "57": "trombone",
57
+ "58": "tuba",
58
+ "59": "trumpet",
59
+ "60": "french_horn",
60
+ "61": "flute",
61
+ "62": "flute",
62
+ "63": "flute",
63
+ "64": "flute",
64
+ "65": "guitar",
65
+ "66": "bass",
66
+ "67": "didgeridoo",
67
+ "68": "flute",
68
+ "69": "flute",
69
+ "70": "didgeridoo",
70
+ "71": "flute",
71
+ "72": "flute",
72
+ "73": "flute",
73
+ "74": "flute",
74
+ "75": "flute",
75
+ "76": "flute",
76
+ "77": "banjo",
77
+ "78": "flute",
78
+ "79": "flute",
79
+ "80": "bit",
80
+ "81": "bit",
81
+ "82": "bit",
82
+ "83": "bit",
83
+ "84": "bit",
84
+ "85": "flute",
85
+ "86": "flute",
86
+ "87": "orchestra_hit",
87
+ "88": "banjo",
88
+ "89": "flute",
89
+ "90": "bit",
90
+ "91": "orchestra_hit",
91
+ "92": "didgeridoo",
92
+ "93": "iron_xylophone",
93
+ "94": "bit",
94
+ "95": "bit",
95
+ "96": "rain",
96
+ "98": "crystal",
97
+ "105": "banjo",
98
+ "108": "xylophone",
99
+ "109": "flute",
100
+ "110": "flute",
101
+ "111": "flute",
102
+ "112": "cow_bell",
103
+ "114": "hat",
104
+ "115": "xylophone",
105
+ "116": "base_drum",
106
+ "117": "snare",
107
+ "118": "snare",
108
+ "119": "cymbal",
109
+ "123": "parrot",
110
+ "124": "telephone_ring",
111
+ "125": "helicopter",
112
+ "126": "hat",
113
+ "127": "gun",
114
+ "612": "trumpet",
115
+ "percussion": {
116
+ "undefined": "cymbal",
117
+ "31": "hat",
118
+ "33": "snare",
119
+ "34": "hat",
120
+ "35": "base_drum",
121
+ "36": "snare",
122
+ "37": "hat",
123
+ "38": "hat",
124
+ "39": "hat",
125
+ "40": "hat",
126
+ "41": "base_drum",
127
+ "42": "closed_cymbal",
128
+ "43": "hat",
129
+ "44": "pedal_cymbal",
130
+ "45": "base_drum",
131
+ "46": "open_cymbal",
132
+ "47": "snare",
133
+ "48": "hat",
134
+ "50": "hat",
135
+ "56": "cow_bell",
136
+ "69": "cabasa",
137
+ "82": "shaker",
138
+ "83": "bell",
139
+ "84": "bell"
140
+ }
141
+ }