Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
42bb726
Initial plan
Copilot Nov 17, 2025
08c7f45
Implement Phase 1 tempo improvements: onset normalization and tempo p…
Copilot Nov 17, 2025
fa2d3d4
Implement Phase 2: confidence caching and adaptive tempo smoothing
Copilot Nov 17, 2025
9518941
Add comprehensive tempo tracking benchmarking infrastructure
Copilot Nov 17, 2025
b4ad94a
Add security assertions and adaptive window sizing (Phase 4 start)
Copilot Nov 17, 2025
48e8332
Complete tempo tracking improvements - final summary and documentation
Copilot Nov 17, 2025
22e4162
Add Python bindings documentation and demo for improved tempo tracking
Copilot Nov 17, 2025
af8710d
Implement Phase 3: Multi-octave tempo detection and enhanced accuracy
Copilot Nov 17, 2025
1f171e9
Complete Phase 3: Dynamic tempo tracking with frame-by-frame analysis
Copilot Nov 17, 2025
1d936cb
Implement Phase 3 remaining items: FFT autocorrelation and advanced API
Copilot Nov 17, 2025
81d4506
Achieve 100% tempo detection with corrected FFT autocorrelation
Copilot Nov 17, 2025
9eaad31
Implement Fourier tempogram infrastructure (Stage 1 complete)
Copilot Nov 17, 2025
2f48676
Add comprehensive tempogram diagnostic test - reveals zero-output bug
Copilot Nov 17, 2025
72de4a5
Fix tempogram buffer size bug - diagnostic test now passes!
Copilot Nov 17, 2025
719ca25
Add real audio integration test with ground truth - reveals onset issue
Copilot Nov 17, 2025
9c17d7c
Add regression test - identifies 140 BPM section detection issue
Copilot Nov 17, 2025
a53b5a8
Add comprehensive tempo test with dynamic WAV/JSON loading
Copilot Nov 17, 2025
fb4f0b1
Fix comprehensive test and reveal actual tempo detection behavior
Copilot Nov 17, 2025
428b192
Implement time-based section matching in comprehensive test
Copilot Nov 17, 2025
b889f81
Initial plan
Copilot Nov 17, 2025
1fc141a
Consolidate tempo documentation into single summary document
Copilot Nov 17, 2025
ec268a7
Merge pull request #36 from LedFx/copilot/review-markdown-files-progress
shauneccles Nov 17, 2025
3472b0b
Initial plan
Copilot Nov 17, 2025
1a76db3
Fix tempogram integration: Feed onset values on every hop
Copilot Nov 17, 2025
7d0258f
Update TEMPO_WORK_SUMMARY.md: Phase 2 completed, remove debug logging
Copilot Nov 17, 2025
403a9d4
Add Phase 2 completion summary document
Copilot Nov 17, 2025
b041ced
Add comprehensive tempogram beat tracking demo
Copilot Nov 17, 2025
fe1b515
Add Phase 3 improvement plan for tempogram real-world audio
Copilot Nov 17, 2025
5f330e9
Merge pull request #37 from LedFx/copilot/update-tempo-work-summary
shauneccles Nov 17, 2025
0f09311
Initial plan
Copilot Nov 17, 2025
8dcf3fe
Implement Phase 3A: Onset Enhancement for tempogram
Copilot Nov 17, 2025
389ba16
Update TEMPO_WORK_SUMMARY.md with Phase 3A completion
Copilot Nov 17, 2025
6d133cc
Merge pull request #38 from LedFx/copilot/update-tempo-work-summary-a…
shauneccles Nov 17, 2025
65a1b2f
Initial plan
Copilot Nov 17, 2025
822ab71
Implement Phase 3B: Multi-Scale Tempogram Analysis
Copilot Nov 17, 2025
534ec91
Refine multi-scale combination strategy
Copilot Nov 17, 2025
1da9b72
Update TEMPO_WORK_SUMMARY.md with Phase 3B completion
Copilot Nov 17, 2025
7f77908
Merge pull request #39 from LedFx/copilot/update-tempo-work-summary-a…
shauneccles Nov 17, 2025
632655b
Initial plan
Copilot Nov 17, 2025
a3d5c4b
Add copilot-setup-steps.yml for enhanced Copilot environment
Copilot Nov 17, 2025
86f3be6
Add comprehensive documentation for copilot-setup-steps.yml
Copilot Nov 17, 2025
1539bc7
Update README with GitHub Copilot setup information
Copilot Nov 17, 2025
3607393
Fix copilot-setup-steps.yml to be valid GitHub Actions workflow and u…
Copilot Nov 17, 2025
4c50921
Refactor copilot-setup-steps.yml to improve workflow triggers and upd…
shauneccles Nov 17, 2025
fe38bbb
Initial plan
Copilot Nov 17, 2025
392458e
Initial exploration - understand current state
Copilot Nov 17, 2025
a9e81fd
Integrate Phase 3B multi-scale into regular tempogram test
Copilot Nov 17, 2025
81d4c22
Document root cause of 50% detection plateau - harmonic ambiguity
Copilot Nov 17, 2025
80493dd
Complete tempo work - comprehensive usage guide and final documentation
Copilot Nov 17, 2025
3bd73c3
move copilot setup stesp to workflows
shauneccles Nov 17, 2025
c054f07
Merge pull request #41 from LedFx/copilot/update-tempo-work-summary-a…
shauneccles Nov 17, 2025
1b2f3ef
Initial plan
Copilot Nov 17, 2025
d8d4762
Remove name from copilot setup steps
shauneccles Nov 17, 2025
7817998
Fix test file paths and pass criteria to match documented behavior
Copilot Nov 17, 2025
a284bf0
Fix meson test working directory issue for tempo benchmark tests
Copilot Nov 17, 2025
5180d3e
Add comprehensive validation report to TEMPO_WORK_SUMMARY.md
Copilot Nov 17, 2025
52671fa
Merge pull request #42 from LedFx/copilot/update-tempo-work-summary-y…
shauneccles Nov 17, 2025
7490259
Initial plan
Copilot Nov 17, 2025
e766c60
Implement Phase 3C: PLP temporal smoothing with median filter
Copilot Nov 17, 2025
32a83f4
Complete Phase 3C: PLP implementation with comprehensive testing and …
Copilot Nov 17, 2025
bc71094
Fix failing tests: correct file paths and baseline expectations
Copilot Nov 18, 2025
1b2a716
Merge pull request #43 from LedFx/copilot/implement-phase-3c-plp
shauneccles Nov 18, 2025
b42f1ab
Initial plan
Copilot Nov 18, 2025
e585b48
Phase 3D Session 1: Research & design complete - Ellis DP algorithm d…
Copilot Nov 18, 2025
fabc1ec
Phase 3D Session 2: Core DP infrastructure implemented and tested
Copilot Nov 18, 2025
8a74fbe
Update TEMPO_WORK_SUMMARY.md with Session 2 completion details
Copilot Nov 18, 2025
4ffd875
Merge pull request #45 from LedFx/copilot/update-tempo-work-summary-o…
shauneccles Nov 18, 2025
df7b2b4
Initial plan
Copilot Nov 18, 2025
62e7ba3
Phase 3D Session 3: DP tracker integration complete
Copilot Nov 18, 2025
517087c
Phase 3D Session 3: Comprehensive DP benchmark and documentation
Copilot Nov 18, 2025
36781ee
Phase 3D Session 3: Final documentation and usage guide
Copilot Nov 18, 2025
6759610
Merge pull request #46 from LedFx/copilot/optimize-tempo-tracking
shauneccles Nov 18, 2025
1593ef5
Initial plan
Copilot Nov 18, 2025
590cca4
Phase 3D Session 4: DP tracker performance profiling and gradual temp…
Copilot Nov 18, 2025
935b08b
Phase 3D Session 5: Complete documentation and code examples
Copilot Nov 18, 2025
56dcb19
CRITICAL FIX: DP tracker was not being used (found and partially fixe…
Copilot Nov 18, 2025
6a0b94e
Update TEMPO_WORK_SUMMARY.md with DP bug findings and plan Sessions +…
Copilot Nov 18, 2025
fc62f8c
Session +1 complete: Created debug tests and identified critical DP bug
Copilot Nov 18, 2025
d4ee866
Session +2 partial: Attempted multiple DP fixes, identified deeper in…
Copilot Nov 18, 2025
eab16e1
Session +2 complete: Documented findings and updated Session +3 plan
Copilot Nov 18, 2025
73800eb
Session +3 attempted: Multiple onset preprocessing strategies tested,…
Copilot Nov 18, 2025
d5e383e
Session +3 complete: Documentation updated with findings and next 3 s…
Copilot Nov 18, 2025
e15e3dc
Session +4 complete: Investigation confirms DP integration fundamenta…
Copilot Nov 18, 2025
ccb7478
Session +5: Comprehensive DP removal plan documented (4 sessions deta…
Copilot Nov 18, 2025
f26f9b8
Merge pull request #47 from LedFx/copilot/validate-tempo-tasks-and-im…
shauneccles Nov 18, 2025
5a8d0ac
Initial plan
Copilot Nov 18, 2025
1e3b187
Session +5A complete: Remove 9 DP test files
Copilot Nov 18, 2025
7f8c7c1
Session +5B complete: Remove DP integration from beattracking and tempo
Copilot Nov 18, 2025
bb7ee19
Session +5C complete: Delete dptracker.c/h source files
Copilot Nov 18, 2025
093ec9d
Session +5D complete: Documentation updated, DP removal finished
Copilot Nov 18, 2025
3ad5ccc
Merge pull request #48 from LedFx/copilot/remove-dp-system
shauneccles Nov 18, 2025
36cce46
Initial plan
Copilot Nov 18, 2025
173a3e5
Add comprehensive Python tests for tempo improvements
Copilot Nov 18, 2025
c49f463
Add Python demo for tempo improvements
Copilot Nov 18, 2025
6e030d5
Add comprehensive Python test summary documentation
Copilot Nov 18, 2025
32a19fd
Add final review completion summary
Copilot Nov 18, 2025
72b92ff
Merge pull request #49 from LedFx/copilot/review-tempo-work-summary
shauneccles Nov 18, 2025
aa13bbf
Initial plan
Copilot Nov 18, 2025
a43fc1e
Fix Windows build error: conditionally include strings.h
Copilot Nov 18, 2025
dbb210e
Merge pull request #50 from LedFx/copilot/fix-build-errors-windows
shauneccles Nov 18, 2025
2633542
Initial plan
Copilot Nov 18, 2025
b69044c
Fix test_rolloff off-by-one error and enable test failure detection i…
Copilot Nov 18, 2025
7156df3
Add comprehensive documentation of CI test fixes
Copilot Nov 18, 2025
cedc615
Organise copilot outputs
shauneccles Nov 18, 2025
5bb92cb
Merge pull request #51 from LedFx/copilot/review-ci-failure-issues
shauneccles Nov 18, 2025
adc8b5d
Improve platform compatibility for temporary file paths in I/O tests …
shauneccles Nov 18, 2025
6f2d100
Enhance dynamic tempo tracking and smoothing in beat detection
shauneccles Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions .github/COPILOT_SETUP_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# Copilot Setup Steps Documentation

This document explains the `.github/copilot-setup-steps.yml` file and how it provides a development environment setup for aubio-ledfx.

## Overview

The `copilot-setup-steps.yml` file is a GitHub Actions workflow that can be used to set up a complete development environment for aubio-ledfx. It installs all necessary tools and dependencies for building, testing, and developing the project.

## What Gets Installed

### 1. System Build Tools
- **Compilers**: gcc, g++ (C99-compliant for aubio)
- **Build systems**: ninja-build (used by Meson)
- **Build utilities**: pkg-config, git
- **Development libraries**:
- libfftw3-dev (FFT library)
- libsndfile1-dev (audio file I/O)
- libsamplerate0-dev (sample rate conversion)
- libjack-dev (JACK audio)
- libavcodec-dev, libavformat-dev, libswresample-dev (FFmpeg)
- librubberband-dev (pitch shifting/time stretching)

### 2. Python Build Environment
- **Python 3.11**: Set up via actions/setup-python
- **Meson**: >=1.9.0 (primary build system)
- **meson-python**: PEP 517 build backend for Python packages
- **ninja**: Build tool (also installed as Python package)
- **NumPy**: >=1.26.4 (required for aubio Python bindings)
- **pip, setuptools, wheel**: Updated to latest versions

### 3. Testing Tools
- **pytest**: Python test runner
- **pytest-cov**: Code coverage for tests
- **build**: Python package build tool
- **uv**: Modern, fast Python package manager

### 4. Security Testing Tools
- **libasan6**: AddressSanitizer runtime library
- **libubsan1**: UndefinedBehaviorSanitizer runtime library
- **valgrind**: Memory error detection tool

These tools enable running the security test suite defined in `.github/workflows/sanitizers.yml`.

### 5. Environment Configuration
Sets up environment variables:
- `PKG_CONFIG_PATH`: Includes system pkg-config paths

## Key Changes from Previous Version

**Removed vcpkg**: The setup now uses system-provided dependencies instead of building them from source with vcpkg. This simplifies the setup and makes it faster, as Ubuntu's package repository provides all necessary libraries.

**System Dependencies**: All C/C++ dependencies are now installed via apt-get:
- Audio codecs and formats via libavcodec-dev, libavformat-dev
- Rubberband for pitch/time manipulation via librubberband-dev
- No need to build these from source
### 6. Verification
- Displays versions of all installed tools
- Lists available system libraries via pkg-config
- Shows installed Python packages
- Provides usage instructions

## How It Works

The `copilot-setup-steps.yml` file is a standard GitHub Actions workflow that can be:

1. Run manually via workflow_dispatch
2. Referenced as a reusable workflow
3. Used as a template for setting up development environments

The workflow has a single job called "setup" that runs on ubuntu-latest and executes 8 steps to configure the environment.

## Usage Examples

After running the setup workflow (manually via GitHub Actions), you can:

### Build the C Library
```bash
meson setup builddir
meson compile -C builddir
```

### Build with Tests Enabled
```bash
meson setup builddir -Dtests=true
meson compile -C builddir
meson test -C builddir
```

### Build with Security Sanitizers
```bash
meson setup builddir -Db_sanitize=address,undefined -Dtests=true
meson compile -C builddir
meson test -C builddir
```

### Build Python Wheel
```bash
# Using uv (faster)
uv build --wheel

# Using pip
pip wheel . --no-deps
```

### Run Tests
```bash
# C tests
meson test -C builddir --print-errorlogs

# Python tests
pytest python/tests/
```

## Benefits

1. **Simplified Setup**: Uses system packages instead of building from source
2. **Faster Setup**: No need to compile dependencies with vcpkg
3. **Complete Toolchain**: All build, test, and security tools available
4. **Standard Workflow**: Follows GitHub Actions best practices

## Maintenance

### Adding New Tools

To add a new tool to the setup:

1. Edit `.github/copilot-setup-steps.yml`
2. Add a new step in the `jobs.setup.steps` section
3. Test the workflow by running it manually
4. Update this documentation

### Adding New Dependencies

For Python dependencies:
- Add to the pip install command in the "Install Python build tools" or "Install Python testing and development tools" step

For system packages:
- Add to the apt-get install command in the "Install system build tools and dependencies" step

## Platform Notes

This setup workflow is designed for **Ubuntu Linux** environments (ubuntu-latest in GitHub Actions).

For local development on other platforms:
- **macOS**: Use Homebrew for system packages (`brew install` instead of `apt-get`)
- **Windows**: Use vcpkg or system package managers, MSVC or MinGW-w64 for compilation

See the main README.md for platform-specific instructions.

## Related Files

- **`.github/copilot-instructions.md`**: Custom instructions for Copilot's behavior
- **`vcpkg.json`**: Declares C/C++ dependencies
- **`pyproject.toml`**: Python package configuration
- **`meson.build`**: Main build system configuration
- **`meson_options.txt`**: Build options and feature toggles
- **`.github/workflows/build.yml`**: CI/CD build workflow
- **`.github/workflows/sanitizers.yml`**: Security testing workflow

## Troubleshooting

### Workflow Fails to Run

If the workflow fails to run, check:
1. GitHub Actions permissions in repository settings
2. Workflow file syntax (validate YAML)
3. Internet connectivity (for downloading packages)

### Missing Dependencies

If dependencies are missing after setup:
```bash
# Manually install system packages
sudo apt-get update
sudo apt-get install -y libfftw3-dev libsndfile1-dev libsamplerate0-dev

# Verify packages are available
pkg-config --list-all | grep -E "fftw3|sndfile|samplerate"
```

## References

- [GitHub Actions Workflow Syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
- [Meson Build System](https://mesonbuild.com/)
- [meson-python](https://meson-python.readthedocs.io/)
- [aubio-ledfx Build Documentation](../doc/building.rst)
- [aubio-ledfx Meson Reference](../doc/meson_reference.rst)
94 changes: 94 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# GitHub Copilot Coding Agent Environment Setup
# This file sets up a complete development environment for aubio-ledfx
# Reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: Copilot Environment Setup

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install system build tools and dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential \
gcc \
g++ \
pkg-config \
git \
ninja-build \
libfftw3-dev \
libsndfile1-dev \
libsamplerate0-dev \
libjack-dev \
libavcodec-dev \
libavformat-dev \
libswresample-dev \
librubberband-dev

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'

- name: Install Python build tools
run: |
python3 -m pip install --upgrade pip setuptools wheel
pip install "meson>=1.9.0" meson-python ninja "numpy>=1.26.4"

- name: Install Python testing and development tools
run: |
pip install pytest pytest-cov build uv

- name: Install sanitizer tools for security testing
run: |
sudo apt-get install -y \
libasan6 \
libubsan1 \
valgrind

- name: Configure environment
run: |
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig" >> $GITHUB_ENV

- name: Verify installation
run: |
echo "=== Installed Tools ==="
python3 --version
meson --version
ninja --version
pkg-config --version
gcc --version
pytest --version

echo ""
echo "=== System Libraries ==="
pkg-config --list-all | grep -E "fftw3|sndfile|samplerate|jack|libav|rubberband" || true

echo ""
echo "=== Python Packages ==="
pip list | grep -E "meson|numpy|pytest|uv"

echo ""
echo "=== Environment Setup Complete ==="
echo "You can now:"
echo " - Build C library: meson setup builddir && meson compile -C builddir"
echo " - Build with tests: meson setup builddir -Dtests=true && meson compile -C builddir"
echo " - Build with sanitizers: meson setup builddir -Db_sanitize=address,undefined -Dtests=true"
echo " - Build Python wheel: uv build --wheel (or pip wheel .)"
echo " - Run tests: meson test -C builddir (C) or pytest python/tests/ (Python)"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ vcpkg_installed/
_codeql_detected_source_root
.vscode/settings.json
tmp_aubio_*

# Generated test audio files
test_bpm_changes.wav
test_bpm_gradual.wav
test_bpm_changes_ground_truth.json
test_bpm_gradual_ground_truth.json
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ Contributing
Patches are welcome: please fork the latest git repository and create a feature
branch. Submitted requests should pass all continuous integration tests.

### GitHub Copilot Support

This repository includes automated environment setup for GitHub Copilot Coding Agent. The `.github/copilot-setup-steps.yml` file ensures that Copilot has all necessary build tools, dependencies, and testing infrastructure pre-installed. For details, see [`.github/COPILOT_SETUP_README.md`](.github/COPILOT_SETUP_README.md).

For optimization and modernization priorities, see:
- [**OPTIMIZATION_SUMMARY.md**](OPTIMIZATION_SUMMARY.md) - Quick reference guide
- [**OPTIMIZATION_ROADMAP.md**](OPTIMIZATION_ROADMAP.md) - Detailed implementation roadmap
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading