Skip to content

Revert "Enable set_scene_bpm and set_mesh_bpm blocks in sound toolbox"#419

Merged
tracygardner merged 1 commit into
mainfrom
revert-417-claude/add-sound-shadow-blocks-QAzYp
Mar 18, 2026
Merged

Revert "Enable set_scene_bpm and set_mesh_bpm blocks in sound toolbox"#419
tracygardner merged 1 commit into
mainfrom
revert-417-claude/add-sound-shadow-blocks-QAzYp

Conversation

@tracygardner

@tracygardner tracygardner commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Reverts #417

Summary by CodeRabbit

  • Refactor

    • Audio and MIDI blocks now use fixed numeric input fields with predefined ranges and constraints instead of accepting external connectable inputs. MIDI note values are limited to 0-127, frequency to 20-20000 Hz, with envelope parameters (attack, decay, sustain, release) bounded to appropriate ranges.
  • Style

    • Improved instrument creation block display by consolidating formatting to a single-line layout for better readability.

@tracygardner tracygardner merged commit 67b4ec5 into main Mar 18, 2026
4 of 5 checks passed
@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41776256-75be-412e-8f6e-4ce92dac72f4

📥 Commits

Reviewing files that changed from the base of the PR and between c9b2619 and 39d7113.

📒 Files selected for processing (11)
  • blocks/sound.js
  • generators/generators.js
  • locale/de.js
  • locale/en.js
  • locale/es.js
  • locale/fr.js
  • locale/it.js
  • locale/pl.js
  • locale/pt.js
  • locale/sv.js
  • toolbox.js

📝 Walkthrough

Walkthrough

This pull request converts sound block inputs from connectable input_value parameters to static field_number fields. The midi_note and create_instrument blocks now accept fixed numeric fields with defined bounds instead of external connections. Corresponding code generators and toolbox definitions are updated to reflect this structural change. Translation strings are reformatted to single-line display.

Changes

Cohort / File(s) Summary
Block Field Conversions
blocks/sound.js
Replaced input_value connectors with field_number fields for midi_note (NOTE: default 60, bounds 0–127) and create_instrument (FREQUENCY: default 440, bounds 20–20000; ATTACK/DECAY/RELEASE: default 0.1/0.5/1.0, bounds 0–5; SUSTAIN: default 0.7, bounds 0–1).
Generator Updates
generators/generators.js
Modified code generation to read field values directly via getFieldValue() instead of valueToCode() with fallback defaults for midi_note and create_instrument blocks.
Locale String Formatting
locale/de.js, locale/en.js, locale/es.js, locale/fr.js, locale/it.js, locale/pl.js, locale/pt.js, locale/sv.js
Removed newline character between frequency and attack fields in create_instrument translation strings across all eight language files, converting from multi-line to single-line format.
Toolbox Definitions
toolbox.js
Updated shadow block structure for midi_note entries to use fields: { NOTE: 60 } instead of nested input shadows; removed predefined parameter inputs for create_instrument block in toolbox.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Blocks now stand tall with fields instead of strings,
No more tangled wires, just numeric things!
A hop through the toolbox, translations aligned,
Static and steady—much easier to find! 🎵✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-417-claude/add-sound-shadow-blocks-QAzYp
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@tracygardner tracygardner deleted the revert-417-claude/add-sound-shadow-blocks-QAzYp branch March 19, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant