Author Topic: More Effects  (Read 11816 times)

martindunne

  • Team Member
  • ***
  • Posts: 118
    • View Profile
More Effects
« 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?
« Last Edit: August 10, 2014, 06:49:10 PM by Xavier »

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: More Effects
« Reply #1 on: August 02, 2014, 12:27:19 AM »
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.

martindunne

  • Team Member
  • ***
  • Posts: 118
    • View Profile
Re: More Effects
« Reply #2 on: August 02, 2014, 04:51:05 PM »
brilliant, will do

martindunne

  • Team Member
  • ***
  • Posts: 118
    • View Profile
Re: More Effects
« Reply #3 on: August 03, 2014, 12:33:59 PM »
awsome bit crusher great for sound design

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: More Effects
« Reply #4 on: August 05, 2014, 07:42:59 PM »
Thanks. I am still playing around and am not sure I have it quite right. But it does sound cool.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: More Effects
« Reply #5 on: August 06, 2014, 11:51:49 AM »

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

martindunne

  • Team Member
  • ***
  • Posts: 118
    • View Profile
Re: More Effects
« Reply #6 on: August 06, 2014, 01:16:01 PM »
have a copy of the compiled os if you want to take a look at it

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: More Effects
« Reply #7 on: August 06, 2014, 11:46:13 PM »
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.

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: More Effects
« Reply #8 on: August 07, 2014, 01:16:39 AM »
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++;    



Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: More Effects
« Reply #9 on: August 07, 2014, 10:49:20 AM »

Great, thank you  :D
I'll take a look....

teevee

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: More Effects
« Reply #10 on: August 07, 2014, 10:54:12 AM »
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.

pld

  • Team member
  • *
  • Posts: 41
    • View Profile
Re: More Effects
« Reply #11 on: August 07, 2014, 12:33:42 PM »
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...

teevee

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: More Effects
« Reply #12 on: August 07, 2014, 02:38:33 PM »
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

matrix12x

  • Team Member
  • ***
  • Posts: 188
    • View Profile
Re: More Effects
« Reply #13 on: August 10, 2014, 05:00:28 AM »
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++;

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: More Effects
« Reply #14 on: August 10, 2014, 02:55:56 PM »

Thanks for sharing.
Seems like it comes from http://www.musicdsp.org/archive.php?classid=4#139
I'll give a try.

Xavier