ssfrr / AudioIO.jl

[UNMAINTAINED] - Simple Audio IO in Julia
MIT License
61 stars 24 forks source link

Proof of concept DSP node #25

Closed JayKickliter closed 9 years ago

JayKickliter commented 10 years ago

I have a proof of concept (DSP) filtering node. For some reason, in this example, it only works when played before playing another node. I'm sure I'm doing something wrong.

Anyways, this isn't a real issue. Just wanted to share. And thanks for writing such easy to extend code. I've used AudioIO, but never looked at the internals before this evening. I basically just cut and pasted your Gain node and got the Filter node working in a couple hours without having any idea what I was doing.

If you want to try it out, I must warn you that firdes might be broken, and may not be setting the correct cutoff frequency. But at least in the example it appears to be cutting off the 8 kHz tone.

Thanks!

JayKickliter commented 10 years ago

I fixed the filter design code, but you will need to checkout the freshest Multirate to try out the example.

The example file also now has both high pass and low pass filtering.

ssfrr commented 10 years ago

Sorry I haven't had a chance to check this out yet, but I should get to it shortly. This is going to be especially cool when I merge in the Saw and Square oscillators, which benefit a lot more from the filtering.

JayKickliter commented 10 years ago

There's no hurry. It just an experiment. I hope it still works.

I haven't touched the code in about a week, but I was having problems with filters doing sample rate conversions. Some of them have non-deterministic input/output length ratio. I did just implement an arbitrary rate resampler, so that may make it easier to predict how many samples the filter will output for a given input. Haven't done any benchmarks on it yet, but I suspect it's a bit slower than the rational resamples.

JayKickliter commented 9 years ago

Forgot this was still open. Closing...