pycodedj 0.2.0__tar.gz → 0.3.0__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.
Files changed (39) hide show
  1. {pycodedj-0.2.0 → pycodedj-0.3.0}/CHANGELOG.md +30 -0
  2. {pycodedj-0.2.0 → pycodedj-0.3.0}/PKG-INFO +37 -7
  3. {pycodedj-0.2.0 → pycodedj-0.3.0}/README.ja.md +36 -6
  4. {pycodedj-0.2.0 → pycodedj-0.3.0}/README.md +36 -6
  5. pycodedj-0.3.0/docs/manual.html +1642 -0
  6. {pycodedj-0.2.0 → pycodedj-0.3.0}/docs/manual.ja.md +227 -56
  7. {pycodedj-0.2.0 → pycodedj-0.3.0}/docs/manual.md +222 -57
  8. pycodedj-0.3.0/examples/club_set.py +150 -0
  9. pycodedj-0.3.0/examples/sound_showcase.py +295 -0
  10. {pycodedj-0.2.0 → pycodedj-0.3.0}/pyproject.toml +1 -1
  11. {pycodedj-0.2.0 → pycodedj-0.3.0}/sc/synths.scd +323 -78
  12. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/__init__.py +1 -1
  13. pycodedj-0.3.0/src/pycodedj/__main__.py +256 -0
  14. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/block_parser.py +35 -10
  15. pycodedj-0.3.0/src/pycodedj/engine.py +103 -0
  16. pycodedj-0.3.0/src/pycodedj/mapper.py +95 -0
  17. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/osc_bridge.py +11 -0
  18. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/watcher.py +8 -4
  19. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/test_block_parser.py +51 -12
  20. pycodedj-0.3.0/tests/test_engine.py +239 -0
  21. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/test_mapper.py +31 -0
  22. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/test_osc_bridge.py +38 -2
  23. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/test_watcher.py +17 -0
  24. pycodedj-0.2.0/examples/club_set.py +0 -218
  25. pycodedj-0.2.0/src/pycodedj/__main__.py +0 -130
  26. pycodedj-0.2.0/src/pycodedj/engine.py +0 -36
  27. pycodedj-0.2.0/src/pycodedj/mapper.py +0 -50
  28. pycodedj-0.2.0/tests/test_engine.py +0 -50
  29. {pycodedj-0.2.0 → pycodedj-0.3.0}/.github/workflows/workflow.yml +0 -0
  30. {pycodedj-0.2.0 → pycodedj-0.3.0}/.gitignore +0 -0
  31. {pycodedj-0.2.0 → pycodedj-0.3.0}/LICENSE +0 -0
  32. {pycodedj-0.2.0 → pycodedj-0.3.0}/docs/CNAME +0 -0
  33. {pycodedj-0.2.0 → pycodedj-0.3.0}/docs/index.html +0 -0
  34. {pycodedj-0.2.0 → pycodedj-0.3.0}/examples/demo.py +0 -0
  35. {pycodedj-0.2.0 → pycodedj-0.3.0}/examples/hello_sc.py +0 -0
  36. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/_loop.py +0 -0
  37. {pycodedj-0.2.0 → pycodedj-0.3.0}/src/pycodedj/analyzer.py +0 -0
  38. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/__init__.py +0 -0
  39. {pycodedj-0.2.0 → pycodedj-0.3.0}/tests/test_analyzer.py +0 -0
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0] - 2026-05-08
4
+
5
+ ### Features
6
+
7
+ - `pycodedj panic` — 全アクティブループを即時停止。SuperCollider 側でシンセを解放し `~loops` / `~loopParams` を初期化する
8
+ - `pycodedj mute <name>` — ループを消音(停止しない)。再評価時もミュート状態を維持
9
+ - `pycodedj unmute <name>` — ミュート解除、音量を復元
10
+ - `pycodedj solo <name>` — 対象ループ以外を全ミュート(CLI は OSC 直送、完全な状態管理は watch セッション内の `Engine.solo()` 推奨)
11
+ - `pycodedj unsolo` — ソロ解除、solo 前のミュート状態に戻す
12
+ - `pycodedj status` — アクティブループの名前・ミュート状態・音量・カットオフを表示
13
+
14
+ ### Improvements
15
+
16
+ - `ParseResult` dataclass 導入 — `parse_blocks()` が SyntaxError 時に `ParseResult(ok=False, error=...)` を返すようになり、watch モードでコード編集中に構文エラーがあっても演奏中のループが止まらなくなった
17
+ - `Engine` 内部状態を `LoopState` dataclass で管理 — `muted` / `muted_before_solo` フラグを保持し、mute/solo/unsolo の状態を正確に追跡
18
+ - `eval_block` が OSC 送信成功後に内部状態を更新するよう修正(送信失敗時の状態不整合を解消)
19
+ - `Engine.solo()` に未知のループ名ガードを追加(存在しない名前を渡しても全ループがミュートされない)
20
+ - CLI `unmute` が SuperCollider に永続化された `amp=0` を上書きしてから voice_count を送るよう修正
21
+
22
+ ### Docs
23
+
24
+ - README.md / README.ja.md — panic / mute / unmute / status のクイックリファレンスを追加、ロードマップの Sprint 1 を完了に更新
25
+ - `docs/manual.md` / `docs/manual.ja.md` / `docs/manual.html` — セクション 12 に新コマンド 6 つの全リファレンスを追加
26
+
27
+ ## [0.2.1] - 2026-05-08
28
+
29
+ ### Docs
30
+
31
+ - `docs/manual.html` — Python シンタックスハイライターのプレースホルダー衝突バグを修正。`PY_NUMBER` がプレースホルダーのインデックス数字にマッチしてコメント・文字列が正しく表示されない問題を解消
32
+
3
33
  ## [0.2.0] - 2026-05-08
4
34
 
5
35
  ### Breaking
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycodedj
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  License: MIT License with Commons Clause
5
5
 
6
6
  "Commons Clause" License Condition v1.0
@@ -108,6 +108,7 @@ BPM clock is held by SuperCollider's `TempoClock`. Python only sends parameter u
108
108
  | Function definition count | Polyphony voice count (1–4) | Functions = independent voices |
109
109
  | Comment ratio | Reverb depth (0.0–0.8) | More whitespace = more space |
110
110
  | `volume=` argument | Amplitude (0.0–1.0) | Direct performer control over loudness |
111
+ | `eq=` / `low=` / `mid=` / `high=` arguments | Simple 3-band EQ | Per-loop tone shaping |
111
112
 
112
113
  Tempo (BPM) and root pitch are controlled explicitly by the performer, to prevent the foundation of the piece from shifting on every save.
113
114
 
@@ -190,6 +191,33 @@ pycodedj watch demo.py
190
191
 
191
192
  From here, just write code and save.
192
193
 
194
+ **5. Emergency stop**
195
+
196
+ ```bash
197
+ pycodedj panic
198
+ ```
199
+
200
+ Sends a stop signal to all active loops immediately. Use this if something goes wrong during a performance.
201
+
202
+ **6. Mute / solo**
203
+
204
+ ```bash
205
+ pycodedj mute bass # silence a loop without stopping it
206
+ pycodedj unmute bass # restore its sound
207
+ pycodedj solo pad # mute all loops except pad
208
+ pycodedj unsolo # release solo, restore previous mute state
209
+ ```
210
+
211
+ Note: `mute`, `unmute`, `solo`, and `unsolo` send OSC directly to SuperCollider. For full state management, call `Engine.mute()` / `Engine.solo()` from within a watch session.
212
+
213
+ **7. Loop status**
214
+
215
+ ```bash
216
+ pycodedj status
217
+ ```
218
+
219
+ Prints the name, mute state, amplitude, and filter cutoff of each active loop.
220
+
193
221
  ---
194
222
 
195
223
  ## Example Files
@@ -197,7 +225,8 @@ From here, just write code and save.
197
225
  | File | Contents |
198
226
  | :--- | :--- |
199
227
  | `examples/demo.py` | Intro demo with bass / melody / pad |
200
- | `examples/club_set.py` | Layered club groove using kick_hard / bass_rumble / bass_reese and more |
228
+ | `examples/club_set.py` | EDM groove (8 loops, kick acid bass rave stabs → hoover → shimmer) |
229
+ | `examples/sound_showcase.py` | All 30 synths — evaluate one at a time to audition each sound |
201
230
 
202
231
  ---
203
232
 
@@ -273,11 +302,12 @@ External visualisers such as Hydra can receive the same parameters on a separate
273
302
 
274
303
  ## Roadmap
275
304
 
276
- - [x] Spec design and mapping design
277
- - [ ] Phase 0: Listening validation of mapping hypotheses
278
- - [x] Phase 1: Python SuperCollider OSC prototype
279
- - [x] Phase 2: Hot-reload live loop implementation (`pycodedj watch`)
280
- - [ ] Phase 3: Hydra visualiser integration
305
+ - [x] Python SuperCollider OSC prototype
306
+ - [x] Hot-reload live loop implementation (`pycodedj watch`)
307
+ - [x] Sprint 1: Live stability (`panic`, SyntaxError recovery, `mute`/`solo`, `status`)
308
+ - [ ] Sprint 2: Music DSL (`pattern()`, `sample()`, `@loop` parameter expansion, mapping modes)
309
+ - [ ] Sprint 3: Sound design and playability (SynthDef cleanup, `bpm`, `list-synths`)
310
+ - [ ] Sprint 4: README and manual refresh, Hydra visualiser integration
281
311
 
282
312
  ---
283
313
 
@@ -46,6 +46,7 @@ BPMクロックは SuperCollider 側の `TempoClock` が保持します。Python
46
46
  | 関数定義数 | ポリフォニー声部数 (1–4) | 関数=独立した声部 |
47
47
  | コメント率 | リバーブ Depth (0.0–0.8) | 余白の多さ=空間の広さ |
48
48
  | `volume=` 引数 | Amplitude (0.0–1.0) | 演奏者が直接音量を制御する |
49
+ | `eq=` / `low=` / `mid=` / `high=` 引数 | 簡易 3 バンド EQ | ループごとの音質補正 |
49
50
 
50
51
  テンポ(BPM)と基音(Pitch)は演奏者が明示的に制御します。保存のたびに楽曲全体の土台が変わることを防ぐためです。
51
52
 
@@ -128,6 +129,33 @@ pycodedj watch demo.py
128
129
 
129
130
  あとはエディタでコードを書いて保存するだけです。
130
131
 
132
+ **5. 緊急停止**
133
+
134
+ ```bash
135
+ pycodedj panic
136
+ ```
137
+
138
+ 全アクティブループに停止信号を即時送信します。演奏中に問題が起きたときに使います。
139
+
140
+ **6. ミュート / ソロ**
141
+
142
+ ```bash
143
+ pycodedj mute bass # ループを消音(停止はしない)
144
+ pycodedj unmute bass # 音量を元に戻す
145
+ pycodedj solo pad # pad 以外を全ミュート
146
+ pycodedj unsolo # ソロ解除、ミュート状態を元に戻す
147
+ ```
148
+
149
+ 注意: `mute` / `unmute` / `solo` / `unsolo` は OSC を直接 SuperCollider に送信します。完全な状態管理が必要な場合は watch セッション内で `Engine.mute()` / `Engine.solo()` を呼び出してください。
150
+
151
+ **7. ループのステータス確認**
152
+
153
+ ```bash
154
+ pycodedj status
155
+ ```
156
+
157
+ アクティブなループの名前・ミュート状態・音量・フィルターカットオフを表示します。
158
+
131
159
  ---
132
160
 
133
161
  ## サンプルファイル
@@ -135,7 +163,8 @@ pycodedj watch demo.py
135
163
  | ファイル | 内容 |
136
164
  | :--- | :--- |
137
165
  | `examples/demo.py` | bass / melody / pad の 3 ループ入門デモ |
138
- | `examples/club_set.py` | kick_hard / bass_rumble / bass_reese などを重ねた多層クラブグルーヴ |
166
+ | `examples/club_set.py` | EDM クラブグルーヴ(8 ループ、キック アシッドベース レイブスタブ → Hoover → シマー) |
167
+ | `examples/sound_showcase.py` | 全 30 音色を収録 — 1 音ずつ eval して確認できる |
139
168
 
140
169
  ---
141
170
 
@@ -211,11 +240,12 @@ Hydra 等の外部ビジュアライザーへは同じパラメーターを別
211
240
 
212
241
  ## ロードマップ
213
242
 
