• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Unlinking Stereo Channels II

    January 10th, 2013
    math, vsl1818, experiment, music, tech, sound  [html]
    I have stereo channels I want to unlink. Simple linear interpolation turns out not to be the answer, so I need to determine the relationship between gain, pan, and the output levels experimentally. I set up my VSL1818 as:
      smartphone           AB 1818 VSL
    +------------+        +-----------+
    |  sine wave |        |           |
    | generation >--------> in1       |
    |     app    |        |      aux3 >-----+
    +------------+  +-----> in2       |     |
                    |     |      aux4 >--+  |
                    |  +--> in3       |  |  |
                    |  |  |           |  |  |
                    |  |  +-----------+  |  |
                    |  +-----------------+  |
                    +-----------------------+
    
    The phone generated a tone, which went into input 1 of the mixer. I connected outputs 3 and 4 of the vsl1818 back to inputs 2 and 3. In software I set the mixer to send input 1 to outputs 3 and 4. Then a program I wrote iterated through combinations of gain and pan while measuring the levels of input 2 and 3:
    pan %, gain %, left, right
    ...
    30, 60, 165, 143
    30, 61, 166, 145
    30, 62, 168, 146
    30, 63, 170, 147
    30, 64, 172, 150
    30, 65, 174, 151
    30, 66, 175, 153
    30, 67, 177, 156
    30, 68, 179, 157
    ...
    
    (full data, 10000 rows)
    This is frustrating because of two different sources of nonlinearity. The first is that gain and pan are combined in some way I don't yet understand. The second is that the chosen gain (out) and measured level (in) aren't linear either:

    Still, I can look at equivalence classes, combinations of gain and pan that all keep one channel the same while varying the other. Each graph shows all the combinations of gain (red) and pan (blue) that keep one channel at the specified level.

    One channel constant at 0 (raw)
    One channel constant at 24 (raw)
    One channel constant at 65 (raw)
    One channel constant at 84 (raw)
    One channel constant at 113 (raw)
    One channel constant at 131 (raw)
    One channel constant at 160 (raw)
    One channel constant at 187 (raw)
    One channel constant at 221 (raw)
    One channel constant at 235 (raw)

    My goal is two functions:

      def to_gain_pan(left, right):
         ...
         return gain, pan
    
      def to_left_right(gain, pan):
         ...
         return left, right
    
    I think I now have the data I need to write these functions, but I'm still not sure what they are.

    Comment via: google plus, facebook

    Recent posts on blogs I like:

    More on the Deutschlandtakt

    The Deutschlandtakt plans are out now. They cover investment through 2040, but even beforehand, there’s a plan for something like a national integrated timetable by 2030, with trains connecting the major cities every 30 minutes rather than hourly. But the…

    via Pedestrian Observations July 1, 2020

    How do cars fare in crash tests they're not specifically optimized for?

    Any time you have a benchmark that gets taken seriously, some people will start gaming the benchmark. Some famous examples in computing are the CPU benchmark specfp and video game benchmarks. With specfp, Sun managed to increase its score on 179.art (a su…

    via Posts on Dan Luu June 30, 2020

    Quick note on the name of this blog

    When I was 21 a friend introduced me to a volume of poems by the 14th-century Persian poet Hafiz, translated by Daniel Ladinsky. I loved them, and eventually named this blog for one of my favorite ones. At some point I read more and found that Ladinsky’s …

    via The whole sky June 21, 2020

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact