Conversation
read-only strides for output buffers
sikersten
left a comment
There was a problem hiding this comment.
Very nice and elegant concept!
Feature/sampling rate setter
mberz
left a comment
There was a problem hiding this comment.
update data needs to pad the data if sampling rate or block size changes were made
| super()._set_block_size(block_size) | ||
| self._update_data() | ||
|
|
||
| def _update_data(self): |
There was a problem hiding this comment.
This method should maybe also reset the index after the new strides were created.
NoiseGenerator class
SineBuffer class
mberz
left a comment
There was a problem hiding this comment.
Please have a quick look at the slicing and check if that's an issue
haiopy/buffers.py
Outdated
| def _set_block_size(self, block_size): | ||
| super()._set_block_size(block_size) | ||
| self._update_data() | ||
| self.data = self._data[:self._n_samples] |
There was a problem hiding this comment.
| self.data = self._data[:self._n_samples] | |
| self.data.time = self._data.time[..., :self._n_samples] |
I think this may not work as intended. Slicing a Signal will slice along the channel axes, not the time samples of the underlying time data.
haiopy/buffers.py
Outdated
| self.data = pf.dsp.resample(self._data[:self._n_samples], | ||
| sampling_rate) |
There was a problem hiding this comment.
I think this may not work as intended. Slicing a Signal will slice along the channel axes, not the time samples of the underlying time data.
WIP: This is not a final PR but only a draft of the functionality, things like documentation are not final.
Implements audio buffer classes to iterate pyfar.Signal in callbacks.