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

UI Remake #73

Merged
merged 37 commits into from
Oct 16, 2024
Merged

UI Remake #73

merged 37 commits into from
Oct 16, 2024

Conversation

MyBlackMIDIScore
Copy link
Member

You are going to hate me for this

@Kaydax
Copy link
Member

Kaydax commented Sep 30, 2024

I do

@MyBlackMIDIScore
Copy link
Member Author

I do

Thanks. And I am not even half done :)

@MyBlackMIDIScore MyBlackMIDIScore marked this pull request as ready for review October 10, 2024 14:29
@MyBlackMIDIScore
Copy link
Member Author

Bookmarks

Winit stuff

(Basically updated to 0.30 which requires a struct for the application instead of an event loop closure)

Vulkano stuff

(Updated to 0.34)

Settings/Config

  • mod.rs (Remade the layout and made it immune to invalid and nonexistent values using #[serde(default)])
  • enums.rs (I put all the settings related enums and their implementations there)
  • migrations (Moved v0 and v1 migrations to this folder)

Audio/Synthesizer

  • mod.rs (Implement trait for supported synthesizers and hold it inside a struct using Box<dyn ...> to be used within the app. One concern is the performance hit from using a Box)
  • xsynth.rs
  • midiout.rs (Added support for MIDI Out devices using the midir crate. Devices are being looked up using their registered name)
  • kdmapi.rs (Forked your crate for this so I could use Results instead of panics and to implement the LoadCustomSoundFontsList method to load Wasabi's SF list)
  • empty.rs (Synth that doesn't do anything, I use this for unloading the previous synth before loading a new one to avoid KDMAPI errors, and I also gave it as an option if someone doesn't want audio)

GUI Highlights

  • window.rs
    • (L154, L165: I am using crossbeam to select and load MIDIs so the main UI does not freeze while doing so)
    • (L361: File picker method)
    • (L385: MIDI loader method)
  • errors.rs (Error types for Wasabi. Also implemented a UI message system for it to show errors in windows)
  • fps.rs (Kind of remade this for FPS limiting)

MIDI

  • mod.rs (L131: Loading colors from image palette + randomizing)
  • timer.rs (Keep the start delay value in the struct since it can now be set from the settings)

Misc

  • state.rs (Mostly to highlight that the synth is stored there for easier passing around)
  • utils.rs
  • build.yml (Changed filenames for the built-in updater to work properly & added ARM Windows build)

Other changes not listed here are either long egui code or changes in other files to reflect any method changes mentioned above)

Cargo.toml Show resolved Hide resolved
src/app.rs Show resolved Hide resolved
src/utils.rs Outdated Show resolved Hide resolved
src/audio_playback/xsynth.rs Show resolved Hide resolved
src/audio_playback/mod.rs Outdated Show resolved Hide resolved
src/midi/shared/timer.rs Outdated Show resolved Hide resolved
src/audio_playback/mod.rs Show resolved Hide resolved
src/gui/window.rs Outdated Show resolved Hide resolved
src/gui/window.rs Show resolved Hide resolved
@@ -164,12 +296,21 @@ impl GuiWasabiWindow {
}
});

// If song is finished, pause
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need its own block?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean?
Should I move it elsewhere?

Copy link
Collaborator

@arduano arduano Oct 15, 2024

Choose a reason for hiding this comment

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

I mean the extra set of {}
there's a couple like that in this file, not sure if that's necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I added those because some variables were only used there. For this case it won't make any difference so I can remove it if you want

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah only use that if it makes a difference for the logic imo, more variables in the scope isn't an issue

@MyBlackMIDIScore
Copy link
Member Author

@arduano Made most of the changes requested. I'll wait for clarifications on the other comments before I fix the rest

Copy link
Collaborator

@arduano arduano left a comment

Choose a reason for hiding this comment

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

Other than the {} scope thing, looks ok
still some things to look at after this PR is merged though

@MyBlackMIDIScore
Copy link
Member Author

@arduano Will fix that and merge. I also created issues about the rest we discussed that needs to be fixed and added everything in a milestone for 1.0.0. Let me know if this is ok or if there is something else we need to look at.

@arduano
Copy link
Collaborator

arduano commented Oct 16, 2024

Nothing off the top of my head

@MyBlackMIDIScore MyBlackMIDIScore merged commit d0e0067 into master Oct 16, 2024
1 check passed
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.

[Feature Request] Add support for MIDI interface Implement VSync/frame limiter
3 participants