Myuuiii / DAWPresence

A Discord Rich Presence app for several DAWs like FL Studio and Ableton
GNU General Public License v3.0
43 stars 3 forks source link

Rich Presence for Steinberg Nuendo and Steinberg Cubase #5

Open mrtajniak opened 1 year ago

mrtajniak commented 1 year ago

I would love to see Nuendo and Cubase with RPC

Myuuiii commented 1 year ago

Hi there!

I'll take a look at it in a little! Thank you for the idea!

mrtajniak commented 1 year ago

If you need anything else from me, let me know

Myuuiii commented 1 year ago

Hi there, I'm back now. There'll be a few things I might need from you if you own these softwares.

First of all I'll need the Process Name, this is the name of the DAW as it can be seen in Task Manager (on Windows). You can open Task Manager by pressing ctrl+shift+esc and then under the tab "Processes" find the DAW. It will look something like this, although this is an IDE and your DAW might have other subprocesses. image

Then I'd need the window title, which can be found in the same overview, so if possible I'd like for you to send a screenshot of the DAW's entry in Task Manager. This then for when you have a project open, and when you don't have a project open / blank project.

I'll handle stuff from there!

mrtajniak commented 1 year ago

When project is Open image

When project is closed image

Window title when project is open "Nuendo Project - [Project Name] Windows title when project is closed "Nuendo"

Myuuiii commented 1 year ago

Thank you so much!

I'll get to work right away!

Myuuiii commented 1 year ago

image

Got something to work right now but this is specifically for Version 12 of Nuendo. I'll be making more changes so it also detects other versions.

EDIT: Uploaded a quick test as a release (file too large to be sent as a comment attachment) You can download it here to see if it works. Let me know what you find!

mrtajniak commented 1 year ago

image Unfortunately, It doesn't detect DAW

Myuuiii commented 1 year ago

Hmm, that seems a bit weird, I'll take a look in a second

mrtajniak commented 1 year ago

image

Myuuiii commented 1 year ago

I'll continue working on this tomorrow, I'll keep you up to date

mrtajniak commented 1 year ago

Yeah no problem

Myuuiii commented 1 year ago

Added another quick test, probably not a fix but worth a shot Release

mrtajniak commented 1 year ago

I will be back home in like 4-5h 😜

Myuuiii commented 1 year ago

Haha no worries, take your time!

mrtajniak commented 1 year ago

I am testing this release right now

mrtajniak commented 1 year ago

Added another quick test, probably not a fix but worth a shot Release

Still "No DAW is running"

mrtajniak commented 1 year ago

Can I give you something that will tell the software more precisely the program that has to be picked up by it

Myuuiii commented 1 year ago

mhm mhm sure, Sorry I've been quite busy lately

mrtajniak commented 8 months ago

1 year after and we now have Nuendo 13 🙈

No06LuSec commented 8 months ago

Nuendo 13 and Cubase 13 (。_。)

No06LuSec commented 8 months ago

I'm not sure how Nuendo works because I don't use it so I can only talk about Cubase.

  1. First, when running Cubase, we will run the executable file Cubase[version].exe [ mine is version 13 -> Cubase13.exe ].

  2. After you Create Template (empty)

  3. After I researched, I was able to determine that msedgewebview2.exe is only used to get data for the News table. I was turned off the show News option in settings, in process it only running Cubase13.exe and we got this : https://imgur.com/a/B6Ps7Ah

  4. Next, I run Create Empty again and it will reopen an empty project window like : https://imgur.com/a/nD22hq8

I think creating an ID for Cubase or versions of Cubase is probably more feasible than Nuendo(because it seems to run too many programs at once). ヾ(•ω•`)o

Myuuiii commented 8 months ago

Ooh thank you for that information, I will test around with it and post a beta release soon!

Myuuiii commented 8 months ago

Alright I've created a testing release for Cubase, it can be found here Let me know if it detects cubase and displays a project once it is open.

Please note that it won't detect Cubase if you are in the Cubase Hub. If this works I can add support for that too

No06LuSec commented 8 months ago

Ok, I ran the beta test and to my surprise it identified Cubase Hud 👍 While in the Hud window, the RPC identified user is not in any project ✔

image image
__ When you open an empty project, it will say Untitled as usual. Besides when I 'Save as TESTING', it will immediately update on Discord : image image image

Myuuiii commented 8 months ago

Ayyy nice that's looking good, I do see I removed a clearing line so I will fix that real quick, I'm glad to see that it works!

No06LuSec commented 8 months ago

Because Hud Cubase work so when quit project it will not reset time total on Discord RPC

Myuuiii commented 8 months ago

Do you want the time to reset when you go back to the Hub?

No06LuSec commented 8 months ago

if so possible it should be option if people like it :3 but for me it fine not so important 👍

Myuuiii commented 8 months ago

Alrighty, I'll add it to the backlog as an extra option! ヾ(•ω•`)o

Myuuiii commented 8 months ago

It has been created under #13 I will work on it when I find the time to do so!

No06LuSec commented 8 months ago

Okiii (●'◡'●), Just take your time when it's convenient :3

No06LuSec commented 8 months ago

I just discovered something strange: RPC will confirm that we are not working on a Project if we hover over the Options bar. ÓwÒ) hmmmm that kinda weird

Myuuiii commented 8 months ago

hmm that's a bit weird, Its possibly because the process' window name changes when you hover over certain options. I will look into that!

No06LuSec commented 8 months ago

image

Myuuiii commented 8 months ago

I see, it will be a bit difficult to maybe differentiate this state from the one where you aren't working on a project. Because when the project is blank, we assume you are not working on a project, but the same state is shared with when you are hovering over a menu item. I will try to think of a fix and implement it as soon as possible!

No06LuSec commented 8 months ago

I was confirm that the window name does not change whether in the project window or in the process list ÓwÒ . (if it take to much your time, you just can leave it ÓwÒ )

Myuuiii commented 8 months ago

Aah I see, hmm I might have to do some more research then. Thank you for the information, I will move it to the backlog as an issue and look into it later!

No06LuSec commented 8 months ago

Regarding the validation that RPC is doing it is focusing on the project window, it is determined through focus, meaning if we open project 2 while running project 1, selecting the project window will change name on RPC

No06LuSec commented 8 months ago

image

Myuuiii commented 8 months ago

that's the intentional workings, because the focused project is probably the one you are actively working on. I can also change that to only detect the first window and not change depending on focus

No06LuSec commented 8 months ago

(>w<)👍 I just wanted to provide information if it might be helpful to you. But defining the project like above seems quite good, especially when having to run Cubase in the studio ( running multiple projects at once >5 ).

Myuuiii commented 8 months ago

Ultimate multi-tasker! Maybe I can add a menu so you can manually update it, so you select the window you want, and then go into the app and say "persist selected window" or something!

No06LuSec commented 8 months ago

(👍≧ w ≦)👍 it sound amazinggg~

ferdmusic commented 1 month ago

Hey, I just looked at this and tried to modify it for Nuendo 13. It seems like it has gotten way easier now! The code would be:

using System.Diagnostics;
using static System.Diagnostics.Process;

namespace DAWPresence.DAWs;

public partial class SteinbergNuendo : Daw
{
    public SteinbergNuendo()
    {
        ProcessName = "Nuendo13";
        DisplayName = "Nuendo 13";
        ImageKey = "nuendo";
        ApplicationId = "1072197265587974144";
        WindowTrim = " - ";
    }

    public override string GetProjectNameFromProcessWindow()
    {
        Process? process = GetProcess();
        if (process is null) return "";
        string title = process.MainWindowTitle;

        int trimIndex = title.IndexOf(WindowTrim);
        if (trimIndex != -1)
        {
            int titleOffset = trimIndex + WindowTrim.Length;
            return title[titleOffset..];
        }
        return "";
    }

    protected override Process GetProcess() => GetProcesses().First(x => x.ProcessName.StartsWith(ProcessName));
}

The Application ID is not real

ferdmusic commented 1 month ago

I'll try to create a pull request for the newest version since I have been doing it with an old release out of this thread

Myuuiii commented 1 month ago

Thank you for your work! I will merge the code and publish a new version shortly!