INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Some Wiki Clarification help  (Read 2846 times)

soongsc

  • World Citizen
  • ***
  • Posts: 106
Some Wiki Clarification help
« on: December 20, 2015, 08:03:13 pm »

Hi,

I was reading though the Wiki about convolution in DSP, and have a few questions about the following:

Convolution filters are created at a specific sample rate, which means that they will only work correctly with that sample rate. However, MC offers two solutions to that issue:
1. MC will automatically resample the filters on the fly; this solves the problem for most use cases.
2. If you want more control over what happens with different sample rates and channel configurations, you can generate separate filters at each sample rate, and MC will automatically switch between them, but you must use the following naming format for your filters: Name2.0_441 or Name5.1_48, etc. The regular expression is: ^(.+)(\\d{1}.\\d{1})_(\\d{2,3}).cfg$, which outputs: Name Channels Sample rate.

Question about 1.  Do we need to set this up for MC to do this automatically?  Or does it happen by default?
Question about 2.  I cannot quite understand the "regular expression" is there a place where I can find some examples?  Do I need a config file for automatically switching to take place?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5242
  • "Linux Merit Badge" Recipient
Re: Some Wiki Clarification help
« Reply #1 on: December 20, 2015, 08:27:38 pm »

I wrote that wiki article, so I can help  ;D

Convolution filters are created at a specific sample rate, which means that they will only work correctly with that sample rate. However, MC offers two solutions to that issue:
1. MC will automatically resample the filters on the fly; this solves the problem for most use cases.
2. If you want more control over what happens with different sample rates and channel configurations, you can generate separate filters at each sample rate, and MC will automatically switch between them, but you must use the following naming format for your filters: Name2.0_441 or Name5.1_48, etc. The regular expression is: ^(.+)(\\d{1}.\\d{1})_(\\d{2,3}).cfg$, which outputs: Name Channels Sample rate.

Question about 1.  Do we need to set this up for MC to do this automatically?  Or does it happen by default?
Question about 2.  I cannot quite understand the "regular expression" is there a place where I can find some examples?  Do I need a config file for automatically switching to take place?

To question 1: my understanding is that it's supposed to work automatically/by default.  There certainly isn't a setting to enable it.
To question 2: The article includes examples, they are in the sentence preceding the regular expression, e.g. Name2.0_441 or Name5.1_48.  You want the name of your filter followed immediately by the channel count, an underscore and the sample rate (typically rounded to the nearest KHz, but 44.1 is special and you should use 441. If you want to use the second method you don't need a config file, but all the filters should be in the same directory and should observe the naming convention.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: Some Wiki Clarification help
« Reply #2 on: December 20, 2015, 08:40:26 pm »

I wrote that wiki article, so I can help  ;D

To question 1: my understanding is that it's supposed to work automatically/by default.  There certainly isn't a setting to enable it.
To question 2: The article includes examples, they are in the sentence preceding the regular expression, e.g. Name2.0_441 or Name5.1_48.  You want the name of your filter followed immediately by the channel count, an underscore and the sample rate (typically rounded to the nearest KHz, but 44.1 is special and you should use 441. If you want to use the second method you don't need a config file, but all the filters should be in the same directory and should observe the naming convention.
Thanks, this part was confusing to me: The regular expression is: ^(.+)(\\d{1}.\\d{1})_(\\d{2,3}).cfg$, Is this for some more advanced setting?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5242
  • "Linux Merit Badge" Recipient
Re: Some Wiki Clarification help
« Reply #3 on: December 20, 2015, 08:51:15 pm »

Thanks, this part was confusing to me: The regular expression is: ^(.+)(\\d{1}.\\d{1})_(\\d{2,3}).cfg$, Is this for some more advanced setting?

It's there to show the logic that the program uses to parse the file names (the devs provided it in a thread).  If you know regular expressions it will tell you more than the examples could; it's there for completeness.  Are you seeing something in the regular expression that contradicts the examples?  If you're unfamiliar with regex, just ignore it.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: Some Wiki Clarification help
« Reply #4 on: December 20, 2015, 09:06:29 pm »

It's there to show the logic that the program uses to parse the file names (the devs provided it in a thread).  If you know regular expressions it will tell you more than the examples could; it's there for completeness.  Are you seeing something in the regular expression that contradicts the examples?  If you're unfamiliar with regex, just ignore it.
I'm trying to figure out what it would take to do multi sample rate and multi channel automatic switching.  For example, I have some music in multichannel like DVD audio, most in stereo in different sample rates.  It would be nice to not worry about manually switching.
Logged
Pages: [1]   Go Up