subsequence 0.6.4__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.
Files changed (78) hide show
  1. subsequence/__init__.py +231 -0
  2. subsequence/__main__.py +24 -0
  3. subsequence/assets/web/index.html +345 -0
  4. subsequence/cadences.py +113 -0
  5. subsequence/chord_graphs/__init__.py +100 -0
  6. subsequence/chord_graphs/aeolian_minor.py +158 -0
  7. subsequence/chord_graphs/chromatic_mediant.py +113 -0
  8. subsequence/chord_graphs/diminished.py +97 -0
  9. subsequence/chord_graphs/dorian_minor.py +127 -0
  10. subsequence/chord_graphs/functional_major.py +102 -0
  11. subsequence/chord_graphs/hooktheory_major.py +88 -0
  12. subsequence/chord_graphs/lydian_major.py +130 -0
  13. subsequence/chord_graphs/mixolydian.py +98 -0
  14. subsequence/chord_graphs/phrygian_minor.py +76 -0
  15. subsequence/chord_graphs/suspended.py +109 -0
  16. subsequence/chord_graphs/turnaround_global.py +157 -0
  17. subsequence/chord_graphs/whole_tone.py +77 -0
  18. subsequence/chords.py +419 -0
  19. subsequence/composition.py +6099 -0
  20. subsequence/conductor.py +238 -0
  21. subsequence/constants/__init__.py +24 -0
  22. subsequence/constants/durations.py +37 -0
  23. subsequence/constants/instruments/__init__.py +13 -0
  24. subsequence/constants/instruments/gm_cc.py +46 -0
  25. subsequence/constants/instruments/gm_drums.py +53 -0
  26. subsequence/constants/instruments/gm_instruments.py +32 -0
  27. subsequence/constants/instruments/roland_tr8s.py +320 -0
  28. subsequence/constants/instruments/vermona_drm1_drums.py +87 -0
  29. subsequence/constants/midi_notes.py +29 -0
  30. subsequence/constants/pulses.py +17 -0
  31. subsequence/constants/velocity.py +22 -0
  32. subsequence/definitions.py +232 -0
  33. subsequence/display.py +617 -0
  34. subsequence/easing.py +347 -0
  35. subsequence/event_emitter.py +109 -0
  36. subsequence/form_state.py +665 -0
  37. subsequence/forms.py +257 -0
  38. subsequence/groove.py +323 -0
  39. subsequence/harmonic_rhythm.py +83 -0
  40. subsequence/harmonic_state.py +352 -0
  41. subsequence/harmony.py +197 -0
  42. subsequence/held_notes.py +91 -0
  43. subsequence/helpers/__init__.py +0 -0
  44. subsequence/helpers/network.py +58 -0
  45. subsequence/helpers/wing.py +430 -0
  46. subsequence/intervals.py +436 -0
  47. subsequence/keystroke.py +249 -0
  48. subsequence/link_clock.py +128 -0
  49. subsequence/live_client.py +187 -0
  50. subsequence/live_reloader.py +298 -0
  51. subsequence/live_server.py +161 -0
  52. subsequence/melodic_state.py +483 -0
  53. subsequence/midi.py +97 -0
  54. subsequence/midi_utils.py +329 -0
  55. subsequence/mini_notation.py +164 -0
  56. subsequence/motifs.py +2356 -0
  57. subsequence/osc.py +194 -0
  58. subsequence/pattern.py +363 -0
  59. subsequence/pattern_algorithmic.py +2010 -0
  60. subsequence/pattern_builder.py +2589 -0
  61. subsequence/pattern_midi.py +1208 -0
  62. subsequence/progressions.py +1913 -0
  63. subsequence/py.typed +0 -0
  64. subsequence/roles.py +63 -0
  65. subsequence/sequence_utils.py +3123 -0
  66. subsequence/sequencer.py +2086 -0
  67. subsequence/tuning.py +453 -0
  68. subsequence/voicings.py +151 -0
  69. subsequence/web_ui.py +337 -0
  70. subsequence/weighted_graph.py +156 -0
  71. subsequence-0.6.4.dist-info/METADATA +208 -0
  72. subsequence-0.6.4.dist-info/RECORD +78 -0
  73. subsequence-0.6.4.dist-info/WHEEL +5 -0
  74. subsequence-0.6.4.dist-info/entry_points.txt +2 -0
  75. subsequence-0.6.4.dist-info/licenses/LICENSE +661 -0
  76. subsequence-0.6.4.dist-info/scm_file_list.json +193 -0
  77. subsequence-0.6.4.dist-info/scm_version.json +8 -0
  78. subsequence-0.6.4.dist-info/top_level.txt +1 -0
subsequence/py.typed ADDED
File without changes
subsequence/roles.py ADDED
@@ -0,0 +1,63 @@
1
+ """Role parameter bundles — starting points you splat, not a role API.
2
+
3
+ The design deliberately ships **no** role nouns (no ``p.bass()`` verb): a
4
+ "role" is just a small bundle of placement parameters a part usually wants,
5
+ kept as plain data so you splat and override it. Each bundle holds keyword
6
+ arguments shared by the placement surface — ``comp.phrase_part(...)`` and
7
+ ``p.motif(...)`` / ``p.phrase(...)`` (``root`` register anchor, ``velocity``,
8
+ and the chord-snapping ``fit`` dial):
9
+
10
+ ```python
11
+ import subsequence
12
+
13
+ comp.phrase_part(channel=2, part="bass", **subsequence.roles.BASS)
14
+ comp.phrase_part(channel=4, part="lead", **subsequence.roles.LEAD, root=78) # override root
15
+
16
+ @comp.pattern(channel=3, bars=2)
17
+ def pad (p):
18
+ p.motif(chords, **subsequence.roles.PAD)
19
+ ```
20
+
21
+ These are taste defaults, not rules — a bass usually sits low and locks to
22
+ chord tones (high ``fit``), a pad sits mid and floats (lower ``fit``). Change
23
+ any value freely; the bundle is a dict.
24
+ """
25
+
26
+ import typing
27
+
28
+
29
+ # A bass: low register, strong, locked hard to the chord tones.
30
+ BASS: typing.Dict[str, typing.Any] = {
31
+ "root": 36, # C2
32
+ "velocity": 105,
33
+ "fit": 0.9,
34
+ }
35
+
36
+ # A pad: mid register, soft, floating loosely over the changes.
37
+ PAD: typing.Dict[str, typing.Any] = {
38
+ "root": 60, # C4
39
+ "velocity": 70,
40
+ "fit": 0.6,
41
+ }
42
+
43
+ # A lead: upper register, present, playing against the changes.
44
+ LEAD: typing.Dict[str, typing.Any] = {
45
+ "root": 72, # C5
46
+ "velocity": 95,
47
+ "fit": 0.7,
48
+ }
49
+
50
+ # An arp: mid register, even and bright, free to wander between chord tones.
51
+ ARP: typing.Dict[str, typing.Any] = {
52
+ "root": 60, # C4
53
+ "velocity": 85,
54
+ "fit": 0.5,
55
+ }
56
+
57
+ # The bundles by name, for programmatic lookup.
58
+ ROLES: typing.Dict[str, typing.Dict[str, typing.Any]] = {
59
+ "bass": BASS,
60
+ "pad": PAD,
61
+ "lead": LEAD,
62
+ "arp": ARP,
63
+ }