AudioTools Call & Response

Play a phrase. Hear an answer. Let the music remember. A continuously listening performance partner that analyses gestures, transforms sound with six Praat AudioTools scripts, retrieves sonic memory and shapes polyphonic responses in stereo space.

Author: Shai CohenAffiliation: Department of Music, Bar-Ilan University, IsraelCategory: Vector Chain / Interactive PerformanceVersion: 0.4.12 (2026)License: MIT LicenseRepo: Praat AudioTools
Contents:

What this does

AudioTools Call & Response is a phrase-based, interactive co-improvisation system. It listens to a live performer, analyses a completed acoustic gesture and chooses an appropriate musical response. A stable pitched sound, a noise texture, a sequence of attacks and a glissando lead to different transformation possibilities. The same performance can also recall earlier material, transform a recalled sound or play unprocessed sounds from a prepared corpus.

The system accumulates a sonic memory of live phrases (Corpus A), computer-generated results (Corpus B) and optional prepared recordings (Corpus C). Its retrieval considers both the current phrase and a decaying history of earlier phrases. Independently, its stereo mixer can add secondary memory voices and a quieter evolving background.

Compositional principle: musical gestures become instructions for analysis, retrieval, transformation, memory and spatial arrangement. The computer can remember material created by its own earlier answers without rewriting the original source files.

Key capabilities in v0.4.12:

Quick start

  1. Connect the microphone or instrument to the intended input device, and select an output device. Use headphones or isolated monitoring to reduce audio feedback into the microphone.
  2. Set input gain before starting. While you are silent, ordinary room noise should not trigger the detector. During normal playing, the input should register clearly without clipping. See Microphone setup and sensitivity below.
  3. In Praat, run AudioTools_CallResponse.praat and choose Source: Live - continuous (v0.2). For the full memory system, choose Preset: Hybrid memory (default); the form's initial preset is Custom (form and dialogs).
  4. Keep Transformation: Automatic (gesture classifier). You do not need a prepared corpus for Hybrid memory: leave Corpus_C_folder empty to build memory from the performance.
  5. Start the session and remain quiet while the display reads STAY QUIET (input calibration). Once it reads PLAY WHEN READY, you can begin.
  6. When it reads RECORDING YOUR PHRASE, finish the gesture and leave a pause below the end threshold. The default required quiet interval is 0.6 seconds. The display then shows PHRASE CAPTURED briefly.
  7. You may play again immediately, even while a response is sounding. Processing and playback are separate from the microphone's listening state.
  8. Use the on-screen STOP button or Esc / S (with the Demo window focused) to end the session and allow cleanup to finish.
Important for first use: if a chair movement, ventilation, conversation or other external noise starts a phrase, first reduce the microphone's physical/input gain where appropriate. If normal performance is still captured clearly but environmental noise triggers the system, increase Sensitivity_dB (for example, try 12 instead of 9). A larger sensitivity value means less sensitive onset detection; it does not reduce microphone gain. Recheck quiet gestures after every adjustment.

Microphone setup, input gain and sensitivity

The phrase detector reacts to audio arriving at the input, not only to sounds intentionally performed by the musician. Footsteps, handling noise, air conditioning or nearby speech can therefore appear to be musical gestures, particularly with inappropriate microphone placement or gain. This is a practical limitation of energy-based phrase detection, not a feature of the Hybrid memory response mode.

Calibrate the microphone before performance. The input should capture your quietest intended gesture reliably, but background sounds should remain below the detector's start threshold. Avoid clipping and excessive preamplification. Since the detector is partly relative to the calibrated background, reducing gain scales both the intended signal and room noise; by itself, it may not prevent false triggers. Place the microphone close to the performer and away from noise sources when possible. Set the hardware/audio-interface gain first; if using a computer microphone, also inspect the operating system's input level and any automatic gain control or microphone enhancement options.
ControlWhat it actually changesWhen to use it
Microphone / interface input gainAmplifies or attenuates all incoming audio: the performer and the room together.Reduce it when ordinary background events are entering the system at excessive levels. Do not reduce it so far that quiet musical gestures disappear.
Sensitivity_dB
Default: 9 dB
Requires a phrase onset to rise farther above the calibrated noise floor. Higher = less sensitive; lower = more sensitive.Try a modest increase if external noise still triggers the detector after gain is set correctly. Then test soft playing.
Min_phrase_s
Default: 0.5 s
Rejects detected activity too short to count as a complete phrase.Can help with brief clicks or knocks; it will not prevent longer external noises from triggering.
End_silence_s
Default: 0.6 s
Sets how long the input must remain below the end threshold before a phrase is complete.Change to shape the phrasing: shorter for quicker exchanges, longer to allow internal pauses.

Practical sound-check

  1. With your instrument silent, observe the input meter and the DETECTOR values. Routine background noise should stay below start; the screen should remain at PLAY WHEN READY.
  2. Play the quietest gesture you expect to use. Check that the screen changes to RECORDING YOUR PHRASE and that your full gesture is captured.
  3. Stop playing. The quiet counter should advance toward the required duration, and PHRASE CAPTURED should appear.
  4. Play a normal and a strong gesture. Confirm that the input is clear and not distorted or clipped. The meter is a detection guide, not a substitute for an audio-interface clipping indicator.
  5. If external noises trigger responses, adjust the hardware gain and, when necessary, increase Sensitivity_dB in small steps. Restart the session after changing input gain so that the detector can recalibrate under the new conditions.
Two different kinds of level control: microphone gain and Sensitivity_dB govern what is detected. Level_matching and Follow_live_input govern the level of computer responses after a phrase has already been detected. Playback-level matching does not stop an external noise from becoming a phrase.

Core concept: listen, transform, remember and spatialise

LIVE PERFORMER (microphone remains open) | calibrated phrase detector | acoustic gesture features | current phrase + recent history | +---------+-----------+ | | transformation sonic-memory search classification A / B / optional C | | +---------+-----------+ | response mode decision transform / recall / recall + transform or strict unprocessed Corpus C recall | Praat rendering (if needed) | foreground stereo response + optional memory layer / background | OUTPUT AUDIO | processed results may enter Corpus B The microphone listens independently of the response mixer.

Python captures and analyses live sound, detects phrase boundaries, selects from memory, schedules responses and mixes playback. The existing Praat AudioTools scripts render the six transformations. These transformations act on completed phrases, rather than running as continuous sample-by-sample effects.

In Continuous mode the next phrase can begin while earlier answers play or render. Hybrid memory may produce a response, a later memory layer and an independent background, but those activities do not determine when the performer must play or stop.

Input and performance modes

SourceHow it behavesBest use
Live - continuous (v0.2)A persistent microphone stream captures successive phrases while analysis, memory search, rendering and playback proceed independently.Interactive improvisation with memory, spatial voices and possible overlap.
Live - turn-taking (v0.1.3)One phrase is listened to, processed and played before the next listening cycle.Sequential demonstrations and clear one-to-one exchanges.
Selected Sound(s)Processes selected Praat Sound objects without microphone recording; can test all six transformations.Offline analysis and controlled comparisons.
List audio devicesLists available input and output devices and their identifying numbers.Routing and installation checks.

The Transformation field may be automatic or forced to a particular script. Test all six is only for selected Sounds. A forced selection does not make ineligible material necessarily produce a valid transformation.

What ends a phrase? Ordinarily, silence below the end threshold for End_silence_s. The engine also has a Max_phrase_s safety limit (12 s by default): long gestures may be split at a relatively quiet point and carried into another phrase without demanding that the performer stop. The display distinguishes this maximum-duration split from a natural pause.

Six gesture-dependent transformations

The automatic classifier compares several acoustic and morphological measurements rather than using a single instrument label. The following are musical tendencies, not promises that every example will select the named transformation. Several candidates can be plausible, and a candidate must meet its own eligibility requirements.

Performed soundAudioTools transformationMusical response
Stable, sustained harmonic tone
Clear pitch, high harmonicity, relatively few attacks.
PaulstretchExtends time and unfolds a sustained spectral texture, with stretch parameters derived from the phrase.
Noisy or aperiodic texture
Broadband energy, weak periodicity, changing timbre.
Markov Soundscape WeaverReorganises analysed grains or spectral states into a probabilistic soundscape.
Several discrete attacks
Recognisable separate events with contrasting characteristics.
MDS Space NavigatorReorders sound segments according to their measured timbral relationships.
Continuous glissando
Coherent pitch movement across a sufficiently voiced phrase.
Spiral Pitch DanceDerives pitch-motion and spiral parameters from the detected gesture.
Complex dynamic envelope
Multiple amplitude peaks, swells and a substantial dynamic range.
8-Channel Speed Deviations (MAX MC)Disperses the source into eight varispeed voices. Each channel has a fixed, individually chosen playback speed; speed affects pitch and duration together.
Percussive phrase with changing density
Recognisable transients and variable event spacing.
Percussive Groove CreatorCreates rhythmic reorganisation using detected attacks, density and tempo-related parameters.

