preenfm Forum
PreenFM => preenfm2 and preenfm3 => Topic started by: martindunne on August 01, 2014, 01:50:41 PM
-
XH : Used to be in http://ixox.fr/forum/index.php?topic=63438.0
---------------------------------
is it possible to grab a copy of your os to try it out?
-
I posted it on gihub as a branch off the original, which I believe I did correctly. you can just download and compile.
or pm me with your e-mail and I'll send you the compiled os file.
-
brilliant, will do
-
awsome bit crusher great for sound design
-
Thanks. I am still playing around and am not sure I have it quite right. But it does sound cool.
-
A bit crusher ?
Do you have such a effect working ?
Cannot see anything like this in you fork:
https://github.com/matrix12x/preenFM2
By the way this branch is based on an old firmware/bootloader (0.9i / 1.02).
Xavier
-
have a copy of the compiled os if you want to take a look at it
-
Hi Xavier,
I did not post it yet because it was not quite done yet and sounded a little crazy, but still interesting.
I can post it if you would like.
-
Please note, I did not get the "bits" knob working yet, only the "frequency" knob. Please excuse the randomness of my coding, I was trying to implement different versions of the bit crunchers that were on the music DSP site. Based on my variable names, you can find the version of the code that I plucked bits and pieces from. When I clean it up i will add proper attribution to the comments in the code.
Basically I did this sloppy mess, with the proper adjustments to the other files to add the menu items:
In the file named Timber.cpp
case FILTER_BIT:
{
float *sp = this->sampleBlock;
float localv0L = v0L;
float localv1L = v1L;
float localv0R = v0R;
float phasor=0;
float BitsTwo = params.effect.param1;
int bits=BitsTwo;
float step;
float Frq = params.effect.param2 * PREENFM_FREQUENCY;
float SR = PREENFM_FREQUENCY;
float NormFreq = Frq / SR;
for (int k=0 ; k<BLOCK_SIZE ; k++) {
if (unlikely(fxParam1 = 0)) {
fxParam1 = 0.01;
}
step = 1 / (pow(2.0, bits));
// left side
localv0L = (*sp) + localv0L;
phasor = phasor + NormFreq;
if (phasor >= 1.0){
phasor = phasor - 1.0;
localv0L = step * floor(localv0L / step + 0.5 ); //quantize
localv0L = localv0L * fxParam3;
}
(*sp) = ((*sp) + localv0L) * mixerGain;
if (unlikely(*sp > ratioTimbres)) {
*sp = ratioTimbres;
}
if (unlikely(*sp < -ratioTimbres)) {
*sp = -ratioTimbres;
}
sp++;
-
Great, thank you :D
I'll take a look....
-
Bitcrusher?
This would give PreenFM 2 a option for sounding very nasty and harsh!
It would be cool to see more effects :D
• Example a Ensemble effect. I think that FM and Ensemble would make a interesting Stringer because FM synthesis has more timbral variations, than the typical Stringer with sawtooth.
-
Cool, my attempt at bitcrushing was a total failure ;)
Unfortunately I've been bogged down with work so I haven't had time, but I started implementing a delay to see what the performance impact is like (and as an excuse to practice ARM assembler). There's not too much RAM, but IIRC chorus/flanger type stuff doesn't need long delay times anyway.
Hopefully I can get back to that soon...
-
Cool, my attempt at bitcrushing was a total failure ;)
Unfortunately I've been bogged down with work so I haven't had time, but I started implementing a delay to see what the performance impact is like (and as an excuse to practice ARM assembler). There's not too much RAM, but IIRC chorus/flanger type stuff doesn't need long delay times anyway.
Hopefully I can get back to that soon...
Hello pld,
Thanks for the info, would be interesting to see your result of Chorus/flanger :)
TeeVee
-
I updated my code slightly to simplify it.
the bits part does not work still. Frequency has some holes in it for some reason. at 0.5 it has zero effect, and at some small values we get silence.
float *sp = this->sampleBlock;
float localv0L = v0L;
float localv0R = v0R;
float phasor=0;
float bits = floor( (params.effect.param1 * 16)); // bits encoder
if (bits = 0){
bits = 1;
}
float Frq = params.effect.param2 * PREENFM_FREQUENCY / 2; // frequency encoder
float SR = PREENFM_FREQUENCY;
float NormFreq = Frq / SR;
float step;
step = 1 / pow(2,bits);
for (int k=0 ; k<BLOCK_SIZE ; k++) {
// left side
localv0L = (*sp) + localv0L;
phasor = phasor + NormFreq;
if (phasor >= 1.0){
phasor = phasor - 1.0;
localv0L = step * floor(localv0L / step + 0.5 ); //quantize
localv0L = localv0L * fxParam3; // gain encoder
}
(*sp) = ((*sp) + localv0L) * mixerGain;
if (unlikely(*sp > ratioTimbres)) {
*sp = ratioTimbres;
}
if (unlikely(*sp < -ratioTimbres)) {
*sp = -ratioTimbres;
}
sp++;
-
Thanks for sharing.
Seems like it comes from http://www.musicdsp.org/archive.php?classid=4#139
I'll give a try.
Xavier
-
Hi Xavier,
Exactly.
would it be possible to shift the bits by doing a x >> y? where x shifted y bits to right
-
No that only works with integer.
And the buffer is still in floating in the effect processing.
But i think i have something that works...
Will share soon.
Xavier
-
The new effects are cool. I like your bit crusher much better.