Filter construction kit

Post any examples or modules that you want to share here
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Filter construction kit

Post by tor »

Yes I know it is not optimal. But it is the only option at the moment for complete double float filter design :?:

User Guide Quote:
FlowStone processes high data rate signals such as audio using Streams. These allow you to perform
one-sample-at-a-time processing at rates of 44.1Khz and beyond with minimal compromise in
performance
.
Frames allow you to process this data via the Ruby component without losing a single sample.
Because of the high data rates involved you can't do this processing one sample at a time – the
processing overhead would be way too much. What we can do is give you access to the data in
batches of samples. We call these batches Frames.
Processing frames in Ruby can never compete with the speed of streams, so there is a performance
cost.
However, if squeezing everything out of your cpu is not that critical then, together with Ruby,
Frames provide a very flexible way of analysing high data rate signals.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Filter construction kit

Post by MyCo »

tor wrote:Back to the filter topic. Is it possible to make a biquad filter in the Ruby component?


Not exactly what you want, but I've added ruby filter processing to the kit... but it's not only biquad, I made it for multipole filters, because it's not possible to do this in code.

Toolbox Update
- Added Multi-Coeff processing module

Downloads are in the first post.
infuzion
Posts: 109
Joined: Tue Jul 13, 2010 11:55 am
Location: Kansas City, USA, Earth, Sol

Re: Filter construction kit

Post by infuzion »

MyCo wrote:
tor wrote:Back to the filter topic. Is it possible to make a biquad filter in the Ruby component?
Not exactly what you want, but I've added ruby filter processing to the kit... but it's not only biquad, I made it for multipole filters, because it's not possible to do this in code.
By "code" do you mean the Code primitive, or Ruby-code?
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Filter construction kit

Post by MyCo »

infuzion wrote:By "code" do you mean the Code primitive, or Ruby-code?


Yeah, I mean the code primitive and assembler, too.
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Filter construction kit

Post by tor »

Thank you!

Nice work but why does this thing not work now. I changed the green array connectors to ruby connectors. Then I got an Nil error in the filter component regarding loadstate method. I just tried to move it to the top. Then the error disappeared but I get no audio any more.

***Edit: I just found that moving the frequency knob made the sound reappear :)
RubyFilter.fsm
(136.66 KiB) Downloaded 1581 times


Just a little wish: Would love to see more comments in your code. Like more decriptions of how, when and why things happen in the code. :mrgreen:

***Edit: I also wonder if the code in the coeff ruby component get calculated every sample now or only when the green inputs change? Is there ways to simplifiy it?
Last edited by tor on Thu Feb 28, 2013 12:20 am, edited 1 time in total.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Filter construction kit

Post by MyCo »

Well, your ruby in the schematic is in an undefined state, maybe because of your changes. You can fix that this way:

1. load schematic
2. edit something in the ruby code (just insert spaces or comments)
3. then click outside the ruby edit (the ruby error should be gone now)
4. turn the filter knobs
5. save schematic

I added 2 fixes to the code, so maybe, this doesn't happen anymore.
Attachments
RubyFilter.fsm
(132.45 KiB) Downloaded 1665 times
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Filter construction kit

Post by tor »

Great!

Thanks again.

Have you seen my recent edits in comment above?
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Filter construction kit

Post by MyCo »

The coeff calculation, eg. in the RBJ is just as simple as possible. So the coeffs are recalculated on every incoming green trigger. In the filter processing, it is a little bit more optimized. The coeffs come in, are validated and stored for the filter processing. The filter processing can be optimized, but the code can get very complex then, and I don't think that this would make sense, because Ruby & Streams is slow as hell, and nobody should use that in plugins/programs.

The comment thing is just: I know what lines do (ruby is quite good readable)... and also as long as there is no code folding, I don't want to waste space ;)
tor
Posts: 114
Joined: Fri Sep 24, 2010 5:54 pm

Re: Filter construction kit

Post by tor »

Ok, thank for answering and help :)
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Filter construction kit

Post by MyCo »

Documentation Update
- Fixed some spelling here and there
- changed Introduction
- Added some more explanations to several calc. steps

Downloads are in the first post.
Post Reply