kitbash 1.0.1__py2.py3-none-any.whl

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.
@@ -0,0 +1,126 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>dlg_samples_explorer</class>
4
+ <widget class="QDialog" name="dlg_samples_explorer">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>482</width>
10
+ <height>344</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Samples Explorer</string>
15
+ </property>
16
+ <layout class="QVBoxLayout" name="verticalLayout">
17
+ <item>
18
+ <widget class="QSplitter" name="splitter">
19
+ <property name="orientation">
20
+ <enum>Qt::Horizontal</enum>
21
+ </property>
22
+ <property name="handleWidth">
23
+ <number>8</number>
24
+ </property>
25
+ <widget class="QTreeView" name="tree_files">
26
+ <property name="selectionMode">
27
+ <enum>QAbstractItemView::ExtendedSelection</enum>
28
+ </property>
29
+ </widget>
30
+ <widget class="QSplitter" name="right_splitter">
31
+ <property name="orientation">
32
+ <enum>Qt::Horizontal</enum>
33
+ </property>
34
+ <property name="handleWidth">
35
+ <number>8</number>
36
+ </property>
37
+ <widget class="QWidget" name="layoutWidget">
38
+ <layout class="QVBoxLayout" name="inst_layout">
39
+ <property name="spacing">
40
+ <number>3</number>
41
+ </property>
42
+ <item>
43
+ <widget class="QLabel" name="lbl2">
44
+ <property name="text">
45
+ <string>Instruments:</string>
46
+ </property>
47
+ </widget>
48
+ </item>
49
+ <item>
50
+ <widget class="QListWidget" name="lst_instruments"/>
51
+ </item>
52
+ </layout>
53
+ </widget>
54
+ <widget class="QWidget" name="layoutWidget">
55
+ <layout class="QVBoxLayout" name="samples_layout">
56
+ <property name="spacing">
57
+ <number>3</number>
58
+ </property>
59
+ <item>
60
+ <widget class="QLabel" name="lbl1">
61
+ <property name="text">
62
+ <string>Samples:</string>
63
+ </property>
64
+ </widget>
65
+ </item>
66
+ <item>
67
+ <widget class="QListWidget" name="lst_samples"/>
68
+ </item>
69
+ </layout>
70
+ </widget>
71
+ </widget>
72
+ </widget>
73
+ </item>
74
+ <item>
75
+ <widget class="QDialogButtonBox" name="button_box">
76
+ <property name="orientation">
77
+ <enum>Qt::Horizontal</enum>
78
+ </property>
79
+ <property name="standardButtons">
80
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
81
+ </property>
82
+ </widget>
83
+ </item>
84
+ </layout>
85
+ </widget>
86
+ <tabstops>
87
+ <tabstop>tree_files</tabstop>
88
+ <tabstop>lst_instruments</tabstop>
89
+ <tabstop>lst_samples</tabstop>
90
+ </tabstops>
91
+ <resources/>
92
+ <connections>
93
+ <connection>
94
+ <sender>button_box</sender>
95
+ <signal>accepted()</signal>
96
+ <receiver>dlg_samples_explorer</receiver>
97
+ <slot>accept()</slot>
98
+ <hints>
99
+ <hint type="sourcelabel">
100
+ <x>750</x>
101
+ <y>439</y>
102
+ </hint>
103
+ <hint type="destinationlabel">
104
+ <x>799</x>
105
+ <y>223</y>
106
+ </hint>
107
+ </hints>
108
+ </connection>
109
+ <connection>
110
+ <sender>button_box</sender>
111
+ <signal>rejected()</signal>
112
+ <receiver>dlg_samples_explorer</receiver>
113
+ <slot>reject()</slot>
114
+ <hints>
115
+ <hint type="sourcelabel">
116
+ <x>780</x>
117
+ <y>435</y>
118
+ </hint>
119
+ <hint type="destinationlabel">
120
+ <x>800</x>
121
+ <y>335</y>
122
+ </hint>
123
+ </hints>
124
+ </connection>
125
+ </connections>
126
+ </ui>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 16 16"><path d="M 12,8 6.75,11 1.5,14 l 0,-6 0,-6 5.25,3 z" transform="rotate(90, 8, 8)"/></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 16 16"><path d="M 12,8 6.75,11 1.5,14 l 0,-6 0,-6 5.25,3 z"/></svg>
Binary file
@@ -0,0 +1,97 @@
1
+ # kitbash/scripts/bash_project.py
2
+ #
3
+ # Copyright 2025 liyang <liyang@veronica>
4
+ #
5
+ """
6
+ Bash kit from the command line
7
+ """
8
+ import logging, argparse, sys, json
9
+ from log_soso import log_error
10
+ from sfzen.drumkits import Drumkit
11
+ from sfzen import (
12
+ SAMPLES_ABSPATH,
13
+ SAMPLES_RESOLVE,
14
+ SAMPLES_COPY,
15
+ SAMPLES_SYMLINK,
16
+ SAMPLES_HARDLINK
17
+ )
18
+
19
+
20
+ def main():
21
+ p = argparse.ArgumentParser()
22
+ p.add_argument('Project', type=str, help='Kitbash project to load')
23
+ p.add_argument('Target', type=str, nargs='?', help='Output .sfz filename')
24
+ group = p.add_mutually_exclusive_group()
25
+ group.add_argument("--abspath", "-a", action="store_true",
26
+ help='Point to the original samples - absolute path')
27
+ group.add_argument("--relative", "-r", action="store_true",
28
+ help='Point to the original samples - relative path')
29
+ group.add_argument("--copy", "-c", action="store_true",
30
+ help='Copy samples to the "./samples" folder')
31
+ group.add_argument("--symlink", "-s", action="store_true",
32
+ help='Create symlinks in the "./samples" folder')
33
+ group.add_argument("--hardlink", "-l", action="store_true",
34
+ help='Hardlink samples in the "./samples" folder')
35
+ p.add_argument("--dry-run", "-n", action="store_true",
36
+ help="Do not make changes - just show what would be changed.")
37
+ p.add_argument("--verbose", "-v", action="store_true",
38
+ help="Show more detailed debug information")
39
+ p.epilog = """
40
+ Compiles a kitbash project into a single .sfz
41
+ """
42
+ options = p.parse_args()
43
+ if not options.Target and not options.dry_run:
44
+ p.error('<Target> is required when not --dry-run')
45
+ log_level = logging.DEBUG if options.verbose else logging.ERROR
46
+ log_format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s"
47
+ logging.basicConfig(level = log_level, format = log_format)
48
+
49
+ try:
50
+ with open(options.Project, 'r', encoding = 'utf-8') as fh:
51
+ project_def = json.load(fh)
52
+ except FileNotFoundError:
53
+ p.exit(f'"{options.Project[0]}" is not a file')
54
+ except json.JSONDecodeError:
55
+ p.exit(f'There was an error decoding "{options.Project[0]}"')
56
+
57
+ bashed_kit = Drumkit()
58
+ for source_file, groups in project_def['drumkits'].items():
59
+ src = Drumkit(source_file)
60
+ for group_settings in groups.values():
61
+ for inst_id, used in group_settings['instruments'].items():
62
+ if used:
63
+ bashed_kit.import_instrument(inst_id, src)
64
+
65
+ if options.dry_run:
66
+ bashed_kit.write(sys.stdout)
67
+ else:
68
+ if options.abspath:
69
+ samples_mode = SAMPLES_ABSPATH
70
+ elif options.relative:
71
+ samples_mode = SAMPLES_RESOLVE
72
+ elif options.copy:
73
+ samples_mode = SAMPLES_COPY
74
+ elif options.symlink:
75
+ samples_mode = SAMPLES_SYMLINK
76
+ else:
77
+ samples_mode = SAMPLES_HARDLINK
78
+
79
+ try:
80
+ bashed_kit.save_as(options.Target, samples_mode)
81
+ except OSError as err:
82
+ if err.errno == 18:
83
+ print(f'Error {err}')
84
+ print('You probably tried to hardlink samples to a drive different from the one they are on.')
85
+ print('\nTry another sample mode:\n')
86
+ p.print_help()
87
+ else:
88
+ log_error(err)
89
+ except Exception as err:
90
+ log_error(err)
91
+
92
+
93
+ if __name__ == '__main__':
94
+ main()
95
+
96
+
97
+ # end kitbash/scripts/bash_project.py
@@ -0,0 +1,135 @@
1
+ QWidget, QPushButton, QMenu {
2
+ color: #404040;
3
+ }
4
+
5
+ QWidget:disabled, QPushButton:disabled {
6
+ color: #9C9C9C;
7
+ }
8
+
9
+ QPushButton {
10
+ background: #E8E8E8;
11
+ }
12
+
13
+ QLabel {
14
+ background: transparent;
15
+ }
16
+
17
+ QMenu {
18
+ background: #F0F0F0;
19
+ }
20
+
21
+ QMenu::item {
22
+ background: #F2F2F2;
23
+ }
24
+
25
+ QMenu::item:selected {
26
+ background: #D3E5F2;
27
+ }
28
+
29
+
30
+ QScrollBar:horizontal::groove{
31
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #BFC1C9, stop:.5 #CED0D9, stop:1 #D3D5DE);
32
+ }
33
+
34
+ QScrollBar:handle,
35
+ QScrollBar:add-line,
36
+ QScrollBar:sub-line {
37
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F8F9FA, stop:.5 #F0F1F2, stop:1 #E9EAEB);
38
+ border: 1px solid #BFC6D6;
39
+ }
40
+
41
+ DrumkitWidget {
42
+ margin: 4px;
43
+ }
44
+
45
+ DrumkitWidget QLabel {
46
+ color: #666;
47
+ font-size: 10pt;
48
+ margin-left: 8px;
49
+ }
50
+
51
+ DrumkitWidget QPushButton:disabled {
52
+ color: #888;
53
+ }
54
+
55
+ #frm_top {
56
+ background-color: #FAF5E6;
57
+ }
58
+
59
+ #frm_top QLabel {
60
+ }
61
+
62
+ DrumkitWidget GroupFrame {
63
+ background-color: #D7D9D8;
64
+ }
65
+
66
+ DrumkitWidget QPushButton {
67
+ font-family: 'Ubuntu', 'Liberation Sans', 'Bitstream Vera Sans', sans-serif;
68
+ }
69
+
70
+ DrumkitWidget GroupButton {
71
+ padding: 1.5px 7px;
72
+ font-weight: bold;
73
+ font-size: 13px;
74
+ }
75
+
76
+ DrumkitWidget GroupButton:checked {
77
+ background-color: #FFF5CF;
78
+ }
79
+
80
+ DrumkitWidget InstrumentButton {
81
+ border: none;
82
+ margin: 1px;
83
+ padding: 2px;
84
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FAFAFA, stop:1 #E8E8E8);
85
+ }
86
+
87
+ DrumkitWidget InstrumentButton:pressed {
88
+ background: #FABC48;
89
+ }
90
+
91
+ DrumkitWidget InstrumentButton:checked {
92
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #D9D9D9, stop:0.4 #EDEDED, stop:0.7 #F0F0F0, stop:1 #FCFCFC);
93
+ }
94
+
95
+ DrumkitWidget InstrumentButton QLabel {
96
+ font-size: 11px;
97
+ }
98
+
99
+ DrumkitWidget InstrumentButton QCheckBox {
100
+ padding: 8px 2px;
101
+ }
102
+
103
+ DrumkitWidget InstrumentButton QCheckBox::indicator {
104
+ height: 8px;
105
+ width: 8px;
106
+ border-width: 1px;
107
+ border-style: solid;
108
+ border-color: #FFFFFF;
109
+ background: #FFFFFF;
110
+ }
111
+
112
+ DrumkitWidget InstrumentButton QCheckBox::indicator:checked {
113
+ border-color: #705527;
114
+ background: #FFF9C3;
115
+ }
116
+
117
+
118
+
119
+
120
+ #frm_beats,
121
+ #frm_beats QSpinBox
122
+ {
123
+ background-color: #3B2A13;
124
+ }
125
+
126
+ #frm_beats QLabel {
127
+ color: #eee;
128
+ }
129
+
130
+ #frm_beats QSpinBox,
131
+ #frm_beats QLCDNumber
132
+ {
133
+ color: #EAF9CA;
134
+ }
135
+
@@ -0,0 +1,65 @@
1
+ #frm_controls QLabel {
2
+ color: #4D4D4D;
3
+ font-size: 10pt;
4
+ }
5
+
6
+ #frm_top QLabel {
7
+ color: #4D4D4D;
8
+ font-size: 10pt;
9
+ margin-left: 4px;
10
+ }
11
+
12
+ #frm_groups {
13
+ background: #7F7F7F;
14
+ }
15
+
16
+
17
+ DrumkitWidget {
18
+ margin: 2px;
19
+ }
20
+
21
+ DrumkitWidget GroupFrame {
22
+ margin-right: 1px;
23
+ }
24
+
25
+ DrumkitWidget GroupFrame QPushButton {
26
+ border: none;
27
+ margin-bottom: 1px;
28
+ }
29
+
30
+ DrumkitWidget GroupFrame QPushButton:checked {
31
+ color: #000000;
32
+ }
33
+
34
+ DrumkitWidget GroupButton {
35
+ padding: 1.5px 5px;
36
+ font-size: 10pt;
37
+ background: #D1D1BC;
38
+ }
39
+
40
+ DrumkitWidget GroupButton:checked {
41
+ background: #FAF7B9;
42
+ }
43
+
44
+ DrumkitWidget InstrumentButton {
45
+ background: #BCC4B9;
46
+ height: 16px;
47
+ }
48
+
49
+ DrumkitWidget InstrumentButton:checked {
50
+ background: #CDFAB9;
51
+ }
52
+
53
+ DrumkitWidget InstrumentButton:pressed {
54
+ background: #FABC48;
55
+ }
56
+
57
+ DrumkitWidget InstrumentButton QLabel {
58
+ font-size: 8.5pt;
59
+ padding: 1px 4px 1px 3px;
60
+ }
61
+
62
+ DrumkitWidget InstrumentButton QCheckBox {
63
+ padding: 2px 1px;
64
+ }
65
+
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: kitbash
3
+ Version: 1.0.1
4
+ Summary: kitbash is a program you can use to combine parts of various SFZ files into a
5
+ Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
6
+ Description-Content-Type: text/markdown
7
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
8
+ License-File: LICENSE
9
+ Requires-Dist: PyQt5
10
+ Requires-Dist: conn_jack
11
+ Requires-Dist: jack_audio_player
12
+ Requires-Dist: jack_midi_split
13
+ Requires-Dist: liquiphy
14
+ Requires-Dist: soundfile
15
+ Requires-Dist: sfzen
16
+ Requires-Dist: midi_notes
17
+ Requires-Dist: recent_items_list
18
+ Requires-Dist: soso_qt_extras >= 1.2.0
19
+ Project-URL: Home, https://github.com/Zen-Master-SoSo/kitbash
20
+
21
+ # KitBash
22
+
23
+ A GUI application which you can use to create a new .sfz drumkit from pieces of other drumkits.
24
+
25
+
@@ -0,0 +1,17 @@
1
+ kitbash/__init__.py,sha256=vh0bK5J6AQS8Vvjo1uxVn6e1KwdBfUUPMdz_RnnAQuQ,3517
2
+ kitbash/gui/__init__.py,sha256=MI_S0EHVyaWg4uGgcS8fWrVpO0cwgz4_VAxYhfcnteg,2980
3
+ kitbash/gui/main_window.py,sha256=MT6ETL9EJz-efWY28sMKCqVTNJbO86srn36Ni0OUYcI,41224
4
+ kitbash/gui/main_window.ui,sha256=V3J1-cV9FBVZVpQ_kZPYu8sLvRN-FN1Ir8gB_5AchW8,11745
5
+ kitbash/gui/samples_explorer.py,sha256=8Tr2J2d0Jf-E1vTt7ScZv7ARJxcxNZXUdswe_QUWmxc,7652
6
+ kitbash/gui/samples_explorer.ui,sha256=KX547s5wjy7ktW7Qx9psZRSZBQ8loaKyLgiZb3kOLHw,3264
7
+ kitbash/res/group_expanded.svg,sha256=eIFq_CjS5WxZrq4uoZz2d5SJ7QWrxFHfuVMlrHm0zp4,228
8
+ kitbash/res/group_hidden.svg,sha256=K8ae10xawPlNA4XsTjs72yXykB5I_GYxBJe0JsWn9eE,199
9
+ kitbash/res/kitbash-icon.png,sha256=kHbBS8FIVdp84hlNZ_3avSVy2JuL4SbtUxLCwBJgHxQ,21028
10
+ kitbash/scripts/bash_project.py,sha256=zeEgrKqwNBH5jakdPPzOuIjcRQNo-mXJZHFkt1tkCFU,3070
11
+ kitbash/styles/light.css,sha256=TctuRDwFBBIos8xK73iJ7ZCSBIqTUJYxw3DQ095kgKI,2170
12
+ kitbash/styles/system.css,sha256=dwFq4wUAHQ0tUPaobuhrxR1NNEmGLCcP_GzwNVnqS90,916
13
+ kitbash-1.0.1.dist-info/entry_points.txt,sha256=8sRZnFmo4oBuDyarxD0DOd0thpEFSPmp-N9ef2i6ZCA,81
14
+ kitbash-1.0.1.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
15
+ kitbash-1.0.1.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
16
+ kitbash-1.0.1.dist-info/METADATA,sha256=JNKoPhMCMnHszZFvzhJ7bj8eXYZq_LcGjWV8gLG_KOQ,789
17
+ kitbash-1.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: flit 3.12.0
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ kitbash=kitbash:main
3
+ kitcmd=kitbash.scripts.bash_project:main
4
+