Normalize Linux audio pipeline to lossless Float32 (skill: lossless-audio-compliance)
- native bridge WAV writers: 16-bit PCM truncation -> IEEE Float32 (fmt 3, bit-exact) - vendor sheredom_json.h (vst3sdk 3.8.1 lacks moduleinfo/json.h) - Dockerfile: drop nonexistent sfizz tag v1.2.3 - Python sf.write -> subtype=FLOAT everywhere - resample_poly -> kaiser(16) window (>=130dB stopband) - audio_editor._write_wav_lossless(): FLOAT passthrough, TPDF dither only for 8/16/24-bit final exports - app.jsx WAV encoders: Float32 default, TPDF dither for integer depths, fix 24-bit - tests: lossless compliance gate (null test < -140dBFS, float32 format) 9/9 pass - TASKS_WINDOWS_AUDIO_NORMALIZE.md: Windows-side remaining tasks
This commit is contained in:
+2
-2
@@ -280,7 +280,7 @@ async def ai_cut_audio(req: AICutRequest, current_user: Optional[dict] = Depends
|
||||
if data.ndim > 1:
|
||||
data = data.T
|
||||
sliced, z_start, z_end = await asyncio.to_thread(AIDSPEngine.slice_and_copy_with_zero_crossing, data, sr, req.selection_start, req.selection_end)
|
||||
sf.write(out_path, sliced.T if sliced.ndim > 1 else sliced, sr)
|
||||
sf.write(out_path, sliced.T if sliced.ndim > 1 else sliced, sr, subtype="FLOAT")
|
||||
dur = z_end - z_start
|
||||
else:
|
||||
z_start = round(req.selection_start, 4)
|
||||
@@ -313,7 +313,7 @@ async def run_python_dsp_tool(req: PythonToolRequest, current_user: Optional[dic
|
||||
wave = PythonToolsEngine.generate_synth_wave(req.wave_type or "sine", req.freq or 440.0, req.duration or 2.0)
|
||||
output_file_id = f"user_{user_id}_synth_{req.wave_type}_{uuid.uuid4().hex[:6]}.wav"
|
||||
out_path = os.path.join(settings.PROCESSED_DIR, output_file_id)
|
||||
sf.write(out_path, wave, 44100)
|
||||
sf.write(out_path, wave, 44100, subtype="FLOAT")
|
||||
return {
|
||||
"success": True,
|
||||
"message": f"Generated {req.wave_type} synth wave ({req.freq}Hz)",
|
||||
|
||||
@@ -1249,7 +1249,7 @@ async def soundfont_render(req: SoundfontRenderRequest, current_user: dict = Dep
|
||||
)
|
||||
from app.core import native_render
|
||||
audio = native_render.normalize_audio_peak(audio)
|
||||
sf.write(out_path, audio.T, req.sample_rate)
|
||||
sf.write(out_path, audio.T, req.sample_rate, subtype="FLOAT")
|
||||
return {
|
||||
"success": True,
|
||||
"file_id": os.path.basename(out_path),
|
||||
|
||||
Reference in New Issue
Block a user