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

Add DAW Integration #1266

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

sevenc-nanashi
Copy link

This PR adds DAW Integration, in other words, VST integration.

I created a thread for this in discord: https://canary.discord.com/channels/551606189386104834/1279749765092872293

Copy link
Author

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

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

It's almost done!
Test build is available on: https://github.com/sevenc-nanashi/OpenUtau/releases/tag/0.1.530-dev.0

I used Visual Studio's formatter for my C# code, and clang-format for C++ files.
Is there existing configuration for formatters?

Notes:
- `-DCMAKE_BUILD_TYPE=Debug` can be replaced with `-DCMAKE_BUILD_TYPE=Release` for a release build.
- When you're using Visual Studio, your plugin will be built in `build/x64-Debug` or `build/x64-Release` instead.
- This plugin is very unstable! Don't forget to save your work often.
Copy link
Author

Choose a reason for hiding this comment

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

  • Debugging: I'm sure that there is a bug that causes DAW to crash.

.github/workflows/build.yml Outdated Show resolved Hide resolved
#define DISTRHO_PLUGIN_WANT_FULL_STATE 1
#define DISTRHO_UI_DEFAULT_WIDTH 1024
#define DISTRHO_UI_DEFAULT_HEIGHT 256
#define DISTRHO_UI_FILE_BROWSER 1
Copy link
Author

Choose a reason for hiding this comment

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

  • A button to download internal ustx file:

For an escape hatch.

await UpdateUstx();
await UpdateTracks();
});
sendAudioDebounce.Do(TimeSpan.FromSeconds(5), async () => {
Copy link
Author

Choose a reason for hiding this comment

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

  • The interval:

I thought that creating hash for every audio causes high CPU usage, so I debounced to 5 seconds.
Should this be configurable?

/// OpenUtau to DAW notification.
/// Does not require a response.
/// </summary>
public abstract class DawDawNotification : DawMessage {
Copy link
Author

Choose a reason for hiding this comment

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

  • Naming:

I'm pretty sure that there is better naming than this

@@ -241,7 +242,8 @@ public void OnNext(UCommand cmd, bool isUndo) {
DocManager.Inst.ExecuteCmd(new SetPlayPosTickNotification(0));
}
if (cmd is PreRenderNotification || cmd is LoadProjectNotification) {
if (Util.Preferences.Default.PreRender) {
// Always prerender when it's connected to daw
Copy link
Author

Choose a reason for hiding this comment

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

  • Is using prerendering ok?:

The daw integration uses pre-render audios, but I don't know if there is something that prerender misses.

@@ -546,6 +548,18 @@ General
<system:String x:Key="tracks.trackcolor">Change track color</system:String>
<system:String x:Key="tracks.tracksettings">Track Settings</system:String>

<system:String x:Key="dawintegrationterminal.captions">Connect to DAW</system:String>
<system:String x:Key="dawintegrationterminal.description">Download Plugin, show UI and connect (temporary text)</system:String>
Copy link
Author

Choose a reason for hiding this comment

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

  • Description:

I don't have a good word that explains about connecting.


void OnDownloadClick(object sender, RoutedEventArgs args) {
try {
OS.OpenWeb("https://example.com");
Copy link
Author

Choose a reason for hiding this comment

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

  • Downloads:

Where should the "download" button link to? A release page?

@sevenc-nanashi sevenc-nanashi changed the title WIP: Add DAW Integration Add DAW Integration Sep 25, 2024
@sevenc-nanashi sevenc-nanashi marked this pull request as ready for review September 25, 2024 22:16
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.

1 participant