music-melodicdevice 0.1.0__py3-none-any.whl → 0.1.2__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.
- music_melodicdevice/__init__.py +1 -1
- music_melodicdevice/music_melodicdevice.py +0 -4
- {music_melodicdevice-0.1.0.dist-info → music_melodicdevice-0.1.2.dist-info}/METADATA +44 -3
- music_melodicdevice-0.1.2.dist-info/RECORD +8 -0
- music_melodicdevice-0.1.0.dist-info/RECORD +0 -8
- {music_melodicdevice-0.1.0.dist-info → music_melodicdevice-0.1.2.dist-info}/WHEEL +0 -0
- {music_melodicdevice-0.1.0.dist-info → music_melodicdevice-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {music_melodicdevice-0.1.0.dist-info → music_melodicdevice-0.1.2.dist-info}/top_level.txt +0 -0
music_melodicdevice/__init__.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
import sys
|
2
2
|
sys.path.append('./src')
|
3
3
|
import music_melodicdevice.musical_scales as musical_scales
|
4
|
-
from typing import List, Tuple, Optional, Union
|
5
|
-
|
6
|
-
# TICKS = 96
|
7
|
-
# OCTAVES = 10
|
8
4
|
|
9
5
|
class Device:
|
10
6
|
def __init__(self, scale_note='C', scale_name='chromatic', notes=[], verbose=0):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: music_melodicdevice
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Apply chromatic and diatonic transformations to music notes
|
5
5
|
Author-email: Gene Boggs <gene.boggs@gmail.com>
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
@@ -816,11 +816,52 @@ Return a list of three notes in place of the given `pitch` and `duration`.
|
|
816
816
|
notes = device.slide(duration, from_pitch, to_pitch)
|
817
817
|
```
|
818
818
|
|
819
|
-
Return a list of chromatic notes inclusively between the `from_pitch` and `to_pitch`, in place of the given `
|
819
|
+
Return a list of chromatic notes inclusively between the `from_pitch` and `to_pitch`, in place of the given `duration`.
|
820
820
|
|
821
821
|
## MUSICAL EXAMPLES
|
822
822
|
```python
|
823
|
-
|
823
|
+
from music21 import duration, note, stream
|
824
|
+
from music_melodicdevice import Device
|
825
|
+
|
826
|
+
device = Device(notes=['C4', 'E4', 'D4', 'G4'])
|
827
|
+
notes = device.invert('C5')
|
828
|
+
|
829
|
+
s = stream.Stream()
|
830
|
+
p = stream.Part()
|
831
|
+
|
832
|
+
for i in device.notes + notes:
|
833
|
+
n = note.Note(i)
|
834
|
+
n.duration = duration.Duration(1)
|
835
|
+
p.append(n)
|
836
|
+
|
837
|
+
s.append(p)
|
838
|
+
s.show()
|
839
|
+
```
|
840
|
+
```python
|
841
|
+
notes = ['C4', 'E4', 'D4', 'G4']
|
842
|
+
|
843
|
+
device = Device(scale_name='major')
|
844
|
+
device.notes = notes
|
845
|
+
device.notes = device.invert('C5')
|
846
|
+
device.notes = device.transpose(-5)
|
847
|
+
|
848
|
+
s = stream.Stream()
|
849
|
+
p = stream.Part()
|
850
|
+
|
851
|
+
for i,j in enumerate(notes + device.notes):
|
852
|
+
if (i + 1) % 4 == 0:
|
853
|
+
turn = device.turn(1, j)
|
854
|
+
for t in turn:
|
855
|
+
m = note.Note(t[1])
|
856
|
+
m.duration = duration.Duration(t[0])
|
857
|
+
p.append(m)
|
858
|
+
else:
|
859
|
+
n = note.Note(j)
|
860
|
+
n.duration = duration.Duration(1)
|
861
|
+
p.append(n)
|
862
|
+
|
863
|
+
s.append(p)
|
864
|
+
s.show()
|
824
865
|
```
|
825
866
|
|
826
867
|
# SEE ALSO
|
@@ -0,0 +1,8 @@
|
|
1
|
+
music_melodicdevice/__init__.py,sha256=YlaqH0Eo4pwlaN_tmXYo5V_T5k5MyeiLlm7-p-gFV8A,115
|
2
|
+
music_melodicdevice/music_melodicdevice.py,sha256=me8WI4xvwfOq-P4HCOAxCooAbPDsVmW_UCzN2rrLGC4,4819
|
3
|
+
music_melodicdevice/musical_scales.py,sha256=mY0ArbuQA2FhKTkw14OyNJb7yLcF7_DeXD_XanNPp0g,6996
|
4
|
+
music_melodicdevice-0.1.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
5
|
+
music_melodicdevice-0.1.2.dist-info/METADATA,sha256=91HWkqQuJ6MSg8XPWhvRK2gmDowjz6DPNTgFLXgVB68,46765
|
6
|
+
music_melodicdevice-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
music_melodicdevice-0.1.2.dist-info/top_level.txt,sha256=Ui6mflCpkpa1x0vYbMRlXaE8W0qQeFzYljEgOSen0rY,20
|
8
|
+
music_melodicdevice-0.1.2.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
music_melodicdevice/__init__.py,sha256=C3tmQwHXnoOMSopDKVIZMdTQd1CAn6qU7x_LZnr5kks,115
|
2
|
-
music_melodicdevice/music_melodicdevice.py,sha256=LcaGMGGmUZDlbafCVeu3vTn2ba-GyZL6gMslz2MDlVw,4896
|
3
|
-
music_melodicdevice/musical_scales.py,sha256=mY0ArbuQA2FhKTkw14OyNJb7yLcF7_DeXD_XanNPp0g,6996
|
4
|
-
music_melodicdevice-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
5
|
-
music_melodicdevice-0.1.0.dist-info/METADATA,sha256=kle7jkFeCxMesEWTgtGpQD6LLtZGDBXchGUOqeDR4gs,45892
|
6
|
-
music_melodicdevice-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
music_melodicdevice-0.1.0.dist-info/top_level.txt,sha256=Ui6mflCpkpa1x0vYbMRlXaE8W0qQeFzYljEgOSen0rY,20
|
8
|
-
music_melodicdevice-0.1.0.dist-info/RECORD,,
|
File without changes
|
{music_melodicdevice-0.1.0.dist-info → music_melodicdevice-0.1.2.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|