chord-progression-network 0.1.4__tar.gz → 0.1.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chord_progression_network
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Network transition chord progressions
5
5
  Author-email: Gene Boggs <gene.boggs@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -753,7 +753,7 @@ g = Generator( # defaults
753
753
  phrase = g.generate()
754
754
  ```
755
755
 
756
- ## MUSICAL EXAMPLE
756
+ ## MUSICAL EXAMPLES
757
757
  ```python
758
758
  from music21 import chord, stream
759
759
  from chord_progression_network import Generator
@@ -771,3 +771,31 @@ s.append(p)
771
771
 
772
772
  s.show()
773
773
  ```
774
+
775
+ ```python
776
+ from music21 import chord, duration, stream
777
+ from chord_progression_network import Generator
778
+ from random_rhythms import Rhythm
779
+
780
+ r = Rhythm(
781
+ durations: [ 1/2, 1/3, 1, 3/2, 2 ],
782
+ groups={1/3: 3, 1/2: 2},
783
+ )
784
+ motifs = [ r.motif() for _ in range(4) ]
785
+ print(motifs)
786
+
787
+ s = stream.Score()
788
+ p = stream.Part()
789
+
790
+ for m in motifs:
791
+ g = Generator(max=len(m))
792
+ phrase = g.generate()
793
+ for i, d in enumerate(m):
794
+ c = chord.Chord(phrase[i])
795
+ c.duration = duration.Duration(d)
796
+ p.append(c)
797
+
798
+ s.append(p)
799
+
800
+ s.show()
801
+ ```
@@ -55,7 +55,7 @@ g = Generator( # defaults
55
55
  phrase = g.generate()
56
56
  ```
57
57
 
58
- ## MUSICAL EXAMPLE
58
+ ## MUSICAL EXAMPLES
59
59
  ```python
60
60
  from music21 import chord, stream
61
61
  from chord_progression_network import Generator
@@ -71,5 +71,33 @@ for notes in phrase:
71
71
 
72
72
  s.append(p)
73
73
 
74
+ s.show()
75
+ ```
76
+
77
+ ```python
78
+ from music21 import chord, duration, stream
79
+ from chord_progression_network import Generator
80
+ from random_rhythms import Rhythm
81
+
82
+ r = Rhythm(
83
+ durations: [ 1/2, 1/3, 1, 3/2, 2 ],
84
+ groups={1/3: 3, 1/2: 2},
85
+ )
86
+ motifs = [ r.motif() for _ in range(4) ]
87
+ print(motifs)
88
+
89
+ s = stream.Score()
90
+ p = stream.Part()
91
+
92
+ for m in motifs:
93
+ g = Generator(max=len(m))
94
+ phrase = g.generate()
95
+ for i, d in enumerate(m):
96
+ c = chord.Chord(phrase[i])
97
+ c.duration = duration.Duration(d)
98
+ p.append(c)
99
+
100
+ s.append(p)
101
+
74
102
  s.show()
75
103
  ```
@@ -1,4 +1,4 @@
1
1
  # The root of the entire project
2
2
  from chord_progression_network.chord_progression_network import Generator
3
3
 
4
- __version__ = "0.1.4"
4
+ __version__ = "0.1.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chord_progression_network
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Network transition chord progressions
5
5
  Author-email: Gene Boggs <gene.boggs@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -753,7 +753,7 @@ g = Generator( # defaults
753
753
  phrase = g.generate()
754
754
  ```
755
755
 
756
- ## MUSICAL EXAMPLE
756
+ ## MUSICAL EXAMPLES
757
757
  ```python
758
758
  from music21 import chord, stream
759
759
  from chord_progression_network import Generator
@@ -771,3 +771,31 @@ s.append(p)
771
771
 
772
772
  s.show()
773
773
  ```
774
+
775
+ ```python
776
+ from music21 import chord, duration, stream
777
+ from chord_progression_network import Generator
778
+ from random_rhythms import Rhythm
779
+
780
+ r = Rhythm(
781
+ durations: [ 1/2, 1/3, 1, 3/2, 2 ],
782
+ groups={1/3: 3, 1/2: 2},
783
+ )
784
+ motifs = [ r.motif() for _ in range(4) ]
785
+ print(motifs)
786
+
787
+ s = stream.Score()
788
+ p = stream.Part()
789
+
790
+ for m in motifs:
791
+ g = Generator(max=len(m))
792
+ phrase = g.generate()
793
+ for i, d in enumerate(m):
794
+ c = chord.Chord(phrase[i])
795
+ c.duration = duration.Duration(d)
796
+ p.append(c)
797
+
798
+ s.append(p)
799
+
800
+ s.show()
801
+ ```