Spaces:
Configuration error
Configuration error
Upload _NoteData.py
Browse files- _NoteData.py +14 -0
_NoteData.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
class NoteData:
|
2 |
+
|
3 |
+
def __init__(self, value=None, duration=None, isDotted=None, palmMute=False):
|
4 |
+
self.value = value
|
5 |
+
self.duration = duration
|
6 |
+
self.isDotted = isDotted
|
7 |
+
self.palmMute = palmMute
|
8 |
+
|
9 |
+
def as_tuple(self):
|
10 |
+
return (self.value, self.duration, self.isDotted, self.palmMute)
|
11 |
+
|
12 |
+
def __str__(self):
|
13 |
+
return f"{self.value},\t{'dotted ' if self.isDotted else ''} 1/{int(self.duration)}, {'muted' if self.palmMute else ''}"
|
14 |
+
|