The system also considers pitch continuity, harmonic-to-noise ratio, spectral shape, MFCC-related timbre, onset density, envelope complexity, segmentation and other measurements. If no eligible transformation exceeds its confidence threshold, the source phrase can be returned unchanged instead of forcing an inappropriate effect. A rendering failure likewise has a documented passthrough fallback.

About MAX MC: a complex amplitude envelope determines the spread between channel speeds. The envelope is not used to accelerate and decelerate each voice continuously. The independent varispeed channels produce differences in pitch, duration and stereo texture.

Three sonic-memory corpora

The memory engine distinguishes the origin of a stored sound. These collections are separate, but they share one similarity-search and response-selection system.

Corpus A · Live performance

Original phrases captured during the current session. Each phrase is analysed and added after the system has searched for its response, preventing immediate self-retrieval. This is the performer's unfolding musical history.

Corpus B · Processed memory

New audio rendered by Praat AudioTools. Every stored result is analysed from its actual processed sound, with a record of its parent phrase, effect and processing generation. This is a memory of what the computer has made.

Corpus C · Prepared reference material

An optional folder of existing recordings supplied by the musician. Longer recordings are divided into usable segments and indexed before the performance. The source files are treated as read-only.

You do not need Corpus C. Leave Corpus_C_folder blank to improvise with only A and B. At the beginning those corpora are empty; the system creates new responses first, then gains more recall possibilities as the performance develops. When a corpus is empty or disabled, its selection weight is redistributed to the sources that are available.

Corpus A is not the same as Corpus B. A played flute phrase may be stored in A, while an extended, noisy or varispeed-derived answer to that phrase enters B as a different sound with different acoustic measurements. Material from B can later return as a memory layer or be subjected to another appropriate transformation.

Stored items carry ancestry and generation information. The system excludes the currently analysed phrase, can avoid very recent material, enforces recall cooldowns and limits successive transformations. Simply replaying a stored phrase does not count as creating a new processed sound.

The live and processed corpora are held in RAM with limits on item count and total stored audio. An optional prepared corpus can be indexed in RAM and reread from its original files on demand when memory is constrained. The performance memory is session-specific: it is not automatically saved as a permanent sound library.

How sonic memory is retrieved

The engine describes each captured phrase using acoustic and temporal features. Candidate sounds in enabled memory corpora are compared on normalised timbre, pitch gesture, rhythmic pattern, amplitude envelope and duration. It can refine matches using time-varying pitch and envelope contours.

Similarity modePrimary emphasisPossible musical relationship
Hybrid (default)Timbre, pitch gesture, rhythm, envelope and duration combined.A similar overall gesture from an earlier moment.
TimbreMFCC and spectral properties.A noisy sound retrieving related noisy material.
Pitch gesturePitch movement and contour when pitch is reliable; unpitched queries use a hybrid fallback.An ascending contour finding a related pitch trajectory.
RhythmOnsets, inter-onset timing and density.A repeated or accelerating rhythmic gesture.
EnvelopeAmplitude pattern and energy development.A swell retrieving a similar dynamic shape.
ContrastRelatively different rather than nearest-match candidates.A sustained tone suggesting a contrasting event.

Candidate selection includes similarity thresholds, controlled randomness, recall cooldown and exclusion of very recent or closely related sources. The similarity scores describe measured acoustic relationships; they are not a semantic interpretation of a phrase's musical intention.

Phrase-level influence memory

New in v0.4.8, refined in v0.4.9. Retrieval is no longer based exclusively on the last phrase. The recent history of gestures can influence the next memory match. Each older gesture has a smaller weight, and its relevance decreases with elapsed time. This provides short-term contextual memory while preserving the priority of the most recent phrase.

Candidate score = weighted similarity to the current phrase + decaying similarity to earlier phrases + optional projected gesture trend Earlier influence is reduced if it does not resemble the current idea. The most recent phrase remains the primary reference.
ControlDefaultMeaning
Influence_depth3The latest phrase and up to two preceding phrases contribute. Set to 1 to use only the latest phrase.
Influence_decay0.5Reduces weight as a gesture moves farther back in the phrase sequence.
Trend_weight0 (off)Optionally adds a query extrapolating a descriptor trend from the two most recent phrases.
Time decay45 s half-lifeThe influence of previous phrases also fades as actual performance time passes. This value is internal, not a separate form control.
Coherence gatingAutomaticReduces an older phrase's influence when it is acoustically unrelated to the present gesture, helping a new idea take precedence.

The system uses the phrase's actual ending time to age its influence, rather than the time an analysis thread happens to process it. The Memory Map can show pale-lilac influence arcs whose weights represent contributions to a chosen memory match.

Try this: repeat a short sequence of related gestures first with Influence_depth = 1, then with the default value 3. The comparison isolates the effect of recent history on retrieval, without changing the six transformation scripts.

How a new response is chosen

Response modeBehavior
Transform onlyAnalyse the latest phrase and attempt one appropriate Praat AudioTools transformation.
RecallPlay a qualified stored sound without additional transformation. If no match qualifies, the ordinary Recall mode may fall back to a new transformation.
Recall + TransformRetrieve suitable memory and process that sound through an eligible transformation, subject to the generation limit.
Hybrid (default action mode)Choose between new transformation, unprocessed recall and transformed recall, according to configurable weights and available material.
Corpus only - unprocessed recallStrict corpus-only mode: play matching prepared Corpus C sounds without Praat effects. If no match qualifies, remain silent and keep listening; no transformation or phrase passthrough fallback.

The default Hybrid action weights are 40 : 30 : 30 (Transform : Recall : Recall + Transform). They are conditional weights, not guaranteed playback percentages. By default, corpus source priorities are A 40, B 30, C 30; unavailable corpora do not supply candidates. Corpus-only recall bypasses the transformations and automatic memory layers/background.

Important distinction: selecting ordinary Recall is not the same as selecting Corpus only - unprocessed recall. The latter is the mode to use when no audio transformation is permitted under any circumstance, including when no qualified match is found.

Performance presets

The form's Preset menu provides ready-made musical configurations for Continuous mode. The first choice, Custom (form and dialogs), uses the current form/dialog settings. A named preset pre-fills and overrides the associated Sonic Memory and Playback values; tick Memory_settings or Playback_settings to inspect and fine-tune those values before starting. Presets do not replace the selected input device or microphone sensitivity.

PresetPrincipal behavior
Classic transform (v0.2)One new transformation per phrase, no Sonic Memory, no polyphony or background.
Transform + ambienceTransform-only responses over a quiet texture built from sound accumulated during the session.
Hybrid memory (default)Transform, recall and transformed recall with memory A/B and optional C; polyphony and background enabled.
Echo memory (recall own phrases)Emphasises recalling material gathered from the performance; no preloaded Corpus C retrieval.
Corpus only - hybrid / timbre / pitch gesture / rhythm / contrastStrict unprocessed recalls from prepared Corpus C, using the named matching strategy. No matching candidate means silence.
Corpus re-composed (corpus + transform)Retrieves prepared C material and transforms it with one of the six Praat engines.
Dense ensembleMore simultaneous voices, frequent memory layers and a wider, more mobile stereo image.
Sparse / intimateFewer voices, little layering, reduced space and no background.
Ambient bedMore present, slowly changing background, longer fades and evolving memory priorities.
Percussive / rhythmicRhythm-oriented memory matching, short envelopes and preserved attacks.
Prepared-corpus requirement: all Corpus-only presets and Corpus re-composed require a valid Corpus_C_folder. For a first session without prepared recordings, use Hybrid memory (default) or Classic transform.

Polyphony: responses, layers and background

In Continuous mode, foreground answers can overlap. The mixer also supports lower-priority secondary memory layers and an evolving background, creating an autonomous sonic environment based on previously heard material.

Foreground response

The main answer to a completed performer phrase. It has highest priority, can overlap earlier foreground answers and is not routinely stolen by lower-priority layers.

Secondary memory layer

An additional sound from available memory, often arriving 0.6-3.5 s after an answer. It may follow the phrase's rhythmic pulse and occupies a different stereo position.

Background texture

Quiet, evolving sound drawn from memory and recent computer answers. It continues independently of detected phrase starts and ends, and recedes under stronger activity.

