Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
78dea79
Updated: todos
JakimPL Aug 15, 2026
3993093
Added: reconstructions subdirectory view
JakimPL Aug 15, 2026
e4f433c
Refactored: browser view
JakimPL Aug 15, 2026
f13261e
Added: multiple browser views
JakimPL Aug 15, 2026
229c6e0
Improved: reconstruction double view
JakimPL Aug 15, 2026
dece1e2
Added: parsed configuration fields
JakimPL Aug 17, 2026
155dbd8
Extracted: the unique sibling label rule
JakimPL Aug 17, 2026
7966af3
Refactored: reconstruction browser tree
JakimPL Aug 17, 2026
8536008
Refactored: reconstruction browser tree
JakimPL Aug 17, 2026
5dc244b
Added: pruning and deterministic ordering of browser groups
JakimPL Aug 17, 2026
9f839b8
Fixed: favourite repainting across both browser views
JakimPL Aug 17, 2026
0557715
Added: single-child group collapsing in the browser
JakimPL Aug 17, 2026
e533aab
Extracted: the shared file-browser panel base
JakimPL Aug 17, 2026
67cce88
Merged: sampletones_core.paths into a sampletones_shared.paths
JakimPL Aug 17, 2026
a2f2ead
Moved: icon generation into the sampletones_assets
JakimPL Aug 17, 2026
e9ef7b4
Excluded: build-time Pillow from the standalone bundles
JakimPL Aug 17, 2026
fafc671
Added: logo to README
JakimPL Aug 17, 2026
c14429b
Tracked: the generated icon suite
JakimPL Aug 17, 2026
49d2485
Improved: workflow
JakimPL Aug 17, 2026
330c25f
Merge pull request #52 from JakimPL/logo
JakimPL Aug 17, 2026
ef37024
Refactored: explorer and library onto the file-browser base
JakimPL Aug 17, 2026
d436b21
Added: context menu on browser container rows
JakimPL Aug 17, 2026
faef770
Added: reconstruction browser document
JakimPL Aug 17, 2026
91e1483
Refactored: tree filtering
JakimPL Aug 17, 2026
3ea5bd0
Added: favorites-only tree filter
JakimPL Aug 17, 2026
19f883c
Added: favorites-only browser control
JakimPL Aug 17, 2026
c0f3df7
Documented: favorites-only browser filter
JakimPL Aug 17, 2026
7249ab1
Fixed: favorites filter label reading as disabled
JakimPL Aug 17, 2026
e94921a
Added: browser view-state test fixture
JakimPL Aug 17, 2026
c273054
Fixed: favorites filter opening a starred folder's whole subtree
JakimPL Aug 17, 2026
ec46621
Added: browser remembering which rows stand open
JakimPL Aug 17, 2026
d53af22
Documented: the favorites filter's rules
JakimPL Aug 17, 2026
192f924
Added: Collapse all control in every file browser card
JakimPL Aug 18, 2026
14ad477
Added: Auto-expand favorites preference per kind of favorite
JakimPL Aug 18, 2026
3fc6404
Added: browser shape surviving between application runs
JakimPL Aug 18, 2026
eb7b1d3
Added: explorer folders standing open between application runs
JakimPL Aug 18, 2026
5a0396c
Added: application mark in the About dialog
JakimPL Aug 18, 2026
ad6144c
Documented: the browser's open rule, its remembered shape and the sweep
JakimPL Aug 18, 2026
2e0c6fc
Changed: auto-expand favorites acting on the reader's switch alone
JakimPL Aug 18, 2026
b37fe92
Changed: the About dialog balancing its mark against the name
JakimPL Aug 18, 2026
7992a51
Fixed: the favorites mode folding the way down to rows the reader opened
JakimPL Aug 18, 2026
25386b1
Refactored: the favorites mode's open rule into one answer per pass
JakimPL Aug 18, 2026
4f78db4
Refactored: the favorites mode's release
JakimPL Aug 18, 2026
6c8aa85
Refactored: the browser's open rows memory
JakimPL Aug 18, 2026
da6e992
Refactored: the browser's opening mode and shape into constructor arg…
JakimPL Aug 18, 2026
fd4b942
Documented: the favorites modes
JakimPL Aug 18, 2026
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Run every pre-commit hook
run: uv run pre-commit run --all-files --show-diff-on-failure --color always

- name: Check the committed icons match the mark
run: uv run pre-commit run icons --all-files --hook-stage pre-push --color always

tests:
name: Tests (${{ matrix.os }}, py${{ matrix.python }})
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
venv_python=.venv-build/bin/python
fi
"$venv_python" -m pip install --upgrade pip
"$venv_python" -m pip install ".[build]"
"$venv_python" -m pip install ".[build]" --group assets

- name: Build the bundle (Linux)
if: runner.os == 'Linux'
Expand Down
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@ __pycache__/
.ipynb_checkpoints/
.mypy_cache/
.pytest_cache/
.ruff_cache/
.venv/
.venv-build/
.vscode/

bin/
build/
dist/
wheels/
!scripts/**/build/
/bin/
/build/

sampletones
!src/sampletones
!tests/sampletones

**/*.idea
**/*.vscode/**
**/*.ipynb_checkpoints/**
**/*__pycache__/**

*.pyc
*.pyo
*.coverage
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ repos:
require_serial: true
exclude: ^(tests/)

- id: icons
name: icons
entry: uv run python scripts/assets/icons.py
language: system
files: ^src/sampletones_assets/(icons|mark)/
pass_filenames: false
verbose: true
stages:
- pre-push

- id: pytest
name: pytest
entry: make test
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Improved Sequencer module playback.
* Added song export to WAV/MP3.
* Added tracker selection operations.
* Added a _SampleToNES_ logo.

## v0.3.0 [2026-07-31]

Expand Down
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ SOFTWARE.

---

The MIT license above covers the SampleToNES source code only.
The MIT license above covers the SampleToNES source code and the application
icons under `src/sampletones_assets/icons/`, which are drawn from the mark
declared in `src/sampletones_assets/mark/`.

Font files bundled under `src/sampletones_assets/fonts/` are the work of third
parties and remain under their own licenses (SIL Open Font License 1.1 and the
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: help setup install build release system-deps run clean pre-commit test \
ftm-samples check-import-boundary check-tag-names check-unused-tags \
ftm-samples icons check-import-boundary check-tag-names check-unused-tags \
check-language-keys check-palette-colors calibration lint pylint mypy format

ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -70,6 +70,7 @@ help:
@echo $(Q) make release - Compile standalone executable with the release deployment config$(Q)
@echo $(Q) make test - Run unit tests with coverage$(Q)
@echo $(Q) make ftm-samples - Emit example .ftm files to build/ftm via the integration suite$(Q)
@echo $(Q) make icons - Generate the icon suite into src/sampletones_assets/icons$(Q)
@echo $(Q) make calibration - Score the reconstruction corpus; the report lands in Documents/SampleToNES/calibration$(Q)
@echo $(Q) make clean - Remove build artifacts and cache files$(Q)
@echo $(Q) make lint - Run linting (pylint, mypy)$(Q)
Expand All @@ -78,6 +79,7 @@ help:

setup:
$(SETUP_ENV) uv sync --group dev $(if $(GPU_EXTRA),--extra $(GPU_EXTRA),)
$(MAKE) icons
$(SETUP_ENV) uv tool install --force $(if $(GPU_EXTRA),".[$(GPU_EXTRA)]",.)

install:
Expand Down Expand Up @@ -109,6 +111,9 @@ ftm-samples: export SAMPLETONES_FTM_OUTPUT_DIR := build/ftm
ftm-samples:
uv run python -m pytest tests/integration/famitracker

icons:
uv run --group assets python scripts/assets/icons.py

check-import-boundary:
uv run scripts/checks/import_boundary.py --all

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
[![Python](https://img.shields.io/pypi/pyversions/sampletones.svg)](https://pypi.org/project/sampletones/)
[![License](https://img.shields.io/pypi/l/sampletones.svg)](https://github.com/JakimPL/SampleToNES/blob/main/LICENSE)

<div align="center">
<img src="https://raw.githubusercontent.com/JakimPL/SampleToNES/main/src/sampletones_assets/icons/sampletones.svg" alt="SampleToNES" width="64">
</div>

## Overview

_SampleToNES_ (`sampletones`) is a desktop tool for people writing music for the NES 2A03 sound chip, mainly in [_FamiTracker_](http://famitracker.com/).

<img src="docs/images/sampletones.png" alt="SampleToNES" width="640">
<img src="https://raw.githubusercontent.com/JakimPL/SampleToNES/main/docs/images/sampletones.png" alt="SampleToNES" width="640">

The core idea is to approximate an audio sample using only the chip's basic oscillators — two pulse channels, a triangle, and noise — **without any DPCM samples**.

Expand Down
15 changes: 15 additions & 0 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,18 @@ The published bundles are **CPU-only**: CuPy, the CUDA runtime and the NVIDIA li
are proprietary, and their EULA reserves redistribution to NVIDIA. GPU acceleration comes
from installing _SampleToNES_ from PyPI with the `gpu` extra, which fetches CuPy and the
CUDA components from their publishers straight to your machine.

## Build-time tooling

The application icons are drawn by `sampletones_assets.mark` and rasterized with
[Pillow](https://pypi.org/project/Pillow/), which is under the
[MIT-CMU license](https://github.com/python-pillow/Pillow/blob/main/LICENSE). Pillow belongs
to the `assets` dependency group alone, so `pip`/`uv` installs it on the machine that
generates the icons: it stays out of the wheel's dependency set, and PyInstaller is told to
leave it out of the bundles. Both distributions carry the finished icon files, so Pillow's
attribution clause — a condition on redistributing Pillow itself — rests with the build
environment.

The icons (`sampletones.svg`, `sampletones.png` and the multi-resolution `sampletones.ico`)
are original _SampleToNES_ artwork and fall under the MIT License together with the rest of
the source.
4 changes: 3 additions & 1 deletion docs/development/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This document describes the design of `sampletones_application` — the GUI front-end of _SampleToNES_. It is prescriptive: it states the contracts each layer must honour, in the form they are enforced, and the rationale behind them. Use it as the reference when deciding where new code belongs.

Concrete classes and modules appear throughout as **examples** that anchor a rule; the rules bind every instance, named or not. Known deviations from these contracts are tracked in `docs/development/bugs-and-todos.md`. Coding-level rules live in `docs/development/guidelines.md`; the undo subsystem has its own design document, `docs/development/undo.md`, the audio transport has `docs/development/playback.md`, and the YAML configuration package has `docs/development/config-organization.md`.
Concrete classes and modules appear throughout as **examples** that anchor a rule; the rules bind every instance, named or not. Known deviations from these contracts are tracked in `docs/development/bugs-and-todos.md`. Coding-level rules live in `docs/development/guidelines.md`; the undo subsystem has its own design document, `docs/development/undo.md`, the audio transport has `docs/development/playback.md`, the reconstruction browser has `docs/development/browser.md`, and the YAML configuration package has `docs/development/config-organization.md`.

---

Expand Down Expand Up @@ -259,6 +259,8 @@ They read the source as an AST through the shared layer in `sampletones_shared/m

`logic/history/` implements the session-scoped undo engine (`HistoryManager`); its invariants and mechanics are documented in `docs/development/undo.md`.

`logic/reconstruction/browser/` builds the tree of reconstructions both browser tabs render (`BrowserManager`); its pipeline, node vocabulary and shaping rules are documented in `docs/development/browser.md`.

**Contracts:**
- Logic classes produce view models and may therefore import `view_model/`; they import neither `ui/` nor `coordinators/`.
- Logic classes never call DPG.
Expand Down
Loading
Loading