musa-dsl 0.42.7 → 0.43.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08cad9ebc734d1e470cbf691738f1f08b9042796a4cf01adadb0bb2d126ef121'
4
- data.tar.gz: f5b9a5ec33e63d511507fa27f42f64b7b126e9104c0d14c747c95445f953dc13
3
+ metadata.gz: d4255273d1d071bd791ad11b5da8cd3e452442c2ec5bc78aed0f594968589a79
4
+ data.tar.gz: 8814fbd0fa803dd30f1aaad76a0b4843f008065db1533bef87872fccf1cf8e9c
5
5
  SHA512:
6
- metadata.gz: 6ca2b3741c4d4d83bf3318efe27a30b4730a9a2664ec3a5a8ad8d64f54a71697ee3b119d6ecbbfc61b2f2f4a800d516c5f857d55a012611afa4ab6f120f0ca7a
7
- data.tar.gz: e0956d3b3593c171e22ebf448182655f3e754bef2af495e96fbff4a096c8c0511d937cc5732f6d57d1ec7b0ea9d3bbd01c79bf1732c7ed06dd3d8965361f300f
6
+ metadata.gz: 61b3eb793d334844822636e2d8597c86dee2f353170d215328bf6dfc1be4aa24fdbe96c830584de377d99472d2259ef75a804f3c564fa5785f2430a14c1805a2
7
+ data.tar.gz: 7616c2dd4e24bf46714a64d48690d81989fa8ed41d99972f7c0aa2164607c8e72bf7fcd57b20963eed38d56420e889cd3421135d79df11d35464f2b2b1637005
data/README.md CHANGED
@@ -41,39 +41,6 @@ Musa-DSL is a programming language DSL (Domain-Specific Language) based on Ruby
41
41
 
42
42
  VSCode with the Ruby LSP extension also works well, though Ruby autocomplete and hover documentation are less complete.
43
43
 
44
- ### AI Composition Assistant: Claude Code Plugin
45
-
46
- The fastest way to learn and compose with MusaDSL is through **[Nota](https://github.com/javier-sy/nota-plugin-for-claude)** — a plugin for [Claude Code](https://claude.ai/code) that provides:
47
-
48
- - **`/nota:explain`** — Ask any question about MusaDSL and get sourced answers with working code examples
49
- - **`/nota:think`** — Creative ideation across multiple musical dimensions
50
- - **`/nota:code`** — Describe your musical intention in natural language and get verified MusaDSL code
51
- - **`/nota:analyze`** — Structured analysis of your compositions
52
- - **`/nota:best-practices`** — Consolidate recurring patterns into searchable best practices
53
-
54
- The plugin includes a semantic knowledge base covering all MusaDSL documentation, API reference, 22+ demo projects, and 12 built-in composition best practices. Your compositions, analyses, and practices become searchable knowledge that enriches future sessions.
55
-
56
- **Requirements:** [Ruby 3.4+](https://www.ruby-lang.org/) and a [Voyage AI](https://dash.voyageai.com/) API key (free tier is sufficient for personal use).
57
-
58
- **Install in Claude Code:**
59
-
60
- First, add the Nota marketplace:
61
- ```
62
- /plugin marketplace add javier-sy/nota-plugin-for-claude
63
- ```
64
-
65
- Then install the plugin:
66
- ```
67
- /plugin install nota@yeste.studio
68
- ```
69
-
70
- Then add your Voyage AI API key to your shell profile:
71
- ```
72
- export VOYAGE_API_KEY="your-key-here"
73
- ```
74
-
75
- Run `/nota:setup` to verify the installation.
76
-
77
44
  ### Framework Installation
78
45
 
79
46
  Add to your Gemfile:
@@ -126,19 +93,12 @@ MusaDSL is a comprehensive ecosystem consisting of a core framework (musa-dsl) a
126
93
  **Core Framework:**
127
94
  - [**musa-dsl**](https://github.com/javier-sy/musa-dsl) - Main DSL framework for algorithmic composition and musical thinking
128
95
 
129
- **MIDI Communication Stack:**
96
+ **MIDI Communication Stack** (used internally by musa-dsl for MIDI I/O):
130
97
  - [**midi-events**](https://github.com/javier-sy/midi-events) - Low-level MIDI event definitions and protocols
131
98
  - [**midi-parser**](https://github.com/javier-sy/midi-parser) - MIDI file parsing and analysis
132
99
  - [**midi-communications**](https://github.com/javier-sy/midi-communications) - Cross-platform MIDI I/O abstraction layer
133
100
  - [**midi-communications-macos**](https://github.com/javier-sy/midi-communications-macos) - macOS-specific MIDI native implementation
134
101
 
135
- **Live Coding Environment (MusaLCE):**
136
- - [**musalce-server**](https://github.com/javier-sy/musalce-server) - Live coding evaluation server with hot-reload capabilities
137
- - [**MusaLCEClientForVSCode**](https://github.com/javier-sy/MusaLCEClientForVSCode) - Visual Studio Code extension for live coding
138
- - [**MusaLCEClientForAtom**](https://github.com/javier-sy/MusaLCEClientForAtom) - Atom editor plugin for live coding
139
- - [**MusaLCEforBitwig**](https://github.com/javier-sy/MusaLCEforBitwig) - Bitwig Studio integration for live coding
140
- - [**MusaLCEforLive**](https://github.com/javier-sy/MusaLCEforLive) - Ableton Live integration for live coding
141
-
142
102
  ### musa-dsl Internal Architecture
143
103
 
144
104
  The musa-dsl framework is organized in modular layers:
@@ -273,7 +233,7 @@ Comprehensive MusicXML score generation with hierarchical structure, multiple vo
273
233
 
274
234
  ### REPL - Live Coding Infrastructure
275
235
 
276
- TCP-based server for live coding with MusaLCE clients (VSCode, Atom, Bitwig, Live), real-time code evaluation and error handling.
236
+ TCP-based server for live coding real-time code evaluation and error handling. Consumed by external REPL clients (editor extensions, custom evaluators).
277
237
 
278
238
  **📖 [Complete Documentation](docs/subsystems/repl.md)**
279
239
 
@@ -283,6 +243,16 @@ Ruby refinements and metaprogramming utilities: Arrayfy, Hashify, ExplodeRanges,
283
243
 
284
244
  **📖 [Complete Documentation](docs/subsystems/core-extensions.md)**
285
245
 
246
+ ## More from the MusaDSL ecosystem
247
+
248
+ - [MusaDSL](https://musadsl.yeste.studio) — Ruby framework for algorithmic sound and musical composition.
249
+ - [MusaLCE](https://musalce.yeste.studio) — live coding environment for Ableton Live and Bitwig Studio.
250
+ - [Nota](https://nota.yeste.studio) — Claude Code plugin for AI-assisted MusaDSL composition.
251
+ - **Pulso** — Stream Deck plugin for MusaLCE Surface controls *(upcoming)*.
252
+ - **VST3 plugins** — collection of audio plugins for mixing and mastering *(upcoming)*.
253
+
254
+ For the full map — descriptions, how they relate, which one to pick for what — see [musa-ecosystem.yeste.studio](https://musa-ecosystem.yeste.studio).
255
+
286
256
  ## Author
287
257
 
288
258
  * [Javier Sánchez Yeste](https://github.com/javier-sy)
@@ -9,11 +9,40 @@ Editor → MusaLCE Client → TCP (port 1327) → REPL Server → DSL Context
9
9
  Results/Errors
10
10
  ```
11
11
 
12
- **Available MusaLCE Clients:**
13
- - **MusaLCEClientForVSCode**: Visual Studio Code extension
14
- - **MusaLCEClientForAtom**: Atom editor plugin
15
- - **MusaLCEforBitwig**: Bitwig Studio integration
16
- - **MusaLCEforLive**: Ableton Live integration
12
+ The REPL is **only** the TCP eval channel between editor and server. Anything else a live-coding session needs (DAW transport, MIDI routing, OSC surface relay, etc.) lives outside this subsystem.
13
+
14
+ ## Two scenarios
15
+
16
+ ### Case 1 Standalone live coding (you bring your own REPL)
17
+
18
+ This is the scenario this document covers. You build your own `main.rb` (sequencer, voices, clock, transport, your own helpers) and start `Musa::REPL::REPL.new(binding)` inside the sequencer's DSL context. Your editor connects to it on `localhost:1327` and you send Ruby fragments live.
19
+
20
+ Maximum control. Useful when:
21
+
22
+ - You drive non-DAW targets — SuperCollider, Max/MSP, OSC apps, OS voice synthesis, custom hardware.
23
+ - You're prototyping a personal live-coding DSL (helpers, Tidal-Cycles-style API).
24
+ - You want to keep the dependency footprint to musa-dsl alone.
25
+
26
+ A complete worked example with a Tidal-Cycles-style `d(n)` / `hush` / `solo` API: [`musadsl-demo/_demo-13-live-coding`](https://github.com/javier-sy/musadsl-demo).
27
+
28
+ ### Case 2 — Suite workflow (musalce-server handles everything)
29
+
30
+ When the target is **Ableton Live** or **Bitwig Studio**, the [musalce-server](https://github.com/javier-sy/musalce-server) gem packages this REPL plus a sequencer, a clock, a transport, a DAW handler (OSC over UDP to the per-DAW extension) and a surface for Stream Deck integration via Pulso. Internally case 2 is a **specialization** of case 1 — `musalce-server` opens `Musa::REPL::REPL.new(binding)` after pre-building all the boilerplate, and exposes a `daw.*` API in the DSL context.
31
+
32
+ Documented separately in the suite's architecture reference: [musalce-server/docs/architecture.md](https://github.com/javier-sy/musalce-server/blob/master/docs/architecture.md).
33
+
34
+ ## Components
35
+
36
+ **REPL clients** (talk to the REPL server over TCP 1327 — same shape in both scenarios):
37
+
38
+ - [MusaLCEClientForVSCode](https://github.com/javier-sy/MusaLCEClientForVSCode) — Visual Studio Code extension
39
+ - [MusaLCEClientForAtom](https://github.com/javier-sy/MusaLCEClientForAtom) — Atom editor plugin (discontinued, December 2022)
40
+
41
+ **Suite-only components** (only used in case 2 — see musalce-server architecture doc):
42
+
43
+ - [musalce-server](https://github.com/javier-sy/musalce-server) — packages REPL + sequencer + DAW handler + surface
44
+ - [MusaLCEforBitwig](https://github.com/javier-sy/MusaLCEforBitwig) — Bitwig Studio controller extension (Java)
45
+ - [MusaLCEforLive](https://github.com/javier-sy/MusaLCEforLive) — Ableton Live MIDI Remote Script (Python)
17
46
 
18
47
  ## Communication Protocol
19
48
 
@@ -55,34 +84,41 @@ Server → Client:
55
84
  Starting composition...
56
85
  ```
57
86
 
58
- ## Server Setup
59
-
60
- **Basic REPL Server:**
87
+ ## Server Setup (Case 1 — canonical pattern)
61
88
 
62
89
  ```ruby
63
90
  require 'musa-dsl'
91
+ require 'midi-communications' # or any other MIDI/OSC layer you prefer
92
+
64
93
  include Musa::All
65
94
 
66
- # Create sequencer and transport
95
+ # 1. MIDI output of your choice
96
+ output = MIDICommunications::Output.gets
97
+
98
+ # 2. Clock + transport
67
99
  clock = TimerClock.new(bpm: 120, ticks_per_beat: 24)
68
100
  transport = Transport.new(clock, 4, 24)
69
101
 
70
- # Start REPL server bound to sequencer context
71
- # The REPL will execute code in the sequencer's DSL context
102
+ # 3. Sequencer DSL context anything you define inside `with` becomes
103
+ # available in the REPL (instance methods, accessors, helpers).
72
104
  transport.sequencer.with do
73
- # DSL methods available in REPL
74
- def note(pitch:, duration:)
75
- puts "Playing pitch #{pitch} for #{duration} bars"
105
+ voices = MIDIVoices.new(sequencer: transport.sequencer, output: output, channels: [0, 1])
106
+
107
+ # Define whatever DSL surface you want exposed to the REPL.
108
+ def my_note(pitch:, duration:)
109
+ voices.voices[0].note(pitch, duration: duration)
76
110
  end
77
111
 
78
- # Create REPL server (port 1327 by default)
112
+ # 4. Start the REPL server (binds to TCP/1327 in this DSL context)
79
113
  @repl = Musa::REPL::REPL.new(binding)
80
114
  end
81
115
 
82
- # Start playback (REPL runs in background thread)
116
+ # 5. Start playback (REPL runs in background thread)
83
117
  transport.start
84
118
  ```
85
119
 
120
+ If you instead want the **suite workflow** (case 2 — Bitwig or Live with DAW handler + Stream Deck surface), don't write the above by hand: install [musalce-server](https://github.com/javier-sy/musalce-server) and run `musalce-server bitwig|live`. It opens this same REPL with a richer DSL context (`daw.*`, `surface[:event]`, …).
121
+
86
122
  **File Path Injection:**
87
123
 
88
124
  When a client sends a file path via `#path`, the REPL injects it as `@user_pathname` (Pathname object). This enables relative requires based on the editor's current file location:
@@ -201,7 +201,5 @@ module Musa::Sequencer
201
201
  @do_after << { bars: bars.rationalize, block: block }
202
202
  end
203
203
  end
204
-
205
- private_constant :EveryControl
206
204
  end
207
205
  end
@@ -597,7 +597,5 @@ module Musa::Sequencer
597
597
  @stop
598
598
  end
599
599
  end
600
-
601
- private_constant :MoveControl
602
600
  end
603
601
  end
@@ -198,8 +198,6 @@ module Musa::Sequencer
198
198
  @do_after << { bars: bars.rationalize, block: block }
199
199
  end
200
200
  end
201
-
202
- private_constant :PlayTimedControl
203
201
  end
204
202
  end
205
203
 
@@ -359,7 +359,5 @@ module Musa::Sequencer
359
359
  @do_after << { bars: bars.rationalize, block: block }
360
360
  end
361
361
  end
362
-
363
- private_constant :PlayControl
364
362
  end
365
363
  end
@@ -490,7 +490,5 @@ module Musa::Sequencer
490
490
 
491
491
  alias to_s inspect
492
492
  end
493
-
494
- private_constant :EventHandler
495
493
  end
496
494
  end
@@ -1,3 +1,3 @@
1
1
  module Musa
2
- VERSION = '0.42.7'.freeze
2
+ VERSION = '0.43.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musa-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.7
4
+ version: 0.43.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Sánchez Yeste