Polyphonic_density controls how often a secondary layer is attempted; eligibility and mixer capacity also matter. Max_voices defaults to four. When resources are crowded, a new high-priority response may fade out an older background or secondary voice. A departing voice may remain audible briefly during its fade.

Layer_shape defaults to Whole sounds: recalled and layered sounds are played in their entirety where possible. The alternative Excerpts (onset -> natural end) starts at an onset earlier in the sound and continues to its natural end. Processed Corpus B retains complete rendered answers up to the playback cap, rather than unconditionally keeping only the first 15 seconds.

Turn off Polyphony for one computer answer at a time; the evolving background is also inactive in that mode. This is useful for a controlled comparison but is not required for normal interaction.

Stereo space, dynamics and level protection

The mixer positions answers independently of the transformation engine. It preserves genuine stereo sources, pans mono material using equal-power placement, and optionally moves voices smoothly over time.

MechanismWhat it does
Equal-power placementPlaces mono sources across stereo without adding delays or synthetic decorrelation.
Preserved stereo materialMaintains the existing left-right character while permitting bounded width and balance adjustments.
Spatial_movementCreates slow, smooth movement; zero leaves sources fixed.
Fade envelopesControls soft entrances and exits, with shorter attack fades for transient material.
Level_matchingUses stereo-aware, K-weighted active loudness to balance roles. Default role targets are approximately -18 dB (foreground), -24 dB (secondary) and -33 dB (background).
Burst safeguardLimits gain for sounds with especially intense 100 ms bursts, such as some percussive results; this is a static adjustment per sound, not a dynamic compressor.
Per-voice peak controlChecks peaks after spatial placement; the summed stereo mix has an additional limiter for overlaps.
Follow_live_inputOptionally shifts response targets according to a smoothed relative change in the performer's captured loudness. Off by default; it does not control onset sensitivity.
Corpus_C_balance_dBOptional balance offset for preloaded Corpus C material at playback, without rewriting corpus recordings.

The system applies one gain to each sound to preserve its internal dynamics as far as possible. Gain caps and a peak ceiling still constrain the result. Level matching cannot prevent false phrase detection caused by external microphone noise.

Useful comparison: play the same material with Spatial_movement = 0 and then with the default value. You can also compare Level_matching on and off to hear how loudness balancing affects timbral and dynamic contrasts.

Evolving background texture

With Background_layer enabled, the system can construct low-level textures from its sonic memory. It selects available source material, favours suitable sustained sounds, combines overlapping excerpts or grains and gently filters and moves the result. New textures replace old ones through overlapping fades rather than hard switching.

The default reference level is −33 dBFS (a low active-RMS target when level matching is enabled). The background is reduced while the performer is active or when foreground answers occupy the space; it gradually returns when the foreground becomes less busy. If microphone leakage becomes strong, the background may pause to avoid repeatedly exciting the phrase detector.

The background starts from real material. Without a prepared corpus, there is no background sound before the system has collected suitable performance phrases or computer answers. It does not introduce a synthetic noise bed simply to fill the silence.

From a compositional perspective, Background ON creates an environment with continuity; Background OFF allows silence to remain a more explicit part of the musical dialogue. Both are useful, and neither changes the source sounds stored in memory.

Main Praat interface

Performance and listening controls

FieldFunction
PresetChoose Custom or a prepared musical configuration. Named presets mainly affect Sonic Memory and Playback; see Performance presets.
SourceContinuous microphone, sequential turn-taking, selected Praat Sounds or device listing.
TransformationAutomatic classifier, specific processor or Test all six (selected Sounds only).
CyclesNumber of turns in turn-taking or selected-Sound modes; not the number of gestures in a Continuous session.
Input_device / Output_deviceUse default, a device index or a distinctive part of the audio device name.
Sensitivity_dBOnset level required above the calibrated background. Higher values make the detector less sensitive; default 9 dB.
Min_phrase_sShortest accepted phrase; default 0.5 s.
End_silence_sQuiet interval needed for a natural phrase ending; default 0.6 s.
Max_phrase_sMaximum capture length; long gestures can be split and continued. Default 12 s.
Sonic_memoryEnable memory and corpus-based decisions for Continuous performance.
Response_modeHybrid, Transform only, Recall, Recall + Transform or strict Corpus-only unprocessed Recall.
Corpus_C_folderPrepared recordings directory (optional except for the corpus presets).
Memory_settingsOpen corpus, similarity, action-weight, limits and influence dialogs.
Playback_settingsOpen polyphony, layer shape, background, space, fades and level controls.
Debug_logStore session diagnostics temporarily; logs are intended to be removed during successful cleanup.
Advanced_settingsSet audio rate/channels, queue limits, timing, output and leakage controls.
Gain staging: if environmental sounds start unwanted phrases, adjust the microphone/interface input gain and then, if needed, increase Sensitivity_dB. For detailed instructions see Microphone setup and sensitivity.

