Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

Commit 5c1e9fc

Browse files
jon-myersclaude
andauthored
fix: remove incorrect trajectory_grid vs instrumentation warning (#57)
The Phrase class was incorrectly warning when trajectory_grid, chikari_grid, and groups_grid dimensions didn't match instrumentation length. This validation is architecturally wrong - instrumentation relates to phrase_grid dimensions at the Piece level, not at the Phrase level. As of recent updates, trajectory_grid will have 2 dimensions for both Sitar and Sarangi instruments, independent of piece-level instrumentation. Closes #49 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 21affa2 commit 5c1e9fc

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

idtap/classes/phrase.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -292,31 +292,6 @@ def _validate_parameter_values(self, opts: Dict[str, Any]) -> None:
292292
if len(dur_array) > 0 and sum(dur_array) == 0:
293293
raise ValueError("'dur_array' cannot have all zero values")
294294

295-
# Validate grid structure consistency
296-
if 'trajectory_grid' in opts and 'instrumentation' in opts:
297-
trajectory_grid = opts['trajectory_grid']
298-
instrumentation = opts['instrumentation']
299-
if len(trajectory_grid) != len(instrumentation):
300-
import warnings
301-
warnings.warn(f"trajectory_grid has {len(trajectory_grid)} tracks but instrumentation has {len(instrumentation)} instruments. "
302-
"These should typically match.", UserWarning)
303-
304-
if 'chikari_grid' in opts and 'instrumentation' in opts:
305-
chikari_grid = opts['chikari_grid']
306-
instrumentation = opts['instrumentation']
307-
if len(chikari_grid) != len(instrumentation):
308-
import warnings
309-
warnings.warn(f"chikari_grid has {len(chikari_grid)} tracks but instrumentation has {len(instrumentation)} instruments. "
310-
"These should typically match.", UserWarning)
311-
312-
if 'groups_grid' in opts and 'instrumentation' in opts:
313-
groups_grid = opts['groups_grid']
314-
instrumentation = opts['instrumentation']
315-
if len(groups_grid) != len(instrumentation):
316-
import warnings
317-
warnings.warn(f"groups_grid has {len(groups_grid)} tracks but instrumentation has {len(instrumentation)} instruments. "
318-
"These should typically match.", UserWarning)
319-
320295
# Validate categorization grid structure
321296
if 'categorization_grid' in opts and opts['categorization_grid'] is not None:
322297
for i, cat in enumerate(opts['categorization_grid']):

0 commit comments

Comments
 (0)