FatJak we could use a formula to reach and overtake 0-1 and use almost the full range of the pot

well, i'm not forcing you to use the calibration patch i linked earlier πŸ™‚
is that patch not precise enough for your purposes? i mean, when used correctly, you shouldn't have any noticeable dead spots on the ends of your pot movement - and you most certainly do not need to sacrifice half of your pot rotation.

for calibration, it's a bit tedious going back and forth between Pd and the IDE, but once it's done it just works. for me, at least. but if you come up with a better or easier way, i would be most interested, actually!

    giuliomoro The Bela scope will show whatever you send to it, so its relation to real-world voltages (if any) is determined by what signals you connect to it.

    Yes, sorry, I forgot to tell that it was just [dac~ x]- - - -[bela_scope], so just reading the pot value by moving it, with nothing connected to the CV IN.

    giuliomoro FatJak The non zero minimum is on all the channels, as measured by voltmeter in CV OUT.

    I am not sure I understand this.

    For the "real" voltage measurement, I just done it by moving the pot and reading the value with a cable plugged in CV OUT and connected to the voltmeter.

    giuliomoro the scope does not display a voltage, but rather a value between 0 and 1, so what's your "approx displayed volt"?

    The "approximative displayed voltage" was what I thought to be the out voltage graphically viewable by moving the pot, which I believed was from 0 to max voltage. With this simple patch [dac~ x]- - - -[bela_scope]. So, yes, I was in total conflation.

    giuliomoro any errors in the ADC range will translate to an offset and scale error on the DAC

    I’ll try this patch and see what will be output.


    Thanks again @giuliomoro for all this attention.

    All this object is a piece of cake of confusion for me (computer to analog and back to data with Pd, hardware settings, IDE settings… Even if all the informations are available). So, sorry if I ask too much questions, if I share confusing experiencies told with approximative english, and if I can't fully understand the given answers.

    Remork well, i'm not forcing you to use the calibration patch i linked earlier πŸ™‚

    Well said ! I think I just could find a harder way to do it.
    Perhaps I didn't understood where to find the right values (individuals min and max voltage depending of the pots) to take as references to do the individual calculations:
    - Are they the output voltages which could be measured by a voltmeter plugged in the CV OUT ?
    - Or are they the ones viewable with the bela_scope ? How to determine it with the scope ?

      FatJak I think I just could find a harder way to do it.

      πŸ™‚

      for clarity's sake: the patch i linked to only calibrates the incoming voltages, so the [adc~]reading from the input jacks, and therefore the pots when nothing is plugged into the jacks.

      Pd expects a true 0-10v and will map this to [0-1] automatically. but if the voltage falls a bit short, you'll never reach [1], as you noticed. so the idea is to correct for a slightly low incoming voltage (not quite reaching the 'ideal' 10v) in software.

      i mostly just use the onboard pots of Pepper for calibration, because you need some sort of reference point to start from.. so i use the internally provided "not-quite-10v". if you're working with other modules that don't quite reach 10v, the same method applies, but i feel you lose consistency over different patches with different modules.

      so.
      maybe a bit redundant, but let me explain what the patch does.
      feel free to skip.

      looking at the patch, the top left inlet is where you hook up your [adc~], aka the pot/input you're after.
      samplerate is just that: how often you want the pot value to be read. hook up a [metro] there.

      the [lop~] should smooth out the readings enough so you get something that doesn't bounce around too much after the third decimal. so if you're getting, for example, 0.124756547 bouncing up and down, at least up to the 0.124 it should be relatively steady.

      the idea is to multiply that 0.124756547 by 1000, and the remove the decimals by running the result through an [ i ].
      so now you have 0.124756547 * 1000 = 124.756547, through [ i ] = 124.
      this number gets clipped if needed, then divided by 1000 again.. = 0.124.
      which is the same steady part we got to begin with. boring πŸ™‚

      now, for calibration: what i do is run a [print] object somewhere in this path to monitor Pd's values in the IDE.
      say you have the pot cranked, so you're expecting a 1 at the [snapshot~] output. however, you're seeing 0.987.
      now 1 / 0.987 = 1.013 approx. (ratio of ideal to actual number, if you like.)
      meaning: if i multiply the incoming reading by 1013 instead of by 1000 (or better yet: a bit more, say 1015) , that's 0.987 * 1015 = 1001.805.
      run that through the [ i ] and you get 1001. that gets clipped to 1000, which gives you a clean 1 at the output.
      the bit that gets clipped is so small (1/1000) i don't expect you to notice that on your pot rotation.
      in practice, you can actually get away with larger offsets for safety.

      you can set that offset - the difference between 1000 and 1015 - at the inlet on the right.
      just send it the number 15, it will replace the default 1000 with 1015 and you're good to go.
      or set the multiplier manually if you prefer, of course.

      there might be easier ways to do this, but this was meant to be universally applicable.
      there might also be harder ways to do it πŸ™‚

        Remork
        Thanks a lot for this reminder !
        I discover that a problem could be that I don't knew that it could be possible to had informations from the IDE like you done :

        Remork what i do is run a [print] object somewhere in this path to monitor Pd's values in the IDE.

        Allow me to ask the question : how do you monitor a value in the IDE ?

        if you have something like

        [adc~ 3]
        |
        | [loadbang]
        |  |
        | [metro 100]
        |/
        [snapshot~]
        |
        [print]

        this will print the value in the console

          giuliomoro [adc~ 3]
          |
          | [loadbang]
          | |
          | [metro 100]
          |/
          [snapshot~]
          |
          [print]

          An elementary poetry who blow out weeks of headaches.
          Thanks @giuliomoro and @Remork to undumb me.

          giuliomoro this will print the value in the console

          So, with this nice little tool, i found unstable (exept 0) values as:
          [dac~3] β‰ˆ 0 β€” 0.911
          [dac~4] β‰ˆ 0 β€” 0.897
          [dac~5] β‰ˆ 0 β€” 0.909
          [dac~6] β‰ˆ 0 β€” 0.911
          [dac~7] β‰ˆ 0 β€” 0.932
          [dac~8] β‰ˆ 6.5 e-05 β€” 0.903
          [dac~9] β‰ˆ 12.5 e-05 β€” 0.910
          [dac~10] β‰ˆ 0 β€” 0.843

          So, I'm finally able to do the maths for a 0-1 world.
          Thanks !

          EDIT : not [dac~] but [adc~] !!! Sorry

            giuliomoro Do you get any crosstalk between channels?

            Yes, absolutely ! Just with a [lop~ 100] after the [adc~] and with patch

            giuliomoro [adc~ 3]
            |
            | [loadbang]
            | |
            | [metro 100]
            |/
            [snapshot~]
            |
            [print]

            FatJak So, with this nice little tool, i found unstable (exept 0) values as:
            [dac~3] β‰ˆ 0 β€” 0.911
            [dac~4] β‰ˆ 0 β€” 0.897
            [dac~5] β‰ˆ 0 β€” 0.909
            [dac~6] β‰ˆ 0 β€” 0.911
            [dac~7] β‰ˆ 0 β€” 0.932
            [dac~8] β‰ˆ 6.5 e-05 β€” 0.903
            [dac~9] β‰ˆ 12.5 e-05 β€” 0.910
            [dac~10] β‰ˆ 0 β€” 0.843

            Do you mean [adc~] ? Otherwise I am confused again.

              giuliomoro Do you mean [adc~] ? Otherwise I am confused again.

              MEGA OUPS !
              Yes, [adc~]
              And I got very few crosstalk between channels.

              The calculations have been add to the a [ReadAnalog] and it works really fine: perfect 0-1 !
              Thanks again @giuliomoro & @Remork !

              yay! glad to be of assistance.

              @giuliomoro do you think we can expect to see much fluctuation in those numbers?
              i mean, ideal scenario, not changing PSU's or anything..
              i should think this method corrects for component tolerances (which should be a fixed ratio), but i'm not sure if there are other variables at play. just picking yr brain here.

                Remork e can expect to see much fluctuation in those numbers?

                I wouldn't think so. There is an on-board LM4040 voltage reference for 10V, which probably has a 1% tolerance. The voltage across the voltage reference is also affected by temperature, but it won't change by more than 1% between 20 and 40 deg C, so I think you can assume it to be pretty much constant.