Sonic Memory settings

Corpora, similarity and decision weights

ControlMeaning
Use_live_corpus_AStore accepted performer phrases for later recall.
Use_processed_corpus_BStore and analyse newly rendered answers as independent memory items.
Use_preloaded_corpus_CSearch a prepared, read-only folder when supplied.
Similarity_modeHybrid, Timbre, Pitch gesture, Rhythm, Envelope or Contrast.
Minimum_similaritySimilarity required for recall; higher values exclude more distant candidates.
Weight_A_live / Weight_B_processed / Weight_C_preloadedRelative recall preferences for available corpora; defaults 40 / 30 / 30.
Weight_transform / Weight_recall / Weight_recall_transformRelative Hybrid action weights; defaults 40 / 30 / 30.
Evolving_memoryOptionally change corpus selection priorities over the session.
Layered_responseEncourage secondary memory entrances; separate from Background_layer.

Memory limits and influence

ControlDefaultPurpose
Max_generation2Restrict recursive reprocessing of previously transformed material.
Max_live_phrases100Maximum retained live Corpus A items.
Max_processed_responses100Maximum retained processed Corpus B items.
Max_audio_memory_min30Aggregate audio duration permitted in RAM.
Max_item_s15Length limit for live Corpus A storage and segmentation of prepared Corpus C material. Processed B answers are kept whole, subject to their separate response-duration cap.
Candidates5Top-ranked possible memory matches considered for retrieval.
Cooldown_recalls4Discourage recalling the same sound repeatedly in a short span.
Exclude_recent_phrases2Reduce immediate repetition of the newest captured phrases.
Same_family_exclusionOffOptionally exclude related recent source families.
Influence_depth3Number of recent phrases used as a context for memory search.
Influence_decay0.5Weight reduction by phrase age in the history.
Trend_weight0Optional forward projection of the most recent descriptor change; off by default.

Older items can be evicted as memory limits are reached. The limits control the in-session model, not the user's prepared source files. See Phrase-level influence memory for the musical role of the additional context.

Playback settings

ControlDefaultFunction
PolyphonyOnAllow overlapping computer responses and memory layers.
Max_voices4Target mixer voice count, allowing brief fades after voice replacement.
Polyphonic_density0.5Influence the probability of an additional memory layer.
Layer_shapeWhole soundsChoose complete sounds or excerpts from an onset to the natural end.
Background_layerOnEnable low-level evolving material made from memory.
Background_level_dB-33Quiet background reference target when level matching is active.
Stereo_width1.0Spatial spread of genuine stereo or mono material.
Spatial_movement0.3Degree of slow automatic spatial movement.
Pan_variation0.5Variation of positions among successive voices.
Fade_in_ms / Fade_out_ms30 / 400Envelope times, adapted to source duration and attack type.
Preserve_transientsOnShorten entrance fades for sharp attacks.
Level_matchingOnStereo-aware, K-weighted role balancing with burst and peak safeguards.
Follow_live_inputOffOptionally track relative live-performance loudness in the response mix.
Follow_range_dB9Maximum positive or negative target change when follow-live is enabled.
Corpus_C_balance_dB0Extra balance adjustment for playback of prepared Corpus C sounds.

All playback gains are applied to in-memory signals; the original Corpus C files are not modified. These controls do not change microphone input sensitivity. Use input gain and Sensitivity_dB for unwanted background-noise triggers.

Advanced performance settings

ControlDefaultPurpose
Sample_rate44,100 HzAudio sample rate for input and output.
Channels1Captured input channels; the playback engine is stereo.
Play_responseOnWhether the computer plays audible responses.
Max_pending_phrases / Max_pending_responses3 / 3Queue capacity for phrases and prepared responses.
Overflow_policyDrop oldestChoose whether to discard an old pending job or refuse a new one when full.
Max_response_s20 sPlanned cap for generated answers; playback allows a small grace margin and uses quiet-point cuts and fades if required.
Session_minutes60Maximum scheduled session length.
Idle_stop_s300 sStop after sustained inactivity.
Leakage_guardOnEstimate output-to-microphone leakage and reduce feedback retriggers when necessary.
Headphones are recommended but do not eliminate room noise. The leakage guard only estimates computer-output audio reaching the input; it does not distinguish your intended gestures from a door slam or a nearby conversation. Set microphone gain appropriately even if there is no acoustic feedback.

Live performer display and stopping

New in v0.4.12. The Praat Demo interface deliberately separates the performer's recording state from the computer's response state. Playback or processing does not mean that you must stop, and a background layer is not a new microphone event.

YOUR PERFORMANCEWhat it means for the performer
STAY QUIETThe system is calibrating the microphone and background level. Remain quiet for a short moment.
PLAY WHEN READYThe microphone is listening and awaits a new gesture. Start at any moment, including during a computer response.
RECORDING YOUR PHRASEThe detector has recognised activity and is capturing a phrase. Finish when musically appropriate; a quiet interval completes it. A progress indicator shows the accumulated quiet time.
PHRASE CAPTUREDThe phrase has been submitted. The message is held for about 2 s, but does not block the next phrase.
Illustrative status view (not live data)
AudioTools Call & Response 0.4.12
MODE: CONTINUOUS   PRESET: Hybrid memory (default)

YOUR PERFORMANCE
RECORDING YOUR PHRASE
Stop playing for 0.6 s when your gesture is complete.
[quiet progress toward phrase end]

SYSTEM RESPONSE
PLAYING: Markov Soundscape Weaver
VOICES: 3/4 (response, memory layer, background)
MEMORY: A 18 | B 12 | C 0
RECALL: Corpus B   MATCH: 0.82 (3 phrases)
ACTION: Recall

DETECTOR: input -28 dB | start -46 | end -50 | floor -55
          quiet 0.2 / 0.6 s

The technical DETECTOR line shows measured input level, onset threshold (start), end threshold (end), estimated background floor and elapsed quiet time. The level meter has threshold marks. A LAST event briefly distinguishes a genuine pause from split at Max_phrase_s (continues), ignored noise or rejected short input.

The independent SYSTEM RESPONSE area shows what is processing or sounding, voice count, memory contents and recent selection. These are descriptions of computer activity, not cues telling the performer when to play.

ActionHow to do it
Stop the sessionUse the red STOP control, or Esc / S in the focused Praat Demo window.
Switch visualisationPress G in the Demo window to toggle between the full status view and the Memory Map when Sonic Memory is enabled.
Check the phrase detectorObserve input relative to start/end thresholds and watch the quiet counter while you stop playing.
Verify a shutdownAllow the audio streams and owned render processes to close; wait for the cleanup report.

On some Praat versions a Demo-window click may produce a Mouse click not completely handled message; dismissing that message allows the stop operation to finish. The normal session does not require saving any intermediate Sound objects.

Memory Map visualisation

Introduced in v0.4.6 and extended in v0.4.8-0.4.9. The Memory Map is an arc-based view of the sounds collected or loaded during the session and the relationships among them. When Sonic Memory is on it is the default visualisation; press G to switch to the technical status view. The performer headline remains visible above the map.

Graph elementInterpretation
Horizontal memory linePrepared Corpus C material at the left, the unfolding live performance and processed memory at the right.
Memory pointsCorpus A = live phrases (blue); Corpus B = processed answers (orange); Corpus C = prepared recordings (grey). A light point can represent an observed live phrase not stored in A.
Upper arcsAcoustic similarity links between stored sounds. Colour relates to gesture class, paleness indicates a weaker relation.
Lower arcsActual actions: recall (purple), recalled sound transformed (magenta), or a new transformation from a phrase (teal).
Pale lilac influence arcsContributions from earlier phrases to the selected sound's memory score, not merely the original weights in the influence model.
Red ring / red tickCurrently sounding memory material / latest performer phrase.

The map provides an interpretable picture of retrieval and action. It is a visual account of the memory relationships, not itself a separate sequencing engine or a Factor Oracle. It does not instruct the performer to wait for the displayed links before starting another gesture.

Compositional workflows

