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

Custom IR selection in Binaural Monitoring plugin #266

Closed
wants to merge 66 commits into from

Conversation

firthm01
Copy link
Contributor

@firthm01 firthm01 commented Jan 4, 2024

As discussed with team, feature will be somewhat covert as intended for advanced users.

The solution will check for expected, pre-installed TF files, such as default_small.tf - this location will be alongside the VST on Windows, or within the Resources folder of the VST bundle on MacOS.
We also search for additional TF files in the same directory as the VST on both MacOS and Windows (we do not search for additional files within the VST bundle on MacOS because this encourages people to place their TFs within the bundle which could then get deleted if the user uninstalls/upgrades the EPS.

If more than one TF file is available, the Binaural Monitoring UI will display a drop-down menu to select the TF file to use. This drop-down will NOT be visible if only one TF file is found and if it is one of the pre-installed BEAR-released TFs. Since the UI default size is already oversized to accommodate the welcome screen, there is plenty of space to place additional controls. For the average user (those who have not generated additional TF files), the behaviour and appearance of the Binaural Monitoring plugin is unchanged.

The drop-down (if present) will present a list of TF files found. There will be a text label which can be used to display the status and/or success state of the loading of the TF file. Each TF file will be detailed in the drop-down entry. BEAR-released TF's should be emphasised and prioritised, and non-BEAR-released TF's should be clearly marked as such.

The user can use the drop-down to select the data file to use. In this case, BEAR is reinitialised with the new data file. If loading of the data file fails, an error is shown in the status text label. If the load success, the label states that the renderer is running.

@firthm01 firthm01 self-assigned this Jan 4, 2024
@firthm01 firthm01 changed the base branch from main to supplementary-definitions January 4, 2024 01:32
@firthm01 firthm01 requested a review from rsjbailey January 26, 2024 16:24
@firthm01 firthm01 marked this pull request as ready for review January 26, 2024 16:24
@firthm01
Copy link
Contributor Author

Force push was reordering of commits to organise in to ranges of consecutive commits by the task they satisfied (was a bit back-and-forth originally)

@firthm01
Copy link
Contributor Author

firthm01 commented Jan 27, 2024

Code review notes;

General minor issues found during work: 66f273c8c46cd4544972eb05e9c2591deba03912^...11488c3

  • couple of hard-coded channel counts missed during the 128ch conversion
  • default return missing for func

EarComboBox required features: 0ac8bc1de3724163b2709344a025c1b18bad5c7c^...25b60c1

  • Needed to be able to specify that the user shouldn't be able to clear the selection - only select another item
  • Needed to support string types for entry ID's. This is so we can just use a filepath as the entry ID's so we don't have to maintain some sort of lookup table. Since existing uses of EarComboBox needed int ID's supported and there may be other basic types needed in future, just made sense to just allow a juce::var as an ID type

Main development on TF selection: 358de81398faf422258d14bfee519ba61a8e2a54^...4f557ef

  • Needed to record and display BEAR issues

    • Existing error overlay removed (error_overlay.hpp) - we would use status Label at the bottom of the plugin UI
    • BearStatus struct used to describe state(set in ctor of BinauralMonitoringAudioProcessor), and a status Label placed in EarBinauralMonitoringAudioProcessorEditor
    • Frontend connector updated to set this "status" text and colour. Can be passed a BearStatus struct.
  • DataFileManager singleton used to find, report and track selection of data files

    • Searches in 2 locations for TFs; a search for any *.tf in the dir of the VST3 file or bundle (for custom files), and for expected pre-installed files (bearReleaseFiles_) in either the VST3 files directory on Windows or within the VST3 bundle Resources subdir on MacOS.
    • Extracts metadata from TFs in to DataFile structs
    • Tracks selection of data files, and allows for a callback on selection change - this is used by EarBinauralMonitoringAudioProcessor to restartBearProcessor with the config change.
    • EarBinauralMonitoringAudioProcessor also reads and writes selected data file to the existing preferences file for the plugin
  • UI component needed for data file selection - This is ValueBoxDataFile with an EarComboBox

    • EarComboBox passed to Frontend connector - adds entries from DataFileManager, and becomes a listener to comboBoxChanged to tell DataFileManager
    • ValueBoxDataFile passed to Frontend connector - Only allowed visible if DataFileManager only has one data file, it is selected, and it is a BEAR release

UI improvements as discussed 19th Jan: f381667836c9d24147adec7698715563db1b3a39^...ece9fe4

  • Needed a EarComboBoxEntry which supported main text (like EarComboBoxTextEntry) with additional subtext. Made EarComboBoxTextWithSubtextEntry inheriting from EarComboBoxTextEntry.
    • Needed to support multi-line subtexts (done with juce::StringArray) and word-wrapping (addWordwrappedLines - already super-commented so won't explain here).
    • Use subtext for data files description metadata

@firthm01
Copy link
Contributor Author

TODO: Update BEAR once default file updated with metadata and changes merge to main

Copy link
Contributor

@rsjbailey rsjbailey left a comment

Choose a reason for hiding this comment

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

Reviewed via #270

@firthm01
Copy link
Contributor Author

Cleaner code + additional fixes on #270 - merge that one instead

@firthm01 firthm01 closed this Feb 26, 2024
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