{"id":29871608,"url":"https://github.com/cjgdev/composer","last_synced_at":"2026-05-03T23:33:08.018Z","repository":{"id":302707936,"uuid":"1005218022","full_name":"cjgdev/composer","owner":"cjgdev","description":"Music theory and composition library for Python and WASM","archived":false,"fork":false,"pushed_at":"2025-07-10T20:59:22.000Z","size":1205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T20:53:42.536Z","etag":null,"topics":["ai","python","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cjgdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T21:48:06.000Z","updated_at":"2025-07-10T21:00:57.000Z","dependencies_parsed_at":"2025-07-03T20:42:38.684Z","dependency_job_id":null,"html_url":"https://github.com/cjgdev/composer","commit_stats":null,"previous_names":["cjgdev/composer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cjgdev/composer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjgdev%2Fcomposer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjgdev%2Fcomposer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjgdev%2Fcomposer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjgdev%2Fcomposer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjgdev","download_url":"https://codeload.github.com/cjgdev/composer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjgdev%2Fcomposer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271570075,"owners_count":24782545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","python","rust","wasm"],"created_at":"2025-07-30T20:01:11.843Z","updated_at":"2026-05-03T23:33:02.999Z","avatar_url":"https://github.com/cjgdev.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer\n\nA high-performance music theory and composition library with AI-powered musical intelligence, implemented in Rust with comprehensive cross-platform bindings.\n\n## Features\n\n- **Advanced Music Theory**: Complete chord analysis, Roman numeral notation, scale theory, and voice leading.\n- **Chord Progression Suggestions**: ML-driven recommendations using trie-based pattern matching.\n- **Difficulty Assessment**: Statistical models for musical complexity analysis.\n- **Bass Line Harmonization**: Intelligent harmonization with multiple styles.\n- **Scale Degree Harmonization**: Advanced harmonic analysis and suggestion.\n- **Cross-Platform**: Native Rust, Python bindings, and WebAssembly for web applications.\n- **Thread-Safe**: Built-in concurrency support throughout the library.\n\n## Quick Start\n\n### Rust\n\n```rust\nuse composer_core::{Chord, ScaleFingerprint, get_stable_scale_degrees};\nuse composer_ai::AiEngine;\n\n// Create and analyze a G7 chord\nlet chord = Chord::new(5, 7)?;\nlet scale = ScaleFingerprint::major_scale();\nlet degrees = get_stable_scale_degrees(\u0026chord, \u0026scale)?;\n\n// AI-powered suggestions\nlet ai_engine = AiEngine::new(Default::default());\nlet suggestions = ai_engine.get_chord_suggestions(\u0026pattern, \u0026context, \u0026config)?;\n```\n\n### Python\n\nInstall from PyPI:\n```bash\npip install composer\n```\n\n```python\nimport composer\n\n# Create and analyze chords\nchord = composer.PyChord(5, 7)  # G7 chord\nscale = composer.PyScaleFingerprint([True, False, True, False, True, True, False, True, False, True, False, True])\n\n# Binary serialization for ML applications\nbinary_data = composer.serialize_chord_to_binary(chord)\nhex_string = composer.chord_to_hex(chord)\n\n# AI-powered suggestions\nengine = composer.PyAiEngine()\nsuggestions = engine.get_chord_suggestions(progression, context, config)\n```\n\n### WebAssembly (JavaScript/TypeScript)\n\nInstall from NPM:\n```bash\nnpm install @composer/composer-wasm\n```\n\n**Node.js:**\n```javascript\nconst composer = require('@composer/composer-wasm');\n\nconst chord = new composer.WasmChord(5, 7);\nconst scale = composer.WasmScaleFingerprint.major();\nconst roman = composer.getRomanNumeral(chord, scale);\n\nconsole.log(`${chord.toString()} = ${roman}`);\n```\n\n**Browser:**\n```javascript\nimport init, * as composer from '@composer/composer-wasm/web';\n\nawait init(); // Initialize WASM module\n\nconst chord = new composer.WasmChord(6, 5); // vi chord\nconst degrees = composer.getStableScaleDegrees(chord, scale);\n```\n\n## Architecture\n\nThe project is organized as a cross-platform monorepo:\n\n```\ncomposer/\n├── rust/                   # Rust workspace\n│   └── crates/\n│       ├── composer-core/          # Core music theory algorithms\n│       ├── composer-config/        # Configuration constants\n│       ├── composer-serialization/ # Binary data formats\n│       ├── composer-ai/            # AI-powered features\n│       ├── composer-ffi/           # Python FFI bindings\n│       └── composer-wasm/          # WebAssembly bindings\n├── python/                 # Python package with PyO3 bindings\n├── wasm/                   # WebAssembly NPM package\n├── examples/               # Cross-platform usage examples\n└── docs/                   # Documentation\n```\n\n## Development\n\n### Prerequisites\n\n- Rust 1.70+ with Cargo\n- Python 3.8+ (for Python bindings)\n- Node.js 14+ and npm (for WebAssembly)\n- [just](https://github.com/casey/just) command runner\n\n### Setup\n\nInstall development dependencies and set up the environment:\n\n```bash\njust setup\n```\n\n### Building\n\nBuild all packages:\n```bash\njust build\n```\n\nBuild specific packages:\n```bash\njust build-rust    # Rust workspace\njust build-python  # Python package\njust build-wasm    # WebAssembly package\n```\n\n### Testing\n\nRun all tests:\n```bash\njust test\n```\n\nRun platform-specific tests:\n```bash\njust test-rust     # Rust tests\njust test-python   # Python tests (multi-version)\njust test-wasm     # WebAssembly tests\n```\n\n### Code Quality\n\nFormat and lint all code:\n```bash\njust fmt     # Format all code\njust lint    # Lint all code\n```\n\n### Examples\n\nRun comprehensive examples:\n```bash\njust examples                    # All examples\njust examples-python            # Python examples\njust examples-wasm              # WebAssembly examples\n```\n\n### Documentation\n\nGenerate documentation:\n```bash\njust docs                # All documentation\njust docs-rust           # Rust API docs\njust docs-python         # Python docs\njust docs-wasm           # WebAssembly/TypeScript docs\n```\n\n## Contributing\n\nContributions are welcome! The core implementation is complete, but we appreciate:\n\n- Additional examples and tutorials\n- Performance optimizations\n- New AI algorithms\n- Integration with other music software\n- Documentation improvements\n\nPlease run the full development cycle before submitting:\n\n```bash\njust full  # clean + build + test + lint\n```\n\n## Development Utilities\n\n```bash\njust status          # Check development status\njust dev             # Quick build + test cycle\njust clean           # Clean all build artifacts\njust deps            # Show dependency information\njust dev-server      # Start WASM development server\njust release-check   # Validate ready for release\n```\n\n## License\n\nMIT OR Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjgdev%2Fcomposer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjgdev%2Fcomposer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjgdev%2Fcomposer/lists"}