24ll: alpha(content) LOCALIZED — far second tone (@4000, both 0dB and -12dB) does NOT affect alpha (1.075-1.110 vs 1.153); mixing is template-local via res-weighted freq-IIRs; distance-kernel series is the next campaign cell
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
import wave, numpy as np
|
||||
sr=44100; T=4.0; n=int(sr*T); t=np.arange(n)/sr
|
||||
ph=np.random.default_rng(21).uniform(0,2*np.pi,7)
|
||||
for att,nm,f2 in ((0,'far0',4000.),(12,'far12',4000.)):
|
||||
A=0.4248*10**(-att/20)
|
||||
y=A*np.sin(2*np.pi*500*t+ph[0])+A*np.sin(2*np.pi*f2*t+ph[1])
|
||||
for i,f in enumerate((300.,700.,1400.,2800.)):
|
||||
y+=A*10**(-30/20)*np.sin(2*np.pi*f*t+ph[i+2])
|
||||
y=np.clip(y,-0.999,0.999)
|
||||
w=wave.open('/tmp/opencode/%s_in.wav'%nm,'wb'); w.setnchannels(1); w.setsampwidth(2); w.setframerate(sr)
|
||||
w.writeframes((y*32767).astype(np.int16).tobytes()); w.close()
|
||||
import re
|
||||
src=open('/tmp/opencode/f0.rpp').read()
|
||||
src=re.sub(r'RENDER_FILE "[^"]*"','RENDER_FILE "/tmp/opencode/%s_ref.wav"'%nm,src)
|
||||
src=src.replace('FILE "/tmp/opencode/f0_in.wav"','FILE "/tmp/opencode/%s_in.wav"'%nm)
|
||||
open('/tmp/opencode/%s.rpp'%nm,'w').write(src)
|
||||
print('far-pair inputs+rpps ready')
|
||||
Reference in New Issue
Block a user