214
- - [x] 仕様設計・マッピング設計
215
- - [ ] フェーズ0: マッピング仮説の聴取検証
216
- - [x] フェーズ1: Python SuperCollider OSC プロトタイプ
217
- - [x] フェーズ2: ホットリロード・ライブループ実装(`pycodedj watch`)
218
- - [ ] フェーズ3: Hydra ビジュアライザー統合
243
+ - [x] Python → SuperCollider OSC プロトタイプ
244
+ - [x] ホットリロード・ライブループ実装(`pycodedj watch`)
245
+ - [x] Sprint 1: ライブ安定性(`panic`, SyntaxError維持, `mute`/`solo`, `status`)
246
+ - [ ] Sprint 2: 音楽DSL(`pattern()`, `sample()`, `@loop` パラメータ拡張, mapping モード)
247
+ - [ ] Sprint 3: 音色・演奏性(SynthDef整理, `bpm`, `list-synths`)
248
+ - [ ] Sprint 4: README・マニュアル刷新、Hydra ビジュアライザー統合
219
249
 
220
250
  ---
221
251
 
@@ -46,6 +46,7 @@ BPM clock is held by SuperCollider's `TempoClock`. Python only sends parameter u
46
46
  | Function definition count | Polyphony voice count (1–4) | Functions = independent voices |
47
47
  | Comment ratio | Reverb depth (0.0–0.8) | More whitespace = more space |
48
48
  | `volume=` argument | Amplitude (0.0–1.0) | Direct performer control over loudness |
49
+ | `eq=` / `low=` / `mid=` / `high=` arguments | Simple 3-band EQ | Per-loop tone shaping |
49
50
 
50
51
  Tempo (BPM) and root pitch are controlled explicitly by the performer, to prevent the foundation of the piece from shifting on every save.
51
52
 
@@ -128,6 +129,33 @@ pycodedj watch demo.py
128
129
 
129
130
  From here, just write code and save.
130
131
 
132
+ **5. Emergency stop**
133
+
134
+ ```bash
135
+ pycodedj panic
136
+ ```
137
+
138
+ Sends a stop signal to all active loops immediately. Use this if something goes wrong during a performance.
139
+
140
+ **6. Mute / solo**
141
+
142
+ ```bash
143
+ pycodedj mute bass # silence a loop without stopping it
144
+ pycodedj unmute bass # restore its sound
145
+ pycodedj solo pad # mute all loops except pad
146
+ pycodedj unsolo # release solo, restore previous mute state
147
+ ```
148
+
149
+ Note: `mute`, `unmute`, `solo`, and `unsolo` send OSC directly to SuperCollider. For full state management, call `Engine.mute()` / `Engine.solo()` from within a watch session.
150
+
151
+ **7. Loop status**
152
+
153
+ ```bash
154
+ pycodedj status
155
+ ```
156
+
157
+ Prints the name, mute state, amplitude, and filter cutoff of each active loop.
158
+
131
159
  ---
132
160
 
133
161
  ## Example Files
@@ -135,7 +163,8 @@ From here, just write code and save.
135
163
  | File | Contents |
136
164
  | :--- | :--- |
137
165
  | `examples/demo.py` | Intro demo with bass / melody / pad |
138
- | `examples/club_set.py` | Layered club groove using kick_hard / bass_rumble / bass_reese and more |
166
+ | `examples/club_set.py` | EDM groove (8 loops, kick acid bass rave stabs → hoover → shimmer) |
167
+ | `examples/sound_showcase.py` | All 30 synths — evaluate one at a time to audition each sound |
139
168
 
140
169
  ---
141
170
 
@@ -211,11 +240,12 @@ External visualisers such as Hydra can receive the same parameters on a separate
211
240
 
212
241
  ## Roadmap
213
242
 
214
- - [x] Spec design and mapping design
215
- - [ ] Phase 0: Listening validation of mapping hypotheses
216
- - [x] Phase 1: Python SuperCollider OSC prototype
217
- - [x] Phase 2: Hot-reload live loop implementation (`pycodedj watch`)
218
- - [ ] Phase 3: Hydra visualiser integration
243
+ - [x] Python SuperCollider OSC prototype
244
+ - [x] Hot-reload live loop implementation (`pycodedj watch`)
245
+ - [x] Sprint 1: Live stability (`panic`, SyntaxError recovery, `mute`/`solo`, `status`)
246
+ - [ ] Sprint 2: Music DSL (`pattern()`, `sample()`, `@loop` parameter expansion, mapping modes)
247
+ - [ ] Sprint 3: Sound design and playability (SynthDef cleanup, `bpm`, `list-synths`)
248
+ - [ ] Sprint 4: README and manual refresh, Hydra visualiser integration
219
249
 
220
250
  ---
221
251