Align audio-engineering types with vectors conventions + 1.x → 2.0 migration guide#93
Merged
Merged
Conversation
Covers the quantities namespace move, the vector-form type renames, non-negative V0 semantics and absolute subtraction, the storage-unit fixes (Concentration, NuclearCrossSection, Dalton), plural factories and typed In(unit), the log-scale companion types, the PhysicalConstants domain renames, and removed APIs with their replacements. https://claude.ai/code/session_01AUgbNJjDBDCwcbUfPK3pGW
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
Two related changes: the 1.x → 2.0 migration guide, and the audio-engineering consistency refactor the guide documents.
Audio-engineering types aligned with the vectors branch
The types merged from main (#88) still carried 1.x conventions. Now:
Cents,Decibels,Gain,NormalizedParameter,ParameterTaper,Percent,QFactor,Semitonesmove fromktsu.Semanticstoktsu.Semantics.Quantities, alongside every other quantity type.Ratioto rule them all: the audio-specificRatio<T>struct is deleted; the generated DimensionlessRatio<T>is the single ratio currency.Decibels.ToPower(), theCents/Semitonesfrequency-ratio conversions, andPercent.FromRatio/ToRatioall exchange the generated type. A newDimensionless × Dimensionlessrelationship indimensions.jsongeneratesRatio × Ratio => Ratio(andSignedRatio × Ratio => SignedRatio); same-type division yields the raw storage value, consistent with every other quantity.Migration guide
docs/migration-guide-2.0.md(linked from CLAUDE.md) covers the full 1.x → 2.0 upgrade: namespace moves (including the audio types above), the sixteen vector-form renames verified againstdimensions.json, non-negative V0 semantics with before/after snippets, the silent storage-unit changes to audit (Concentration,NuclearCrossSection,Dalton), plural factories and typedIn(unit), the log-scale companion types,PhysicalConstantsdomain renames, and removed APIs with replacements.Testing
AudioEngineeringTestsupdated for the rewiring plus a new test pinning that ratio arithmetic comes from the generator; 63 audio/backfill tests pass.https://claude.ai/code/session_01AUgbNJjDBDCwcbUfPK3pGW