Skip to content

Latest commit

 

History

History
168 lines (120 loc) · 3.96 KB

File metadata and controls

168 lines (120 loc) · 3.96 KB

Contributing to Soundscape

Thank you for your interest in contributing to SoundSwarm! This document provides guidelines and information for contributors.

Code of Conduct

By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.

How to Contribute

Reporting Bugs

If you find a bug, please create an issue with:

  1. Title: A clear, descriptive title
  2. Description: What happened vs. what you expected
  3. Steps to Reproduce: How can we recreate the issue?
  4. Environment: Browser, OS, device type
  5. Screenshots: If applicable

Suggesting Features

Feature requests are welcome! Please create an issue with:

  1. Title: Brief description of the feature
  2. Problem: What problem does this solve?
  3. Solution: Your proposed solution
  4. Alternatives: Any alternatives you've considered

Pull Requests

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/amazing-feature)
  3. Make your changes following the code style guidelines
  4. Test your changes thoroughly
  5. Commit with clear messages (git commit -m 'Add amazing feature')
  6. Push to your branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Style Guidelines

JavaScript

  • Use const and let, never var
  • Use meaningful variable and function names
  • Add JSDoc comments for functions
  • Keep functions focused and small
  • Use async/await for asynchronous code
/**
 * Calculate the frequency for a given note
 * @param {string} note - Note name (e.g., "C4")
 * @returns {number} Frequency in Hz
 */
function getFrequency(note) {
  return NOTE_FREQUENCIES[note] || 440;
}

CSS

  • Use CSS custom properties for colors and common values
  • Group related properties together
  • Use meaningful class names
  • Comment sections for organization
/* ============================================
   Section Name
   ============================================ */

.component {
  /* Layout */
  display: flex;

  /* Spacing */
  padding: 20px;

  /* Visual */
  background: var(--bg-color);
}

HTML

  • Use semantic elements (<header>, <main>, <footer>, etc.)
  • Include appropriate ARIA attributes for accessibility
  • Keep markup clean and well-indented

Development Setup

  1. Clone your fork:

    git clone https://github.com/your-username/soundswarm.git
    cd soundswarm
  2. Start a local server:

    python -m http.server 8000
  3. Open http://localhost:8000

Testing

Before submitting a PR, please test:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile Safari (if possible)
  • Different screen sizes

Audio Testing Checklist

  • Sound plays without clicks or pops
  • Note transitions are smooth
  • Arpeggiator works correctly
  • Settings persist after reload
  • iOS Safari audio works (if you have access)

Project Structure

soundswarm/
├── index.html      # Main entry point
├── styles.css      # All styles
├── app.js          # Application logic
├── README.md       # Project documentation
├── CONTRIBUTING.md # This file
├── LICENSE         # MIT License
└── .gitignore      # Git ignore rules

Areas for Contribution

Here are some areas where contributions would be especially welcome:

Good First Issues

  • Improve documentation
  • Add more chord presets
  • Improve mobile UI/UX
  • Add keyboard shortcuts

Intermediate

  • Add new waveform visualizations
  • Implement MIDI input support
  • Add recording/export functionality
  • Create a chord builder UI

Advanced

  • Add WebRTC for real-time collaboration
  • Implement a backend for session coordination
  • Add support for custom samples
  • Create a PWA with offline support

Questions?

Feel free to open an issue with the "question" label if you have any questions about contributing.

Thank you for helping make SoundSwarmbetter! 🎵