Repository navigation
feat!: add vocal presets, scales and semitone helpers - #36
Open
google-labs-stitch[bot] wants to merge 7 commits into
Open
google-labs-stitch[bot] wants to merge 7 commits into
google-labs-stitch[bot] wants to merge 7 commits into
Conversation
- Add seven musical scales to CorrectionScale and NoteMask. - Add Preset and ProcessorConfig::from_preset for five vocal chains. - Add semitones_to_ratio and ratio_to_semitones with range checks. - Export the scale, preset and semitone helpers from Wasm. - Update the README quick start and the TypeScript API table.
Contributor
|
Review: Clean additions for vocal presets, 7 new scales, and semitone helpers. Please rebase onto current main (21 commits behind, no CI run yet) and note two SemVer items for the 0.4.0 breaking window:
|
- Keep ControlEvent and MidiEvent alongside the new Wasm imports.
- Add #[non_exhaustive] to CorrectionScale in src/scale.rs. - Add #[non_exhaustive] to Preset in src/config.rs.
Contributor
Author
|
Addressed all items from your review:
|
- Keep ControlActivity alongside the preset and scale exports. - Keep controlActivity() alongside the preset and scale table rows.
Contributor
- Keep the preset, scale and semitone exports in src/wasm.rs - Update the TypeScript API table in README.md with the Float32 rows - Normalize the Preset and CorrectionScale JSDoc comments
Contributor
Author
|
Synced with updated
|
Contributor
- Keep the preset, scale and semitone exports with ParameterControl. - Update the module documentation in src/wasm.rs for parameter events.
- Check preset, scale and semitone helpers at runtime. - Check TypeScript types for presets, scales and semitone helpers. - Check @throws JSDoc tags on the four helper exports.
Contributor
Author
|
Synced with updated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds musical scales, vocal presets and semitone conversion helpers across the Rust, WebAssembly and TypeScript APIs.
src/scale.rs): MarkCorrectionScaleas#[non_exhaustive](feat!:), addHarmonicMinor,MelodicMinor,Dorian,Mixolydian,MajorPentatonic,MinorPentatonicandBlues, document their semitone offsets in rustdoc, and rotate 12-flag scale masks inNoteMask::from_key_scalewithout heap allocation.src/config.rs,src/lib.rs): Add#[non_exhaustive]Preset(NaturalTune,HardPopTune,LushChoir,DiatonicHarmony,WarmBroadcast),ProcessorConfig::from_preset,semitones_to_ratio(-24..=24) andratio_to_semitones(0.25..=4), and re-export them at the crate root.Preset::LushChoirsetsoutput_gainto0.35so that eight summed choir voices do not overload the output.src/wasm.rs,scripts/normalize-jsdoc.mjs,scripts/verify-pack.mjs,README.md): ExportpresetConfig,noteMaskFromKeyScale,semitonesToRatioandratioToSemitones, normalizePresetandCorrectionScaleJSDoc comments, check the four helpers at runtime and in TypeScript consumer profiles inscripts/verify-pack.mjs, update the TypeScript quick start to usenoteMaskFromKeyScale("a", "minor")andsemitonesToRatio(4), and list the new helpers in the TypeScript API table.Verification
cargo fmt --checkcargo clippy --locked --lib -- -D warnings(native andwasm32-unknown-unknown --features wasm)RUSTFLAGS="-D warnings" cargo build --locked --releaseand MSRV1.88RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps(native andwasm32-unknown-unknown --features wasm)cargo package --lockednpm run check:wasmnpm run verify:pack#[non_exhaustive]enforcement in an external crate, and semitone and ratio boundary and non-finite checks in Rust and Node.js.Automated PR initiated by user @byteland-app via Stitch Loop.