Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2a9d33

Browse files
Till Rettbergmgeier
Till Rettberg
authored andcommitted
Add interpolator to driving_signals
1 parent 9e4c493 commit e2a9d33

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sfs/time/drivingfunction.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def wfs_25d_focused(x0, n0, xs, xref=[0, 0, 0], c=None):
193193
return delays, weights
194194

195195

196-
def driving_signals(delays, weights, signal):
196+
def driving_signals(delays, weights, signal, interpolator=None):
197197
"""Get driving signals per secondary source.
198198
199199
Returned signals are the delayed and weighted mono input signal
@@ -208,6 +208,8 @@ def driving_signals(delays, weights, signal):
208208
signal : (N,) array_like + float
209209
Excitation signal consisting of (mono) audio data and a sampling
210210
rate (in Hertz). A `DelayedSignal` object can also be used.
211+
interpolator : function, optional
212+
Interpolator for fractional delays. See: TODO
211213
212214
Returns
213215
-------
@@ -219,7 +221,8 @@ def driving_signals(delays, weights, signal):
219221
"""
220222
delays = util.asarray_1d(delays)
221223
weights = util.asarray_1d(weights)
222-
data, samplerate, signal_offset = apply_delays(signal, delays)
224+
data, samplerate, signal_offset = apply_delays(
225+
signal, delays, interpolator)
223226
return util.DelayedSignal(data * weights, samplerate, signal_offset)
224227

225228

0 commit comments

Comments
 (0)