• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Unlinking Stereo Channels III

    January 15th, 2013
    math, vsl1818, experiment, music, tech, sound  [html]
    Success! I can now display eight independent mono channels to the user while internally representing that as four stereo channels. Before I was struggling with how to extract the underlying equations that VSL is using to turn gain/pan into left/right, but I decided to give up and just brute-force it. I made a giant table (csv):
      pan, gain, left, right
      ...
      34, 80, 0.783, 0.69
      34, 81, 0.793, 0.701
      34, 82, 0.804, 0.712
      34, 83, 0.815, 0.717
      34, 84, 0.821, 0.728
      34, 85, 0.832, 0.739
      34, 86, 0.842, 0.75
      34, 87, 0.853, 0.761
      34, 88, 0.859, 0.766
      34, 89, 0.87, 0.777
    
    Then to implement to_left_right(gain, pan) and to_gain_pan(left, right) I just find the table row that best corresponds to the desired conditions and use that. So if I call to_gain_pan(left=0.83, right=0.74) it will probably identify the line 34, 85, 0.832, 0.739 as closest and so decide to set gain to 85% and pan to 34%.

    It bothers me a little to use something so inefficient (Index it! Figure out the equations!), but it's fast enough. And it works. So now I can use all eight channels for their own mixes.

    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