Peephole Montage — User Guide

Place listening points directly on a Sound in the Demo window, see the source windows and predicted montage timeline, adjust all montage settings interactively, preview the complete result, and commit only when the edit is ready.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel License: MIT License Repo: Praat AudioTools
Contents:

What this does

Peephole Montage turns listening into the edit decision. A click on the waveform places a temporal anchor. Each anchor opens a window around that moment, and the resulting windows are assembled in the chronological order of the marks.

The entire session takes place in one interactive Demo window: marking, deleting, zooming, selecting montage style, changing joins and fades, previewing individual windows, previewing the full montage, and committing the final result.

The marks are points, not regions. Each point anchors a source window. The window length can be fixed, asymmetric, or adapted from local signal context.

Quick start

  1. Select one Sound. You may optionally also select one PointProcess to preload existing marks.
  2. Run Peephole_montage.praat.
  3. Click the source waveform wherever you want a peephole.
  4. Adjust the montage controls directly in the Demo window.
  5. Press P to build and play a complete preview.
  6. Continue editing if needed. The preview is invalidated whenever the edit changes.
  7. Press Enter to commit exactly the current edit.
Preview before commit: the session seed is shared by preview and final rendering. For stochastic styles, what you approve in the preview is what is committed unless you request a new seed or change the edit.

Demo-window workflow

The main form is deliberately small. It contains only the output name, the PSOLA pitch-analysis range, Picture-window edit-map option, and playback option. All ordinary montage parameters are controlled interactively inside the Demo window.

The window combines:

Marks & navigation

ActionFunction
Click waveformAdd a peephole. Clicking on an existing mark removes it.
Shift-click a markAudition that source window alone.
Click overview stripCentre the zoomed source view on that location.
UUndo the most recent mark edit.
CClear all marks; Undo can restore them.
+ / −Zoom the waveform view.
0Return to the full source duration.
, / .Scroll the current view backward / forward.
SPlay the visible source range.
PBuild and play the complete montage preview.
NGenerate a new session seed.
EnterCommit the montage.
EscCancel without committing the montage.

Peephole windows

Symmetric

start = mark − Window_length / 2 end = mark + Window_length / 2

Asymmetric

start = mark − Pre_length end = mark + Post_length

Every window is clamped to the Sound domain. Windows cut by the file boundaries are therefore shorter than requested and are marked as clipped in the visualization.

Adaptive context

Adaptive Context begins with the current pre/post lengths and changes them using the local intensity of the recording and a preceding-pause test. Intensity is normalized relative to the current file's 10th and 90th intensity percentiles whenever those values are available.

usePre = basePre × (1 + 0.5 × pauseBefore) usePost = basePost × (1.2 − 0.4 × intensityNorm)

A detected pause therefore lengthens the pre-context; stronger local intensity shortens the post-context. The adaptation changes source-window duration, not amplitude.

Four montage styles

StyleBehavior
Pure peepholeUses the selected source windows without style transformation, then applies the chosen edges and joins.
Adaptive contextChanges each source-window length from local intensity and preceding context before extraction.
Unreliable narratorUses a reproducible seed to introduce progressive pitch bias and, for stereo segments, optional L/R channel swaps.
MicroscopeExpands or contracts each peephole. Pitch-preserving mode uses Praat Manipulation / PSOLA; preserve-pitch Off uses true varispeed so pitch and duration move together.

Unreliable narrator

The permitted pitch-bias range grows through the marked sequence:

biasRange(i) = (i / N) × Pitch_bias_range semitones(i) = uniform(−biasRange(i), +biasRange(i))

All channels of a segment use the same pitch ratio, so pitch mutation does not intentionally disturb the stereo image. Stereo channel flipping, when enabled, is a separate 50% decision per segment.

Microscope

A factor of 1 bypasses time transformation. With preserve pitch enabled, each channel is processed through pitch-based overlap-add using the Pitch floor / ceiling values from the form. With preserve pitch disabled, the segment is rendered by varispeed.

Edges & joins

Fade types

FadeImplementation
NoneNo explicit segment-edge envelope.
LinearLinear sample-amplitude ramps.
Raised cosineHalf-cycle raised-cosine fade in / fade out.

Per-segment fade duration is limited to 45% of the processed segment duration so opposite edge fades do not cross.

Join modes

ModeBehavior
Butt + edge fadesSegments are concatenated directly. The selected segment fades create the seam behavior.
Raised-cos overlapPraat's overlap concatenation supplies the internal raised-cosine crossfades. The requested overlap is capped at 40% of the shortest processed segment.
GapExplicit digital silence is inserted between consecutive peepholes.
Processing order: style transformation happens before segment-edge fades, so the requested fade duration is measured in the final processed time domain, including after Microscope stretching.

Preview & session seed

Press P to render and play the current montage without committing it. The same session seed is used for preview and commit, so stochastic decisions remain stable.

Press N to request a new seed. This is particularly useful with Unreliable Narrator when you want another stochastic take while keeping the same marks and parameters.

The timeline initially predicts processed lengths. After a preview is built, the display can use measured segment lengths until the edit changes again.

Output gain handling

ModeBehavior
Attenuate onlyIf the final peak exceeds Peak target, scale down to the target; otherwise preserve the level.
Peak to targetScale any non-silent montage up or down so its measured sample peak reaches the target.
NoneNo final gain change.

Controls & defaults

Main form

ControlDefaultRole
Output namepeephole_montageName of the committed Sound.
Pitch floor75 HzLower analysis bound for pitch-based style processing.
Pitch ceiling600 HzUpper analysis bound for pitch-based style processing.
Draw edit map in Picture windowOnCreates the final edit-map visualization after commit.
Play resultOnAutomatically plays the committed montage.

Interactive defaults

ControlDefault
Window length0.5 s
Asymmetric windowsOff
Pre / Post0.3 s / 0.2 s
FadeRaised cosine, 10 ms
JoinButt + edge fades
Transition amount20 ms
Montage stylePure peephole
Unreliable Narrator stereo flipOn
Unreliable Narrator pitch-bias range0.5 semitone
Microscope time factor2.0
Microscope preserve pitchOn
Microscope downmix stereoOff
Gain handlingAttenuate only
Peak target0.99

Visualization

The live Demo window shows the relation between source time and montage time while you work. It includes the source waveform, highlighted windows, mark numbers, overview navigation, and a montage timeline.

Adaptive Context windows are shown with their current calculated extent. Clipped source windows are visibly distinguished. Microscope mode uses predicted output lengths until a preview supplies measured durations.

When the Picture-window edit map is enabled, commit also produces a static visualization summarizing the final edit.

Outputs

Optional starting marks: if one PointProcess is selected together with the Sound when the script starts, valid points inside the Sound are loaded into the session.

Notes & limitations

Citation

Cohen, S. (2026). Praat AudioTools — Peephole Montage.

Praat AudioTools repository