10000 Add normalization filter support · Issue #6 · ragaeeb/tafrigh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Add normalization filter support #6

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

Closed
ragaeeb opened this issue Sep 6, 2024 · 1 comment · Fixed by #8
Closed

Add normalization filter support #6

ragaeeb opened this issue Sep 6, 2024 · 1 comment · Fixed by #8
Assignees
Labels
feature New feature points/3 Medium task priority/medium Medium priority technical-logic Deals with application business logic tests Affects Software Validation and Verification
Milestone

Comments

@ragaeeb
Copy link
Owner
ragaeeb commented Sep 6, 2024

To boost the low sounds in an audio

@ragaeeb ragaeeb added feature New feature points/3 Medium task priority/medium Medium priority tests Affects Software Validation and Verification technical-logic Deals with application business logic labels Sep 6, 2024
@ragaeeb ragaeeb added this to the next milestone Sep 6, 2024
@ragaeeb ragaeeb self-assigned this Sep 6, 2024
@ragaeeb
Copy link
Owner Author
ragaeeb commented Sep 6, 2024
interface NoiseReductionOptions {
    highpass?: number | null;
    afftdnStart?: number | null;
    afftdnStop?: number | null;
    afftdn_nf?: number | null;
    dialogueEnhance?: boolean;
    lowpass?: number | null;
    loudnorm?: boolean; // New option for loudnorm
    compand?: boolean;  // New option for compand
}

const buildConversionFilters = ({
    highpass,
    afftdnStart,
    afftdnStop,
    afftdn_nf,
    dialogueEnhance,
    lowpass,
    loudnorm,
    compand
}: NoiseReductionOptions): string[] => {
    const filters = [
        highpass !== null && `highpass=f=${highpass}`,
        afftdnStart !== null &&
            afftdnStop !== null && [`asendcmd=${afftdnStart} afftdn sn start`, `asendcmd=${afftdnStop} afftdn sn stop`],
        afftdn_nf !== null && `afftdn=nf=${afftdn_nf}`,
        dialogueEnhance && 'dialoguenhance',
        lowpass && `lowpass=f=${lowpass}`,
        loudnorm && 'loudnorm',    // Add loudnorm filter if enabled
        compand && 'compand'      // Add compand filter if enabled
    ]
        .flat()
        .filter(Boolean) as string[]; // Flatten and filter out undefined values

    return filters;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature points/3 Medium task priority/medium Medium priority technical-logic Deals with application business logic tests Affects Software Validation and Verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0