Convert music theory logic to Rust WebAssembly#1
Merged
kako-jun merged 4 commits intoNov 17, 2025
Conversation
音楽理論機能をRust + WASMで実装しました。 - すべてのTypeScript util関数を完全に移植 - 21個のテストがすべて成功 - 既存のTypeScriptコードは保持(呼ばないだけ) 主な機能: - Note: 五線譜位置計算、ピッチ比較、音価テキスト変換 - Chord: ルート音抽出、フレット位置計算、インターバル判定 - Scale: 構成音取得、ダイアトニックコード生成(トライアド・7th) - Harmony: 機能和声分析、カデンツ判定、ローマ数字表記 - Utils: クロマチック判定、コード名別表記
TypeScript実装のテストを作成し、Rust実装との比較を実施。 重要な発見: - 元のTypeScript comparePitch()にバグを発見 - C#2とD♭2の異名同音判定がfalseを返す(本来はtrue) - Rust実装では半音インデックスで比較し、正しく動作 テスト結果: - 34個のテストケース作成 - 33個のテストが両実装で一致 - 1個のテストでTypeScriptにバグを発見(Rustは正しい) Rust実装は元の仕様より改善されていることを確認。
プロジェクトの構想、設計、TODOを.claude/内で管理。 追加ファイル: - CLAUDE.md: プロジェクト全体の設計ドキュメント - アーキテクチャ、ドメインモデル、技術的負債など - TODO.md: 詳細なタスク管理 - Phase別のタスク、バグリスト、マイルストーン - music-theory-wasm-rust-progress.md: 更新 - デグレチェック結果を追加 - 発見したバグの詳細を記録 これにより、プロジェクトの全体像と進捗が一元管理される。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kako-jun
added a commit
that referenced
this pull request
Dec 17, 2025
…DZ19CjBzUhUibMkvErrJj Convert music theory logic to Rust WebAssembly
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.
Pull Request
📋 Summary
Type of Change:
🔗 Related Issues
Fixes #
Relates to #
📝 Changes Made
🧪 Testing
Test Coverage:
Test Results:
📚 Documentation
✅ Checklist
Before submitting this PR, please ensure:
Code Quality
Testing
Documentation
Breaking Changes
🎯 Performance Impact
Benchmark Results (if applicable):
# Include before/after benchmark results npm run bench / cargo bench / pytest-benchmark / etc.🔍 Reviewer Notes
Focus Areas:
Questions for Reviewers:
📸 Screenshots (if applicable)
🚀 Deployment Notes
By submitting this PR, I confirm that: