Contributing
How to contribute to the Notations project
Thank you for your interest in contributing to the Notations project. This guide will help you get started with contributing code, documentation, or examples.
Getting Started
The Notations project is open source and welcomes contributions. The codebase is organized into several packages:
- notations - Core library (parser, models, layout)
- notations-web - Browser components for rendering
- docs - Documentation site (this site)
Development Setup
Clone the repository and install dependencies:
git clone https://github.com/panyam/notation.git
cd notation
pnpm install
Build the core library:
cd notations
pnpm build
pnpm test
Making Changes
- Create a new branch for your feature or fix
- Make your changes with clear commit messages
- Add tests for new functionality
- Ensure all tests pass
- Update documentation as needed
- Submit a pull request
Code Style
The project uses TypeScript with ESLint and Prettier for code formatting:
pnpm lint
pnpm lintfix
Testing
All new features should include tests. Run the test suite:
pnpm test
Tests are located in the src/tests/ directory.
Documentation
Documentation improvements are always welcome. The docs site is built with s3gen:
pnpm run build:docs
cd docs
make run # dev server on http://localhost:8085/notations/
make site # the built site, with its search index, in docs/dist/docs
Documentation files are in docs/content/ and use HTML with frontmatter.
Submitting an Example
Examples on this site should be real notation, checked by someone who knows the music. Parsing isn't enough: an example can parse and still teach the wrong tala or the wrong gati. When you add one, give:
- Source - where the notation comes from: a book, a teacher, or a recording. For a composition, the composer, raga and tala.
- What it shows - one sentence on what the example teaches, which becomes its heading or caption.
- The notation - in a
<notation>block, with one avartanam per line where you can.
A template to copy:
<h2>Adi Tala in Tisra Gati</h2>
<p>Source: ... What it shows: ...</p>
<notation id="a-unique-id" showSource="true" caption="Adi tala in tisra gati">
\cycle("|4|2|2|")
\beatDuration(3)
Sw: S R G R G M G M P M P D P D N D N S. S. N D N D P
</notation>
pnpm test runs every example on the site through the parser. It fails if an example doesn't parse, writes swaras run together (SRG is one note, not three), or names a tala whose \cycle doesn't match it.
Areas for Contribution
- Parser improvements - Better error messages, new syntax features
- Layout algorithms - Improved rendering and spacing
- Gamaka support - Additional embellishment types
- Documentation - Tutorials and notation examples
- Web components - Interactive features, editing capabilities
- Examples - Real compositions notated with the library
Reporting Issues
If you find a bug or have a feature request, please open an issue on GitHub with:
- A clear description of the problem or feature
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Example notation source (if applicable)
Community
Join the discussion and get help:
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and general discussion
License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
See Also
- API Documentation - Understand the codebase
- Reference Documentation - Complete syntax specification