Skip to content

Log the details of every found multi-sample during Analyse (the run log proposed in #336) - #348

Merged
git-moss merged 1 commit into
git-moss:mainfrom
douglas-carmichael:analysis-log
Aug 14, 2026
Merged

Log the details of every found multi-sample during Analyse (the run log proposed in #336)#348
git-moss merged 1 commit into
git-moss:mainfrom
douglas-carmichael:analysis-log

Conversation

@douglas-carmichael

Copy link
Copy Markdown
Contributor

The run log proposed in #336: an option which makes the Analyse run log for every found multi-sample what it contains, so the log of a whole run over a library can be searched for the sources which use a specific feature - e.g. a test file with a filter envelope, a loop cross-fade or a release trigger.

Analysis of 'Feature Test':
  File: /Users/.../Sounds/Feature Test.sfz
  Group 1 'Group 1': 2 zones
    Zone 'tone': keys C1/36..C3/60, root C2/48, velocity 1..100, 48000 Hz, 16 bits, stereo, 3147590 frames, gain -3.0 dB, panning -30 %, tuning +0.10 semi-tones
      Round robin #1
      Loop: forwards 1000..40000, until release, cross-fade 2400 frames
      Amplitude velocity: depth +50 %
      Amplitude envelope: attack 0.010 s, decay 0.500 s, sustain 80 %, release 0.300 s
      Tremolo: 3.20 Hz, depth 6.0 dB
      Vibrato: 5.50 Hz, depth +50 cents, delay 0.200 s
      Filter: low-pass, 2 poles, cutoff 1200 Hz, resonance 6.0 dB, key tracking +8 %
        Filter velocity: depth +60 cents
        Filter envelope: depth +2400 cents, attack 0.200 s, decay 0.400 s, sustain 30 %

Always logged per multi-sample are the file path, the metadata and for every zone the mapping (note name and MIDI number) and the sample format. Everything else appears only when the source actually uses it - which is what makes searching work: Vibrato only matches presets which have one, and the File: line above the match is the test file. Covered are loops (with until-release, cross-fade and loop tuning), the amplitude velocity/envelope/LFO, pitch envelope and LFO, the filter with its velocity/envelope/LFO modulators, round robin positions, triggers other than attack, one-shot, reverse, fixed pitch, exclusive groups, note/velocity cross-fades, play ranges, a pitch bend other than the default 200 cents, polyphony and portamento. A performance logs each instrument with its MIDI channel and key clip.

Rules:

  • The details are logged before any processing, so they describe the source - and not e.g. the category default envelope which the conversion applies to a preset without one.
  • The attribute names are deliberately not translated (the header line is), so a search pattern does not depend on the language of the user interface - the same rule as the column names of Contents dialog: export the list of the found presets and import it back to pick what to convert #336.
  • Values are printed in the units of the model: seconds, Hertz, cents (12000 full scale for the pitch and filter depths, 9600 for the cutoff velocity - the fil_veltrack scale), dB for the tremolo depth (96 full scale) and for the resonance (40 full scale).

It is an option ("Log analysis details" in the Settings dialog) rather than a Debug menu entry, so the CLI has it too: -ad/--analyze-details implies --analyze, and a whole-library run is one redirected command. A run without the option logs exactly what it logged before.

The new code is core/AnalysisLogger; the hook is one call in ConverterBackend.acceptMultisample and acceptPerformance each. Verified with Soundbox packs whose envelope values are known (logged exactly), DirectWave monolithic programs, an SFZ which uses every attribute at once and a constructed performance; a run without the option is unchanged. Compiles with JDK 25/26. The README (Options section and the CLI help) and the CHANGELOG are updated.

The Analyse run can log for every found multi-sample what it contains:
the mapping of its zones with their sample format, loops with their
cross-fades, envelopes, LFOs and the filter with its modulators. Only
attributes which a source actually uses are logged, so searching the
log finds the sources which use a specific feature - e.g. all presets
of a library with a filter envelope, a loop cross-fade or a release
trigger. Enabled with the option 'Log analysis details' in the
Settings dialog or with -ad on the command line.

The details describe the source as it was read, before any processing
is applied. The attribute names are deliberately not translated, so a
search pattern does not depend on the language of the user interface.
@git-moss
git-moss merged commit 18da985 into git-moss:main Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants