Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
8 changes: 8 additions & 0 deletions PORTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# PSYCLE-LINUX Porting Policy

## Current work sequencing

The [19 October roadmap decision](ROADMAP.md#current-sequencing-decision--19-october-2026)
defers the previous implementation sequence for the bounded
[normal-playback static pilot](phase6c/REA_SAMPLER_PILOT.md). References below to
immediate Phase 6C/6D work describe the retained deferred plan. Source authority,
provenance, preservation and paired-observation requirements remain unchanged.

## Purpose

PSYCLE-LINUX is a **compatibility and preservation project**, not a clean-sheet DAW rewrite.
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ PSYCLE-LINUX exists to bring the workflow and behaviour of the original Psycle M

This project is not a ground-up DAW redesign.

## Current priority — bounded original-Psycle investigation

The previous implementation roadmap is **deferred**, with its history and
acceptance gates retained. The active work is a small static investigation of
normal Sampler PS1 pitch/sample-rate calculation in the pinned original Psycle
1.12.0 x86 binary, compared with the frozen Linux candidate. See the
[roadmap decision](ROADMAP.md#current-sequencing-decision--19-october-2026) and
[pilot protocol](phase6c/REA_SAMPLER_PILOT.md).

The implementation/evidence status and next-milestone descriptions below are
the retained checkpoint and deferred sequence. A [bounded direct static result](phase6c/REA_SAMPLER_STATIC_RESULT.md) now records
source-corresponding pitch arithmetic; no runtime parity verdict is claimed. A proper v1.0.0 still requires the complete release
acceptance areas in Phase 11, including original-reference runtime evidence.

## Important Architecture Clarification

Direct clarification from long-time Psycle maintainer **JosepMa / JAZ** has made the upstream lineage more precise than the project originally understood it.
Expand Down
24 changes: 24 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# PSYCLE-LINUX Roadmap

## Current sequencing decision — 19 October 2026

The maintainer has **deferred the previous implementation roadmap** in favour of
one bounded, preservation-first investigation toward a proper v1.0.0 stable
release: statically inspect the ordinary Sampler PS1 pitch/sample-rate
calculation in the hash-pinned original Psycle 1.12.0 x86 binary, compare it
with the frozen C++ candidate, and retain reproducible evidence and limitations.
The active plan and exit criteria are in
[`phase6c/REA_SAMPLER_PILOT.md`](phase6c/REA_SAMPLER_PILOT.md).

This is a sequencing change, not completion or cancellation of earlier work.
The phase history, checklists, source baselines, fixtures, matrix verdicts,
private-observation holds and Phase 7 backlog below are preserved. Their
references to “current”, “active”, “next” and the legacy-lane return order
record the deferred plan; this section governs present work. Existing CI and
preservation checks continue. The pending private IT/MIDI observations are not
waived, and the pilot does not clear `AWAITING_OBSERVATION_REVIEW`.

Only the normal-playback static pilot is active. It does not authorize a
malformed-input audit, target execution, broad binary reconstruction, engine
rewrite, UI expansion, merge or release tag. Static correspondence cannot
change a compatibility row from `UNKNOWN`. Phase 11's full release acceptance
areas remain required; finishing this pilot alone cannot establish v1.0.0.

## Guiding Rule

> **Port Psycle to Linux. Do not reinvent Psycle.**
Expand Down
5 changes: 5 additions & 0 deletions phase6c/LEGACY_CLOSEOUT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Phase 6C — Legacy-lane closeout

> Sequencing update, 19 October 2026: the previously described next/return
> ladder is deferred by the [roadmap decision](../ROADMAP.md#current-sequencing-decision--19-october-2026).
> The [bounded static pilot](REA_SAMPLER_PILOT.md) is active; historical evidence,
> pending observations and classification/closeout gates below remain unchanged.

The IT/MIDI detour has an **implementation closeout**, recorded in
[`legacy-closeout.json`](legacy-closeout.json). The repaired donor paths and
remaining capability/translation boundaries have explicit dispositions and
Expand Down
177 changes: 177 additions & 0 deletions phase6c/REA_SAMPLER_PILOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Preservation pilot: original Sampler pitch / sample-rate calculation

## Decision and current evidence state

On 19 October 2026 the maintainer deferred the existing implementation roadmap
for this bounded investigation. Its purpose is to reduce one original-binary
uncertainty before deciding the next compatibility step toward v1.0.0.

**Current result: a bounded direct-objdump observation is recorded in
[the static result](REA_SAMPLER_STATIC_RESULT.md).** The official installer and
extracted executable both match the frozen hashes. With maintainer approval,
Debian innoextract was unpacked locally and used only for static extraction.
Neither the Windows installer nor Psycle was executed; REA itself was not run.
The observed arithmetic and source-correspondence assumptions are recorded
separately from unresolved runtime/precision questions. Independent review and
fresh exact-head Codex review are required before pilot closeout.

The broad Sampler PS1 row and scoped pitch witness remain `UNKNOWN`. The existing
[source contract](evidence/sampler-ps1/source-contract.json) and
[hosted pitch observation](evidence/sampler-ps1/pitch-hosted/observation.json)
are retained, not replaced by this static observation.

## One question, one normal-playback path

For an ordinary note, with no tracker effect, no synchronized-loop mode and
zero fine/coarse tuning, does the pinned original binary calculate sample
advance from the sample's own rate divided by output rate, as the pinned
original source suggests, rather than the frozen candidate's 44,100 Hz basis?

Inspect only the calculation and the minimum caller/data flow needed to bind
its note, base-note, tuning, sample-rate and output-rate inputs. Record arithmetic
width, conversion/rounding and any fixed-point scale actually observed. Do not
assume source names or the recorded crash offset identify this function.
XMSampler, malformed inputs, crashes, exploitability, plugin execution, DRM,
licensing checks and unrelated binary functionality are outside this pilot.
Do not resume the previously stopped malformed-input audit through REA or
another route.

## Authorities and frozen inputs

1. Original Psycle 1.12.0 x86 is the behavioural authority. The installer pin in
[reference provenance](../PHASE6_REFERENCE_PROVENANCE.md) is
`PsycleInstallerx86-1.12.0.exe`, 9,322,919 bytes, SHA-256
`f42c7f542011804346dd924f011684ac40fd7c62c1b25c5de72776f88ea86769`.
The extracted `psycle.exe` pin from the retained hosted pitch observation is
`fdb130d2465d5b4a4acfbfe0bfb2368926380fe07a383c4774f0951591b6d6b6`.
These are distinct artifacts: hashing the installer does not identify the
bytes disassembled. Verify the selected executable before and after reading.
2. Pinned original source is `jpaquim/psycle` commit
`7ac6d2c3553e2ee8dda55814d8e689919c345478`; Sampler.cpp blob
`6cc0bd7328d01131c3d41b68f4e5d4189959e364`. Source correspondence remains
a hypothesis until tied to the binary instruction/data flow.
3. The sanitized r12005 C++ candidate is the implementation under test, frozen
by baseline `00cd95562b78303b82e17f62fff4b58622f7c0e78c0b4dd850d448082a53893a`.
Its `psycle-core/src/psycle/core/sampler.cpp` blob is
`9edc00fb9013fbfde0bb0977398b934265b9c463`.
4. C-Psycle remains a preserved donor and shared-contract aid. Its calculation
cannot decide original-Psycle behaviour or substitute for either runtime side.

Never commit the installer, original executable, restricted dependencies or
unreviewed binary-derived exports. Keep transient inputs outside public evidence
roots. Review provenance/redistribution scope before publishing any disassembly;
prefer a minimal necessary excerpt, addresses, hashes and independently written
formula/limitations. Do not change historical fixtures, manifests or verdicts.

## Provider readiness and bounded static procedure

The preparation environment has GNU objdump 2.44 with `pei-i386` coverage.
The direct pass and its tool/extraction pins are recorded in the static result.
REA, Ghidra and Rizin were not found on PATH and were not installed. Provider
capability output alone is not proof of successful analysis of an artifact.

REA is the proposed investigation interface, not an authority or sandbox.
The documentation reviewed is from [morluto/rea](https://github.com/morluto/rea),
with package.json at commit `e4c3d72396bf925a45724ce8b18b238b0d23d787`
reporting 6.7.0. This is a source-documentation identity, not an installed or
verified package identity. Before using REA, pin the actual package/version and
provider executable/version, confirm the intended static capability, and obtain
any required installation/configuration approval. Do not run an unpinned
`npx ...@latest setup` as part of this pilot.

The reviewed [objdump integration](https://github.com/morluto/rea/blob/e4c3d72396bf925a45724ce8b18b238b0d23d787/docs/reverse-engineering-tools.md)
retains raw provider output and before/after artifact hashes. Identical hashes
alone do not prove the exact bytes consumed if another process can mutate the
file. Use a controlled local copy with no concurrent writers, record custody,
and reject changed inputs, failed calls or truncated relevant output.

A direct installed-objdump pass is a permitted static preparation path while
REA is unavailable; label it **direct objdump**, never as REA execution.

1. Verify executable SHA-256 against the pin; record byte count and acquisition
source/custody without exposing private paths or credentials.
2. Record tool path, executable hash, version, host architecture, arguments,
environment relevant to decoding, exit status and complete stdout/stderr.
3. Inspect PE headers and section mapping without launching the target. Keep
architecture, image base, section RVA/file offsets and decoding mode explicit.
4. Locate candidate normal-note arithmetic using source/constants/callers only
as search hints. Disassemble a bounded range, then verify branch and input
provenance. Record start/end RVA, virtual-address basis, corresponding file
offsets, instruction bytes and output digest. Expand only enough to resolve
the stated calculation; an unresolved call/input ends in an explicit unknown.
5. Translate observed arithmetic into an independently explained formula with
units, assumptions and unresolved details. Compare with the frozen candidate
source, including casts and assignment to the speed field. Preserve both
agreeing and contradicting observations.
6. Produce an evidence index with relative output paths and SHA-256 digests,
references to source blobs, and separate observed facts/inferences. Retain
raw output privately if publication rights are not established.

Static processing must not execute `psycle.exe`, its installer, scripts from
an input archive, plugins, or provider debugger/capture commands. If extraction
requires new software or executing an installer, stop that step and obtain the
necessary approval; an already-extracted matching executable is sufficient.
Native Windows runtime capture is unavailable in the reviewed
[REA capture workflow](https://github.com/morluto/rea/blob/e4c3d72396bf925a45724ce8b18b238b0d23d787/docs/process-capture.md).
REA capture runs with user permissions and is not a sandbox. WSL/Linux capture
cannot be presented as native Windows observation.

## Source-derived prediction to test, not a recovered-binary result

The retained source contract says original speed uses sample-rate/output-rate;
the candidate ordinary-note expression at sampler.cpp lines 635–639 uses
`pow(2, (note + waveTune - baseC + waveFinetune/256)/12) * 2^32 * (44100/output_rate)`.
The synchronized-loop branch is separate and excluded. Validate line references
against the pinned blob, not a future moving file.

Holding the note exponent at zero gives these mathematical predictions:

| Sample rate | Output rate | Source-indicated original advance | Candidate expression advance |
| --- | --- | --- | --- |
| 44,100 | 44,100 | 1 | 1 |
| 22,050 | 44,100 | 1/2 | 1 |
| 48,000 | 48,000 | 1 | 147/160 |

Advance is sample frames per output frame, before fixed-point conversion.
These are algebraic hypotheses, not executed test vectors or audible results.
Check base-note mapping, input field meaning, resampling and rounding before
using them as test expectations. Do not invent the original instruction formula
from this table.

## Pilot exit and next decision

The static pilot may close only with all of the following reviewed:

- exact original executable identity and custody, and actual tool/provider pins;
- a bounded instruction/data-flow mapping, or a clearly documented inability to
recover it without unsupported assumptions;
- raw evidence hashes, address/offset basis, formula, assumptions and limitations;
- source-bound candidate comparison, explicitly distinguishing executed provider
calls, source reading and inferred predictions;
- independent review and fresh Codex review of the exact PR head, with actionable
findings stated as minimal reproduction, expected versus actual, consequence,
and executed versus inferred evidence;
- no historical fixture, matrix verdict, licensing boundary or prior gate weakened.

An inconclusive mapping is a valid pilot outcome, not a parity result. It must
name the next required artifact/provider/observation before further work.
A docs-only preparation PR does not satisfy the binary-analysis exit criteria.

If the mapping is useful, propose one paired **normal-note pitch** observation
using project-authored PCM and the same hash-bound fixture semantics on pinned
original native Windows and the frozen candidate. Reuse the maintained pitch
collector after checking its assumptions; preserve the previous crashed attempt.
Predeclare the pitch/duration metric and tolerance, fixture bridge differences,
output sample rate, base note, tuning, render procedure and deterministic-repeat
requirement. Actual original/candidate outputs, identity-bound receipts and a
reviewed comparison remain necessary for any scoped compatibility verdict.
Static formula agreement cannot clear the existing runtime gate.

Only then consider the smallest evidence-justified engine patch, with forward
regressions; do not rewrite or replace the engine based on this pilot. Resume or
resequence the deferred roadmap explicitly after reviewing the pilot outcome.
The private IT/MIDI observation holds and active-engine required-check governance
remain open. All [Phase 11 acceptance areas](../ROADMAP.md#phase-11--reliability-suite-and-psycle-linux-10)
still apply before a stable v1.0.0 release, including usable tracker workflow,
plugin containment, hardware, packaging and long-session reliability. No merge
or release tag is part of this pilot preparation.
Loading
Loading