Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag filter based on resampler manifests #686

Merged
merged 2 commits into from
May 14, 2023

Conversation

oxygen-dioxide
Copy link
Contributor

Many resamplers are unable to parse flags correctly when there are moresampler-specific flags, because most resamplers only use single-character flags, but moresampler uses multi-character flags, such as "Mt", "Me", "Mb". To solve this issue, we can pass only the supported flags (specified in resampler manifest) into the resampler.

This filter uses the abbr of flags to check if it is supported, because a flag char could function differently on different resamplers. It is off by default to avoid breaking existing ustx files. To enable this filter, add this line into the resampler manifest:

expression_filter: true

image

Full resampler manifest example (tn_fnds.yaml):

expression_filter: True
expressions:
  amp:
    abbr: amp
    default_value: 0
    flag: A
    is_flag: true
    max: 100
    min: -100
    name: Amplitude Modulation
    type: Numerical
  bre:
    abbr: bre
    default_value: 0
    flag: B
    is_flag: true
    max: 100
    min: 50
    name: Breath
    type: Numerical
  bri:
    abbr: bri
    default_value: 0
    flag: O
    is_flag: true
    max: 100
    min: 0
    name: Brightness
    type: Numerical
  fstr:
    abbr: fstr
    is_flag: true
    name: Force Stretch
    options:
    - ''
    - e
    - Me
    type: Options
  gen:
    abbr: gen
    default_value: 0
    flag: g
    is_flag: true
    max: 100
    min: -100
    name: Gender
    type: Numerical
  pit:
    abbr: pit
    default_value: 0
    flag: t
    is_flag: true
    max: 1200
    min: -1200
    name: Pitch deviation (flag)
    type: Numerical

@stakira stakira merged commit f1b3f9d into stakira:master May 14, 2023
@oxygen-dioxide oxygen-dioxide deleted the expression-recommand branch November 19, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants