Modules
Modules¶
Module: deluge_sample¶
Main classes representing Deluge Sample.
ModOp
¶
Bases: object
Represents a successful modification operation.
Attributes:
Name | Type | Description |
---|---|---|
operation |
str
|
str |
path |
str
|
file path |
instance |
Any
|
modified instance. |
Source code in deluge_card/deluge_sample.py
190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
Sample
¶
Bases: object
represents a sample file.
Attributes:
Name | Type | Description |
---|---|---|
path |
Path
|
Path object for the sample file. |
settings |
list[SampleSetting]
|
list of SampleSettings for this sample |
Source code in deluge_card/deluge_sample.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
SampleMoveOperation
¶
Bases: object
Represents a sample file move operation.
Attributes:
Name | Type | Description |
---|---|---|
old_path |
Path
|
original Path. |
new_path |
Path
|
new Path. |
sample |
Sample
|
sample instance. |
Source code in deluge_card/deluge_sample.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
do_move()
¶
Complete the move operation.
We expect the destination path to exist (much like regular mv) as this helps the end user avoid mistakes.
Source code in deluge_card/deluge_sample.py
146 147 148 149 150 151 152 153 154 |
|
SampleSetting
¶
Bases: object
represents a sample in the context of a DelugeXML file.
Attributes:
Name | Type | Description |
---|---|---|
xml_file |
deluge_xml.DelugeXML
|
object for the XML file (song, kit or synth). |
xml_path |
str
|
Xmlpath string locating the sample setting within the XML. |
Source code in deluge_card/deluge_sample.py
176 177 178 179 180 181 182 183 184 185 186 187 |
|
SettingElementUpdater
¶
Bases: object
Setting updater class.
Attributes:
Name | Type | Description |
---|---|---|
root_xml_path |
str
|
type or root node : /song/, /kit/, or /sound/. |
Source code in deluge_card/deluge_sample.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
update_settings(move_op)
¶
Update settings.
Source code in deluge_card/deluge_sample.py
51 52 53 54 55 56 57 58 59 |
|
modify_sample_kits(move_ops)
¶
Update kit XML elements.
Source code in deluge_card/deluge_sample.py
68 69 70 71 |
|
modify_sample_paths(root, samples, pattern, dest)
¶
Modify sample paths just as posix mv does.
Source code in deluge_card/deluge_sample.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
modify_sample_songs(move_ops)
¶
Update song XML elements.
Source code in deluge_card/deluge_sample.py
62 63 64 65 |
|
modify_sample_synths(move_ops)
¶
Update synth XML elements.
Source code in deluge_card/deluge_sample.py
74 75 76 77 |
|
mv_samples(root, samples, pattern, dest)
¶
Move samples, updating any affected XML files.
Source code in deluge_card/deluge_sample.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
validate_mv_dest(root, dest)
¶
Source code in deluge_card/deluge_sample.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
Module: deluge_song¶
Main classes representing a Deluge Song.
Credit & thanks to Jamie Faye ref https://github.com/jamiefaye/downrush/blob/master/xmlView/src/SongUtils.js
DelugeSong
¶
Bases: DelugeXml
Class representing song data on a DelugeCard (in SONGS/*.xml).
Attributes:
Name | Type | Description |
---|---|---|
cardfs |
DelugeCardFS
|
Card folder system containing this file. |
path |
Path
|
Path object for the sample file. file. |
Source code in deluge_card/deluge_song.py
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
kits()
property
¶
The kits defined in this song.
Source code in deluge_card/deluge_song.py
168 169 170 171 172 173 |
|
minimum_firmware()
¶
Get the songs earliest Compatible Firmware version.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
earliestCompatibleFirmware version. |
Source code in deluge_card/deluge_song.py
79 80 81 82 83 84 85 |
|
mode_notes()
¶
Get the notes in the song scale (mode).
Returns:
Type | Description |
---|---|
List[int]
|
[int]: list of mode intervals, relative to root. |
Source code in deluge_card/deluge_song.py
95 96 97 98 99 100 101 102 |
|
root_note()
¶
Get the root note.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
root note (e.g 36 for C3). |
Source code in deluge_card/deluge_song.py
87 88 89 90 91 92 93 |
|
scale()
¶
Get the song scale and key.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
scale name. |
Source code in deluge_card/deluge_song.py
116 117 118 119 120 121 122 123 124 |
|
scale_mode()
¶
Get the descriptive name of the song scale (mode).
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
scale_mode name. |
Source code in deluge_card/deluge_song.py
104 105 106 107 108 109 110 111 112 113 114 |
|
synths()
property
¶
The synths defined in this song.
Source code in deluge_card/deluge_song.py
161 162 163 164 165 166 |
|
tempo()
¶
Get the song tempo in beats per minute.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
tempo BPM. |
Javascript
Source code in deluge_card/deluge_song.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|
Kit
dataclass
¶
Describes a kit object.
Source code in deluge_card/deluge_song.py
44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
Mode
¶
Bases: enum.Enum
Enum for the scale modes.
Source code in deluge_card/deluge_song.py
32 33 34 35 36 37 38 39 40 41 |
|
Module: deluge_kit¶
Main class representing a Deluge Kit.
DelugeKit
¶
Bases: DelugeXml
Class representing kit data on a DelugeCard (in KITS/*.xml).
Attributes:
Name | Type | Description |
---|---|---|
cardfs |
DelugeCardFS
|
Card folder system containing this file. |
path |
Path
|
Path object for the sample file. file. |
Source code in deluge_card/deluge_kit.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
Module: deluge_synth¶
Main class representing a Deluge Synth.
DelugeSynth
¶
Bases: DelugeXml
Class representing a synth template on a DelugeCard (in SYNTHS/*.xml).
Attributes:
Name | Type | Description |
---|---|---|
cardfs |
DelugeCardFS
|
Card folder system containing this file. |
path |
Path
|
Path object for the sample file. file. |
Source code in deluge_card/deluge_synth.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
Module: deluge_xml¶
Base class for a Deluge XML file.
DelugeXml
¶
Class representing XML n a DelugeCard (in SONG|KIT|SYNTH xml).
Attributes:
Name | Type | Description |
---|---|---|
cardfs |
DelugeCardFS
|
Card folder system containing this file. |
path |
Path
|
Path object for the sample file. file. |
Source code in deluge_card/deluge_xml.py
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
samples(pattern='', allow_missing=False)
¶
Generator for samples referenced in the DelugeXML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pattern |
str
|
glob-style filename pattern. |
''
|
Yields:
Name | Type | Description |
---|---|---|
object |
Sample
|
the next sample object. |
Source code in deluge_card/deluge_xml.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
update_sample_element(xml_path, sample_path)
¶
Update XML element from sample_setting.
Source code in deluge_card/deluge_xml.py
68 69 70 71 72 73 74 75 76 77 78 |
|
write_xml(new_path=None)
¶
Write the song XML.
Source code in deluge_card/deluge_xml.py
80 81 82 83 84 85 |
|
read_and_clean_xml(xml_path)
¶
Strip illegal elements.
Source code in deluge_card/deluge_xml.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|