sound-equalizer #105613

Merged
Richard Antalik merged 18 commits from :sound-equalizer into main 2023-08-30 22:36:44 +02:00
Contributor

Description

UI / UX

The user can create modifiers to audio strips, the same way as video strips. The list of modifiers has been splited in 2 groups, one for video and one for audio (now only one modifier).

The EQ modifier lets you define the sound modification. The power is limited to -30 db - 30 db.

  • Create ONE graphical band definition
  • with Python API, user can delete all the graphical band definitions, and create one by one, with their desired ranges

Implementation

The sound equalizer has been made using the Audaspace FFT Convolver.

The blender part creates an array of descriptions of power per "band", and orders the creation of Equalizer (ISound) in the Audaspace part. The equalization is made with an Impulse Response which convolutes with the sound itself. In this case, it uses FFTConvolver.

Improvements / limitations

  • Audaspace requires a FFTW library for "floats", but the library that comes with blender, to compile, only supports double. As a temporary solution, a conversion step has been created in FFTPlan
  • little optimization has been applied in the source code
  • This patch is created with PR #105611 in mind
# Description ## UI / UX The user can create modifiers to audio strips, the same way as video strips. The list of modifiers has been splited in 2 groups, one for video and one for audio (now only one modifier). The EQ modifier lets you define the sound modification. The power is limited to -30 db - 30 db. * Create ONE graphical band definition * with Python API, user can delete all the graphical band definitions, and create one by one, with their desired ranges ## Implementation The sound equalizer has been made using the Audaspace FFT Convolver. The blender part creates an array of descriptions of power per "band", and orders the creation of Equalizer (ISound) in the Audaspace part. The equalization is made with an Impulse Response which convolutes with the sound itself. In this case, it uses FFTConvolver. ## Improvements / limitations * Audaspace requires a FFTW library for "floats", but the library that comes with blender, to compile, only supports double. As a temporary solution, a conversion step has been created in FFTPlan * little optimization has been applied in the source code * This patch is created with PR https://projects.blender.org/blender/blender/pulls/105611 in mind
Marcos Perez added 2 commits 2023-03-09 18:04:37 +01:00
Sergey Sharybin added this to the Video Sequencer project 2023-03-10 10:43:46 +01:00
Sergey Sharybin requested review from Francesco Siddi 2023-03-10 10:44:14 +01:00
Sergey Sharybin requested review from Sergey Sharybin 2023-03-10 10:44:14 +01:00
Sergey Sharybin requested review from Richard Antalik 2023-03-10 10:44:15 +01:00

While this patch introduces a useful feature, it does not deal with design implications such as:

  • how to provide visual feedback (metering/monitoring)
  • how to replicate the eq settings across multiple tracks (besides copy-pasting)

Besides that, I have no further feedback.

While this patch introduces a useful feature, it does not deal with design implications such as: - how to provide visual feedback (metering/monitoring) - how to replicate the eq settings across multiple tracks (besides copy-pasting) Besides that, I have no further feedback.

I have accepted this patch already, so will do so here as well

I have accepted this patch already, so will do so here as well
Richard Antalik approved these changes 2023-03-14 02:28:39 +01:00
Author
Contributor

@fsiddi I would need more information / help to address your concerns:

  • visual feedback is a very broad subject. And it would be a whole project by itself. Do you have something definite in mind?
  • about replicate EQ. Blender has copy / replace modifier and it works. What new way of use have you in mind?
@fsiddi I would need more information / help to address your concerns: * visual feedback is a very broad subject. And it would be a **whole** project by itself. Do you have something definite in mind? * about replicate EQ. Blender has copy / replace modifier and it works. What new way of use have you in mind?
Marcos Perez added 2 commits 2023-03-16 16:38:46 +01:00

I apologize for not following up on this.

  • Visual feedback: This is indeed a design challenge, which I'm not able to contribute to at this time.
  • Copy pasting modifiers is an accepted workflow in Blender, so that's fine.

Feel free to go ahead and merge this patch, and thank you for your contribution! In the future, I hope you'll be interested in further participating in activities that are aligned to the module planning.

I apologize for not following up on this. * Visual feedback: This is indeed a design challenge, which I'm not able to contribute to at this time. * Copy pasting modifiers is an accepted workflow in Blender, so that's fine. Feel free to go ahead and merge this patch, and thank you for your contribution! In the future, I hope you'll be interested in further participating in activities that are aligned to the module planning.
Francesco Siddi approved these changes 2023-04-17 16:47:34 +02:00
Sergey Sharybin reviewed 2023-04-20 10:04:44 +02:00
Sergey Sharybin left a comment
Owner

On a Blender side the code seems acceptable.

The Audaspace is not really clear to me. Was the code submitted to its upstream?

On a Blender side the code seems acceptable. The Audaspace is not really clear to me. Was the code submitted to its upstream?
Sergey Sharybin requested review from Joerg Mueller 2023-04-20 10:04:54 +02:00
Sergey Sharybin approved these changes 2023-04-20 10:06:42 +02:00
Sergey Sharybin left a comment
Owner

From my side I do not really have feedback. Is more about how to move forward and synchronize with the code which comes from an external library. Hence added Joerg.

@iss Can you help taking care of applying the patch in a way that the extern/audaspace is aligned with its upstream?

From my side I do not really have feedback. Is more about how to move forward and synchronize with the code which comes from an external library. Hence added Joerg. @iss Can you help taking care of applying the patch in a way that the extern/audaspace is aligned with its upstream?

From my side I do not really have feedback. Is more about how to move forward and synchronize with the code which comes from an external library. Hence added Joerg.

@iss Can you help taking care of applying the patch in a way that the extern/audaspace is aligned with its upstream?

I can check how things merge and ensure it's clean.

Since we are in bcon2 now do you think it is OK to merge now or shall I wait for next bcon1?

> From my side I do not really have feedback. Is more about how to move forward and synchronize with the code which comes from an external library. Hence added Joerg. > > @iss Can you help taking care of applying the patch in a way that the extern/audaspace is aligned with its upstream? I can check how things merge and ensure it's clean. Since we are in bcon2 now do you think it is OK to merge now or shall I wait for next bcon1?

The audaspace changes appears to be merged to the upstream, and to our bundled version already.

The majority of the remaining changes are related to the curve mapping. They seem straightforward and safe.
The rest of the changes seems to be quite isolated in the sequencer area. Doesn't seem to be high risk. But extra check for crashes etc before push never hurts!

The audaspace changes appears to be merged to the upstream, and to our bundled version already. The majority of the remaining changes are related to the curve mapping. They seem straightforward and safe. The rest of the changes seems to be quite isolated in the sequencer area. Doesn't seem to be high risk. But extra check for crashes etc before push never hurts!
Joerg Mueller requested changes 2023-04-20 18:55:55 +02:00
Joerg Mueller left a comment
Member

As I've written on developers.blender.org before accepting this patch I would like any changes to audaspace reverted. Everything necessary is in there already (in upstream audaspace and also ported to blender) and we need fftw3f (the float version not the double version) as a new dependency, since using fftw3d (the double version) is unnecessary here. Afaik, it is possible to have both versions of the library in one project. I've stated a couple of times already on developers.blender.org that the package maintainers have to be contacted to get fftw3f in.

As I've written on developers.blender.org before accepting this patch I would like any changes to audaspace reverted. Everything necessary is in there already (in upstream audaspace and also ported to blender) and we need fftw3f (the float version not the double version) as a new dependency, since using fftw3d (the double version) is unnecessary here. Afaik, it is possible to have both versions of the library in one project. I've stated a couple of times already on developers.blender.org that the package maintainers have to be contacted to get fftw3f in.
Member

if the VFX module says they need fftw3f and this patch is getting close to landing, the platform team has no issues doing the lib work. Given the amount of uncertainty in this diff and how long this has been dragging on, I can't justify working on this until @Sergey gives the green light though.

if the VFX module says they need fftw3f and this patch is getting close to landing, the platform team has no issues doing the lib work. Given the amount of uncertainty in this diff and how long this has been dragging on, I can't justify working on this until @Sergey gives the green light though.
Member

He already did 10 hours ago :)

He already did 10 hours ago :)
Member

Talked to sergey, added the work for the 3.6 lib update in #104895

Talked to sergey, added the work for the 3.6 lib update in #104895
Richard Antalik added 2 commits 2023-05-20 04:49:21 +02:00

I have reverted changes in Audaspace, I am trying to resolve some build issues on Windows at least still.

I have reverted changes in Audaspace, I am trying to resolve some build issues on Windows at least still.
Member

I have reverted changes in Audaspace, I am trying to resolve some build issues on Windows at least still.

Great! I assume once the build issues are resolved, the changes to audaspace's CMakeLists.txt will be reverted as well? At the moment it won't build properly when fftw is disabled since there is still the Equalizer source defined outside the corresponding if that checks if fftw is enabled. Any changes that are necessary regarding the cmake options/variables of audaspace should be made in the blender_config.cmake file.

> I have reverted changes in Audaspace, I am trying to resolve some build issues on Windows at least still. Great! I assume once the build issues are resolved, the changes to audaspace's `CMakeLists.txt` will be reverted as well? At the moment it won't build properly when fftw is disabled since there is still the `Equalizer` source defined outside the corresponding if that checks if fftw is enabled. Any changes that are necessary regarding the cmake options/variables of audaspace should be made in the `blender_config.cmake` file.
First-time contributor

Suggested UI improvements:
image

  • Make the Start/End of the range edible, so users can limit it to the range they're working in. The default values are far too big for ex. trying to remove a noise close to the range of a voice.
  • Fix the ranges of the Start/End values, currently they're set to (-100,100), which doesn't make sense.
  • Add Hz and dB as units and add them to the widgets.

The UI code can be found here: https://gist.github.com/tin2tin/4cb6248b8746b7c132382a438f54be38

Suggested UI improvements: ![image](/attachments/3d3b4c37-6e02-4590-bf1b-a328dc6b59a1) - Make the Start/End of the range edible, so users can limit it to the range they're working in. The default values are far too big for ex. trying to remove a noise close to the range of a voice. - Fix the ranges of the Start/End values, currently they're set to (-100,100), which doesn't make sense. - Add Hz and dB as units and add them to the widgets. The UI code can be found here: https://gist.github.com/tin2tin/4cb6248b8746b7c132382a438f54be38
Richard Antalik added 3 commits 2023-08-13 11:57:11 +02:00

@blender-bot build

@blender-bot build
Richard Antalik added 1 commit 2023-08-14 03:31:54 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
b440d0f6fe
Fix typo

@blender-bot build

@blender-bot build
Richard Antalik added 1 commit 2023-08-17 14:11:17 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
bd35eb86b9
Update cmake variables, so it should build on Linux/Mac

@blender-bot build

@blender-bot build
Richard Antalik added 1 commit 2023-08-17 14:58:59 +02:00

@blender-bot build

@blender-bot build
First-time contributor

@iss I saw in the weekly notes, that there are some build problems on some of the platforms. UI considerations were mentioned earlier, but it was never mentioned what they were. Does the UI suggestion above address some of them?

@iss I saw in the weekly notes, that there are some build problems on some of the platforms. UI considerations were mentioned earlier, but it was never mentioned what they were. Does the UI suggestion above address some of them?

@iss I saw in the weekly notes, that there are some build problems on some of the platforms. UI considerations were mentioned earlier, but it was never mentioned what they were. Does the UI suggestion above address some of them?

It's fftw float library integration issue with Linux/Mac. You can see the problem by checking buildbot output. The snippet above does not fix it.

> @iss I saw in the weekly notes, that there are some build problems on some of the platforms. UI considerations were mentioned earlier, but it was never mentioned what they were. Does the UI suggestion above address some of them? It's fftw float library integration issue with Linux/Mac. You can see the problem by checking buildbot output. The snippet above does not fix it.
First-time contributor

Please re-read what I wrote. My snippet was addressing UI issues.

Please re-read what I wrote. My snippet was addressing UI issues.

Are you refering to this comment?

While this patch introduces a useful feature, it does not deal with design implications such as:

  • how to provide visual feedback (metering/monitoring)
  • how to replicate the eq settings across multiple tracks (besides copy-pasting)

Besides that, I have no further feedback.

In any case, I am happy to implement your suggestion, but at this moment I need to get this patch to build at all

Are you refering to this comment? > While this patch introduces a useful feature, it does not deal with design implications such as: > > - how to provide visual feedback (metering/monitoring) > - how to replicate the eq settings across multiple tracks (besides copy-pasting) > > Besides that, I have no further feedback. In any case, I am happy to implement your suggestion, but at this moment I need to get this patch to build at all
Richard Antalik added 1 commit 2023-08-28 17:49:49 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
bdf5b111b8
Fix build issue on Linux/Mac

@blender-bot build

@blender-bot build
Richard Antalik added 2 commits 2023-08-28 18:50:29 +02:00

@blender-bot build

@blender-bot build
Joerg Mueller approved these changes 2023-08-28 21:03:44 +02:00
Joerg Mueller left a comment
Member

Thanks @iss for taking care of fftwf! :)

Thanks @iss for taking care of fftwf! :)
Richard Antalik added 1 commit 2023-08-29 15:45:17 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
0177cad13b
Merge branch 'main' into sound-equalizer
Richard Antalik added 2 commits 2023-08-30 20:16:17 +02:00

Thanks @iss for taking care of fftwf! :)

Thank you for explanation of how to do this correctly.

> Thanks @iss for taking care of fftwf! :) Thank you for explanation of how to do this correctly.
Richard Antalik merged commit 1015bed2fd into main 2023-08-30 22:36:44 +02:00
Sergey Sharybin removed this from the Video Sequencer project 2023-11-22 11:56:34 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105613
No description provided.