Jump to content

analog tool box mods question


moxi
 Share

Recommended Posts

Hi,

I'm workin on a CV controled filter based on the "analog toolbox" app.

what I want to do is to add for each CV output some butons to select the modulation source..

this part of the work is already done, I can now select which mod source is applied to the cv output (the eg, the lfo ...or the pot connected to the core... but instead of being obliged to choose between any digital mod source and the pot, I want the pot to be used as "offset", but I don't understand how to program to get two value "mixed" before sending them to the cv out : I don't want to add the two value, the pot have to set the max value that the mod source won't exceed...hope that's clear..

for the while, my prog look like that:

  ///////////////////////////////////////////////////////////////////////////

  //

    if  ((last_din_pin) == (3) | (pin_value) == (1)){

  // cv 1 is driven by LFO1, the rate is modified with AIN5

  lfo1_rate = midi_cc_chn0[10];

  aout_value[0] = sinewave[CONV_16BIT_TO_8BIT(lfo1_value)];

  }

  else

  if ((last_din_pin) == (2) | (pin_value) == (1)){

  aout_value[0] = CONV_7BIT_TO_8BIT(midi_cc_chn0[9]);}

  else

  if ((last_din_pin) == (1) | (pin_value) == (1)){

  aout_value[0] = CONV_7BIT_TO_8BIT(midi_cc_chn0[8]);

  }

  else

I'm not sure that adding the two value into the app is the best way, I would prefer to simply add a pot that drive directly the cv intput of my filter (i.e. that will not be sampled by the core then converted back to analog) , but I'm not sure about the way to mix two cv signal without damaging my chip (a CEM 3378).

I've seen somewhere that you can mix many CV using current limiting resistor, if someone know how to do that for my chip....

Link to comment
Share on other sites

...and here a quick view of the signal flow of this filter...more option will be added one time this will be workin fine..

mox_filter.jpg

I own an Oakley Filtrex 2 too, so maybe I will try to mix this two device in one, to be abble to choose between two type of filter (the Oakley one is really smooth -moog like- , the cem3378 is more "rough"...)

Link to comment
Share on other sites

Hi Moxi

another way to this is by multiplying the value with your scalar

and keep the most significant byte as result

this way: scaled_value = (scale*value)/256

_PRODL = scale;
_PRODH = value;
__asm
movf    _PRODL, w
mulwf   _PRODH  
__endasm;
scaled_value = _PROD_H

note: I didn't try the above code!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...