Software

# Proposed fix: natural brass / trumpet ending

# Goal: prevent final note from sounding cut off

# Problem is psychoacoustic, not only volume-based.

def process_final_trumpet_note(audio_tail):

"""

The final trumpet note should not stop instantly.

Human hearing expects harmonic decay, air resonance,

and a short room tail after note-off.

"""

# 1. Detect final note-off

note_off_time = detect_last_note_end(audio_tail)

# 2. Apply natural exponential release

release_time_ms = 800 # recommended range: 400–1200 ms

release_curve = "exponential"

audio_tail = apply_release_envelope(

audio_tail,

start=note_off_time,

duration_ms=release_time_ms,

curve=release_curve

)

# 3. Preserve trumpet harmonics during decay

audio_tail = preserve_harmonics(

audio_tail,

harmonics=[2, 3, 4],

decay="natural"

)

# 4. Add subtle room resonance

audio_tail = add_room_tail(

audio_tail,

wet_mix=0.06, # 4–8%

tail_time_ms=600,

room_size="small"

)

# 5. Avoid cutting the render too early

post_roll_ms = 700

audio_tail = add_post_roll_silence(

audio_tail,

duration_ms=post_roll_ms

)

# 6. Prevent limiter/noise gate from removing the tail

audio_tail = disable_hard_gate_on_tail(audio_tail)

audio_tail = keep_headroom(audio_tail, peak_db=-1.0)

return audio_tail

Expected result:

BAD: Trumpet note -> hard stop

GOOD: Trumpet note -> harmonic decay -> air resonance -> room tail -> silence

This creates perceived musical completion instead of a technical cutoff.

AI music engines should not only render the waveform, but also the perceived acoustic completion of the final note.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

4 months ago

Author

Aad Schilperoort

Subscribe to post

Get notified by email when there are changes.