WorkflowSuggested exploration
A - Gesture and transformationUse Classic transform (v0.2). Play a sustained tone, breath/noise, grouped attacks and a glissando. Compare the six automatic transformation choices without memory layers.
B - Self-growing musical memoryUse Hybrid memory (default), with no prepared Corpus C. Build up A and B over several phrases; repeat or vary earlier gestures and listen for recalls.
C - The computer remembers itselfAllow processed Corpus B and Recall + Transform; audition how a processed answer becomes material for later generations.
D - Strict acoustic corpus dialogueSupply a Corpus C folder and use a Corpus only preset. The live performer steers unprocessed recordings using timbre, pitch, rhythm, hybrid similarity or contrast; no match yields silence.
E - Transforming the corpusUse Corpus re-composed to search a prepared sound library and then transform selected material through Praat.
F - Phrase-level contextual memoryCompare Influence_depth = 1 and 3 on related gesture sequences. Optionally explore Trend_weight, which is off by default.
G - Spatial counterpointEnable polyphony and memory layers, turn Background off initially, and begin new phrases while earlier answers sound.
H - An evolving environmentEnable Background and slow spatial movement; observe the Memory Map as the performance and the machine-generated memory develop.

Performance study: from dialogue to ecosystem

First use Classic transform for a one-to-one relationship. Then compare Hybrid memory with polyphony and background. Finally inspect the Memory Map to see which earlier phrases and transformed results contributed to later answers. Throughout the experiment, the YOUR PERFORMANCE heading, not the playback activity, tells you whether a phrase is being captured.

Requirements and installation

ComponentRequirement
PraatA recent installation supporting scripted subprocesses, audio file access, the clock and sleep functions, and (where requested) Full Trust for local file and process operations.
Praat AudioToolsThe six processing scripts must be present at their normal library locations. The special MAX MC preset and non-visual MDS execution must be supported by the installed scripts.
PythonPython with numpy, scipy, soundfile and sounddevice.
Audio interfaceA functioning input device for live performance and a stereo output device for the spatial mixer.
Operating environmentLocal execution on the musician's computer. Audio rendering and retrieval do not require a network service.

Place the two application files in the existing AudioTools library:

plugin_AudioTools/
  Vector Chain/
    AudioTools_CallResponse.praat
  py/
    audiotools_call_response.py

Install any missing Python dependencies into the interpreter used by the Praat launcher:

python -m pip install numpy scipy soundfile sounddevice

The launcher first tries its configured Python interpreter and then common system Python commands. When necessary, set the pyCandidate1$ path near the beginning of the Praat script. The praatExe$ setting can identify the executable for the independent, headless rendering process; when empty, the system attempts to find Praat automatically.

The six transformation scripts remain in their regular AudioTools locations; do not move or rename them merely to run Call & Response. The two launcher files must belong to the same installation and remain compatible with one another.

Diagnostics: the Python file has a command-line self-test command for synthetic classification, memory and mixer checks. These tests are useful for installation troubleshooting but do not replace a live sound-card test.

Session files, privacy and cleanup

Most musical memory resides in RAM. However, the system must sometimes exchange audio and job instructions with Praat through files. It creates a private temporary working directory for each session, normally under the operating system's temporary directory, and may write temporary WAVs, job descriptions, status files and optional diagnostic logs.

On an ordinary, successful stop, the engine is designed to close streams, release or terminate its own rendering processes and remove the session directory and its generated contents. If cleanup cannot finish because a process is still active or a file remains locked, the system should report CLEANUP INCOMPLETE rather than pretend that the files were deleted. Recovery at a later launch can remove abandoned sessions after checking that they are no longer active.

What remains? The installed Praat AudioTools scripts and any original recordings you explicitly supplied for Corpus C remain unchanged. Live corpus A, processed corpus B and generated temporary session files are not automatically preserved as a permanent archive. If you want a permanent recording of the performance, arrange a separate recording workflow outside this session-memory system.
Do not manually delete a live session directory. Temporary files can still be in use by the microphone engine or by a Praat rendering process. If shutdown reports incomplete cleanup, resolve the process or file-lock problem before deleting any residual files.

Limitations and performance considerations

Practical recommendation: start with a short sound-check; establish a reliable balance between quiet musical gestures and background noise. Once the detector behaves well, explore memory weights, influence depth, spatial density and background layering one control at a time.