-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Effects #84
Effects #84
Conversation
29b6c35
to
f5f0315
Compare
Below some sfz for testing Bitcrusher on main bus
Bitcrusher on bus 1, main bus turned off
Bitcrusher on bus 1, main and fx1 mixed 50/50
|
src/sfizz/effects/Lofi.cpp
Outdated
|
||
float phase = fPhase; | ||
float lastValue = fLastValue; | ||
hiir::Downsampler2xFpu<12>& downsampler2x = fDownsampler2x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not very useful, it can go, or I don't mind to change to auto&
src/sfizz/effects/Lofi.cpp
Outdated
} | ||
|
||
float lastValue = fLastValue; | ||
hiir::Downsampler2xFpu<12>& downsampler2x = fDownsampler2x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ref (and the one below) useful somehow?
void Lofi::process(const float* const inputs[2], float* const outputs[2], unsigned nframes) | ||
{ | ||
for (unsigned c = 0; c < EffectChannels; ++c) { | ||
_bitred[c].setDepth(_bitred_depth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now this is unmodulated but it should be at some point right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It must have modulation.
Since the focus is the framework of effects, it's limited in implementation.
Let's add this when the modulation matrix is well handled.
src/sfizz/Region.cpp
Outdated
@@ -751,6 +751,20 @@ bool sfz::Region::parseOpcode(const Opcode& opcode) | |||
setCCPairFromOpcode(opcode, amplitudeEG.ccSustain, Default::egOnCCPercentRange); | |||
break; | |||
|
|||
case hash("effect"): // effect& |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we merge the other one I'll rebase this
src/sfizz/Synth.cpp
Outdated
break; | ||
|
||
case hash("fxtomain"): // fx&tomain | ||
if (auto numberOpt = opcode.firstParameter()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There too, it'll be cleaner with the new parser
All good for me, can merge :) Thanks alot! |
On blockSize and sampleRate : I don't really agree with the renaming The entry point
I would suggest to pass both of sample rate and buffer size to this For information, I wish this process to be equivalent with a design of future C API which can be used for registering external effects into sfizz. (in such a way, we can register MDA's effect package externally like Sforzando, or do anything custom) |
OK, I'm good with this, I'll update. |
Add effects and their routing. Work in progress
Designed such that it can receive user-defined effects.
An effect is designated by its "type" opcode.
TODO
There are still some things and dirty and it's not tried.
Regardless, I submit the code for review if you would like to have a peek.
Remark: I would like if we can introduce HIIR downsampler separately of this PR