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

Remove redundant NaN clean of melbank #755

Merged
merged 4 commits into from
Feb 18, 2024

Conversation

bigredfrog
Copy link
Contributor

@bigredfrog bigredfrog commented Feb 18, 2024

The call to melbank_no_nan in the Audio self.melbank() is the only one needed.

melbank_thirds does not need an additional call, it will already be cleaned for NaNs

Older code would of only cleaned melbank, not the thirds. But the newer code is good as it cleans directly in melbank, and thirds is derived

Tested by NaN injection and single stepping in debug

Summary by CodeRabbit

  • Refactor
    • Improved the processing efficiency of audio effects by refining the method used for handling melbank data.

Copy link
Contributor

coderabbitai bot commented Feb 18, 2024

Walkthrough

The modification involves the removal of a function call to melbank_no_nan within the melbank_thirds method. This change directly impacts how melbank data is processed, specifically before it undergoes splitting according to predefined criteria. The alteration suggests a refinement in handling melbank data, potentially enhancing the efficiency or accuracy of the audio effect processing in the application.

Changes

File(s) Change Summary
ledfx/effects/audio.py Removed the call to melbank_no_nan in the melbank_thirds method, affecting melbank processing before splits.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a664f6a and e9e1135.
Files selected for processing (1)
  • ledfx/effects/audio.py (1 hunks)
Additional comments: 1
ledfx/effects/audio.py (1)
  • 948-951: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

The PR's objective to remove redundant NaN cleaning from the melbank_thirds method aligns with the rationale provided. However, the specific change is not directly annotated in the provided code. It's important to ensure that the removal of the melbank_no_nan call from melbank_thirds does not negatively impact the data integrity downstream, especially considering that melbank data is already cleaned of NaNs upstream.

@shauneccles shauneccles merged commit 1d9dc17 into LedFx:main Feb 18, 2024
20 checks passed
@bigredfrog bigredfrog deleted the melbank-clean branch February 19, 2024 01:37
shauneccles pushed a commit to shauneccles/LedFx that referenced this pull request Feb 23, 2024
shauneccles added a commit that referenced this pull request Feb 23, 2024
* feat: Expose melbank configurations via API

* Remove melbanks API endpoint and fix melbanks config population

* Expose audio analysis methods via API

* Update sentry-sdk to be >=

* build: refactor sentry init, refactor spec files, wheel workflow, add sha and release to info.py

* Change audio frame size mismatch logging level to debug

* Add saturation threshold to Glitch effect

* Fix error message return for trying to create a device with existing ip

* Add BaseConfigUpdateEvent and handle base configuration updates

* Add websocket docs and capture _sender connection reset errors.

* Update incorrect docstring

* Add handling for non-subscribable events in WebsocketConnection

* chore(deps): update dependency pytest to v8.0.1

* Add automated update checker with notifications and API endpoint

* Use slicing for saturation clipping and add option for fixing hues in HSV effect

* Fix: reason return on rest api error (#757)

* Fix handling of complex reason failures on rest calls

* Fix handling of complex reason failures on rest calls

* Fix handling of complex reason failures on rest calls

* Fix handling of complex reason failures on rest calls

* fix(deps): update dependency python-mbedtls to v2.9.2

* Fix: remove redundant melbank NaN clean (#755)

* Update dependency pre-commit to v3.6.2

* Fix DDP connections error to warn once

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dependency sentry-sdk to v1.40.5

* Add event firing for device deactivation from errors and error recovery

* Fix openrgb device type

* Move renovate to .github and enable automerge for minor/patch updates

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](asottile/pyupgrade@v3.15.0...v3.15.1)

* Update renovate.json with additional helpers

* Fix renovate config

* Remove gha digests from renovate

* Initial addition of frontend source

* Remove electron/storybook options

* Update branding and remove references to hacking

* Remove automatic starring of repos

* Further removal of starring

* Update websocket event names

* Add LedFx to sidebar

* Use backend update checker to check and notify for updates

* Remove additional electron artifacts

* Rebuild frontend and add deploy scripts

* Update documentation and re-add frontend development setup

* Release 2.0.94

* Add frontend-ci to validate frontend changes

* Update frontend-ci.yml to install NPM packages in the frontend directory

* Update Yarn to v1.22.21

* Add frontend directory to build step

* Update dependency eslint-plugin-import to v2.29.1

* Update dependency strip-ansi to v7

* Update dependency ts-deepmerge to v7

* Update dependency base32-encode to v2

* Fix conditional check for openRGB devices

* Update CI/CD workflows to reduce action usage and prevent early sentry notifications

* Add environment for approval prior to release creation/publishing

* Update typescript-eslint monorepo to v7

* Update storybook monorepo to v7.6.17

* Update dependency eslint to v8.56.0

* Update preset categories in store and API

* Update frontend/src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Slight cleanup of names and hooks

* Fix ledfx_presets array indexing

* Handle multiple enums from audio schema, fix linting and remove tempo_method

---------

Co-authored-by: atod <anthony.tod@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian W. Zuckschwerdt <christian@zuckschwerdt.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

None yet

2 participants