Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 82 of 82

Thread: Interfacing with a modular synth

  1. #76
    Senior Member
    Join Date
    Aug 2014
    Posts
    165
    mxxx —*thanks for all this —*very useful as ever. Have progressed since last week.

    Sent you a PM to continue our conversation.

  2. #77
    Quote Originally Posted by Nantonos View Post
    Which I don't understand, frankly; but in practice yes, use a TL072 in there and things go wrong. Use the above op-amps (greater current drive?) and it works. It is sending a buffered, stable reference voltage into the Teensy 3.1 AREF pin.
    It would be fine with a TL07x if it was just for the vref only, but it is also the positive rail for the control potentiometers, which have to be reasonably low value (10k) to "drive" their own ADCs, and there are 10 of them, as well as capacitors on the rail and the wipers, which makes quite a difficult load.

  3. #78
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    out of curiosity (see p.3 of this thread where it was brought up again) -- so, on the OA, when you do analogReference(EXTERNAL);, are you getting VDDA(3.3v) or AREF (3v) at A14/DAC?

    i'm guessing the former?

    edit: well, i just tried myself with a lm4040 2.5 and i'm still getting 3.3v, so i'm assuming it's indeed VDDA, not AREF.
    Last edited by mxxx; 10-24-2014 at 02:24 PM.

  4. #79
    Yes, it is 3.3v

    I have trying to use the external vref for the output on my list, and see if there is a worthwhile reduction in noise. When it was originally designed, I had no idea that there would be the option.


    Ideally, it would require a couple of resistors to be changed on the output filter/offset/amplifier circuit to eliminate the resulting DC offset and increase the amplification, but most modulars/interfaces are not DC coupled all the way along the signal path so it is probably not a huge deal.

  5. #80
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by neutron7 View Post
    Yes, it is 3.3v

    I have trying to use the external vref for the output on my list, and see if there is a worthwhile reduction in noise. When it was originally designed, I had no idea that there would be the option.
    i see. thanks. the option is what's in question, that's why i've asked. looks as if there's some accumulating evidence that A14/DAC can't be set to AREF; but paul says it can be done.

    i personally don't mind, i only have one board that's using the onboard DAC and it's not mission critical there. looking at analog.c though, it would probably make sense to disentangle analogRead(), analogWrite() and analogReference() anyways, in cases where you'd like to reference the ADC to AREF and the DAC to VREF_OUT (1.2v) or v.v. (?)

  6. #81
    sorry to dig this old thread, but i think this information should continue here.

    Does anyone have a 1v/oct code that is willing to share for the mutable instruments 1v/oct inputs?

  7. #82
    Quote Originally Posted by manatee View Post
    sorry to dig this old thread, but i think this information should continue here.

    Does anyone have a 1v/oct code that is willing to share for the mutable instruments 1v/oct inputs?
    there are a few ways to do it, depending on how accurate you want, how much memory you have, and how fast you need it to be.

    you can use "POW" function, which is quite slow but the most accurate,

    you can use "Fastpow2" which is not quite as accurate but faster seems fine for synth oscillators with only a few cents maximum error.
    Code:
    inline float fastpow2 (float p)
    {
      float offset = (p < 0) ? 1.0f : 0.0f;
      float clipp = (p < -126) ? -126.0f : p;
      int w = clipp;
      float z = clipp - w + offset;
      union {
        uint32_t i;
        float f;
      } v = { cast_uint32_t ( (1 << 23) *
                              (clipp + 121.2740575f + 27.7280233f / (4.84252568f - z) - 1.49012907f
                               * z) )
            };
      return v.f;
    }
    using it:
    Code:
     pre_expo_conv = CV_IN[4] / tuning_cal;
     post_expo_conv = fastpow2(pre_expo_conv);
    //for me, using 12 bit ADC input, tuning cal is 583 plus or minus about 50 depending on variables of the input circuit, ADC etc. you would change it depending on the amount of range vs resolution you want.

    CV_IN[4] was the result of a 12 bit ADC read of the v/oct input.

    or if you have the memory to spare, make or borrow a lookup table such as this one by 4ms https://github.com/4ms/SMR/blob/master/exp_1voct.h (12bits worth) That would be fastest of all, and accurate if it was created with POW.
    Last edited by neutron7; 05-22-2020 at 05:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •