Update scripting examples to current engine helpers#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c573cd5f63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Add effects chain (use your routing helpers) | ||
| var delay = vst.load("Delay"); | ||
| var reverb = vst.load("Reverb"); | ||
| if (delay != null) Engine.AddEffectAfter(synth, delay); | ||
| if (reverb != null) Engine.AddEffectAfter(synth, reverb); |
There was a problem hiding this comment.
Replace non-existent Engine.AddEffectAfter helper
The new effects example calls Engine.AddEffectAfter(...), but there is no such helper in the scripting surface; a repo-wide search (rg "AddEffectAfter") finds no definition, while the scripting tooltips only advertise AddEffect(...) as the effect helper (see MusicEngineEditor/Editor/ParameterTooltipService.cs lines 84-87). That means readers who copy this snippet will hit a missing-method/runtime error in the script environment. Consider using the existing AddEffect(...) helper or documenting the actual supported routing API.
Useful? React with 👍 / 👎.
Motivation
SimpleSynth,new Sequencer()) with the engine's current helpers (CreateSynth,Sequencer,CreatePattern).Description
README.mdexamples to useSequencer.Bpm/Sequencer.Start(),CreateSynth(),CreatePattern(...),SetParameter(...)andpat.Start()for playback.CONTRIBUTING.mdscripting guide and examples to the same helper-style API and replaced legacy constructors and calls (multiple examples converted toCreateSynth/CreatePatternandSequencer.Start()).vst.load(...)andEngine.AddEffectAfter(...)routing helpers and adjusted inline slider examples to usesynth.SetParameter("cutoff", ...)andSequencer.Bpm.Testing
Codex Task