TotalKeyMix: Windows volume control for RME TotalMix

Post your working scripts, libraries and tools for AHK v1.1 and older
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

22 Jul 2022, 09:25

What's your screen resolution, it may have to do with the IP and slider problems.

In config.ini, you can also set Autopos to 0, and set the position manually. But I'd like to fix Autopos.
axibert
Posts: 24
Joined: 15 Jan 2020, 13:03

Re: TotalKeyMix: Windows volume control for RME TotalMix

22 Jul 2022, 10:29

3440×1440 and yes I have alteady done that, all good for me
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

22 Jul 2022, 12:52

carlfriedrich,

I made a small modification to really enable multi-instances with different config files :

https://drive.google.com/file/d/1d4K47vMtE0TM_3HnozFB_l7fhYgaPHfQ/view?usp=sharing

Sorry, made a mistake : what I called Master should be called AN12, as Main out could be assigned to PH 3/4. Still, in that case /1/volume1 would control AN 1/2 and not Main Out
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 00:07

BuggyB wrote:
21 Jul 2022, 17:58
with several of the latest versions of TKM, maybe since I updated AHK to 1.1.34.03, I sometimes get the volume slider replaced by another one right in the middle of the scren and with a title bar and the name of the exe as a title. It seems totally random, no any idea why.
when this happens, some other window (my editor or some other) gets activated. I think the culprit might be the lines I commented out below. I'm testing like that now and so far, so good.

Code: Select all

vol_ShowBars:
CCIntValOSD := (CCIntVal/VolumeMaxVal)*100
IfWinNotExist, %ConfigFile%		; To prevent the "flashing" effect, only create the bar window if it doesn't already exist.
{
	Progress, %vol_BarOptions%, , , %ConfigFile%
}
Progress, 1:%CCIntValOSD%		; Get volume %.
/*
IfWinNotActive, %ConfigFile%
{
	WinActivate, %ConfigFile%
}
*/
SetTimer, vol_BarOff, %vol_DisplayTime%
return
axibert
Posts: 24
Joined: 15 Jan 2020, 13:03

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 06:46

Today this problem appeared:
Attachments
Unbenannt.JPG
Unbenannt.JPG (22.6 KiB) Viewed 2630 times
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 06:49

what's in config.ini? Any idea what lead to this, so I can try to reproduce it?
axibert
Posts: 24
Joined: 15 Jan 2020, 13:03

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 06:50

I have no idea how this is happening and what causes it. I have not made any changes from yesterday apart from rebooting. Restarting the app does not help as well.


config.ini

Code: Select all

[Hotkeys]
# The three hotkeys to be used for volume control. See the Autohotkey
# documentation for possible modifiers like Ctrl, Shift or Alt:
# https://www.autohotkey.com/docs/Hotkeys.htm
VolumeUpHotkey=Volume_Up
VolumeDownHotkey=Volume_Down
VolumeMuteHotkey=Volume_Mute

[OSC]
OSCPort=7001
TotalmixIP=192.168.2.112
OSC_address=/1/mastervolume

[Volume]
# This value is saved on exit in order to restore the volume on the next start
LastValue=0.450000
# Volume change on each key press
VolumeStep=0.025
# Maximum volume level (1 = max fader position, 0.8172043 = 0dB)
MaxValue=0.8172043

[Settings]
# Set to 1 to hide the tray icon
HideTrayIcon=0

[OSD]
# Time in ms for which the volume slider stays visible
DisplayTime=2000
# Colors of the volume slider as hex value or AHK color name
Color=Lime
BackgroundColor=666B75
# BackgroundColor=212b32
# Size of the volume slider in pixels
Width=400
# Position of the volume slider in pixels
Height=20
PosX=50
PosY=30

# if AutoPos=1, the 3 previous values are ignored and the
# volume slider is positionned on the right hand side of the  menu bar of a maximized window
AutoPos=0

[Mod edit: Added .ini-format codebox tags]
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 08:12

can the app change the volume though?
axibert
Posts: 24
Joined: 15 Jan 2020, 13:03

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 08:36

No, right now it does nothing.
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 11:59

One more thing :
1. OSC2AHK.dll runs only on x64
2. I had a x64 computer where the DLL wouldn't load. I fixed it by installing Visual C++ Redistributable : https://docs.microsoft.com/fr-FR/cpp/windows/latest-supported-vc-redist?view=msvc-170
axibert
Posts: 24
Joined: 15 Jan 2020, 13:03

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 12:33

Ok, I think I know why it happened. I have still been using the autostart method from the old app via task planner. Now that I rebooted again without it and started TKM manually, it is working again. So, somehow this probably was the cause for the error.
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

23 Jul 2022, 13:52

It seems there is a bug in Class_IPAddress_Control.ahk, as reported by axibert. With a 1920x1200 screen resolution, or 1920x1440, it works fine. With a higher resolution, 3440×1440 or 2560x1440, the entry field's position is wrong. The thread for that class is in the archived forum, I'm not sure it can be fixed.
User avatar
carlfriedrich
Posts: 11
Joined: 13 Jul 2022, 08:43
Contact:

Re: TotalKeyMix: Windows volume control for RME TotalMix

25 Jul 2022, 07:52

Hey @BuggyB, thanks a lot for your OSC implementation. I have refactored your code on GitHub and removed the DLL depencency, implementing the OSC communication using Sockets directly in AHK. Can you test this? And @axibert you too?

https://github.com/carlfriedrich/TotalKeyMix/archive/refs/heads/switch-to-osc.zip

If it works in your environment as well, I will release this as version 1.6.0.
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

25 Jul 2022, 15:11

Hello carlfriedrich,
I tested it on mastervolume and headphone, changed the hotkeys in setup, everything runs very well ! Thank you.

(I don't get topic notifications)
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

25 Jul 2022, 15:29

Oops, I cannot enter a letter in setup / address entry field, only numbers are allowed
User avatar
carlfriedrich
Posts: 11
Joined: 13 Jul 2022, 08:43
Contact:

Re: TotalKeyMix: Windows volume control for RME TotalMix

26 Jul 2022, 02:30

@BuggyB Good catch, thanks! I have fixed that:

https://github.com/carlfriedrich/TotalKeyMix/archive/refs/heads/switch-to-osc.zip

I will update the documentation in the next days and then prepare release 1.6.0.

Thanks @axibert for testing as well.
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

26 Jul 2022, 04:02

Hi carlfriedrich,
I'm curious as to what it brings to get rid of the DLL. Do you expect the script to be faster?
User avatar
carlfriedrich
Posts: 11
Joined: 13 Jul 2022, 08:43
Contact:

Re: TotalKeyMix: Windows volume control for RME TotalMix

26 Jul 2022, 04:39

There's two reasons:

1. A DLL imposes a platform dependency. As you said yourself, the DLL runs on x64 only. RME's TotalMix software is still maintained for x86 as well, so even if we can consider this a legacy platform, we would actually exclude these users. And since Apple switched to ARM CPUs I assume we can expect that RME will have to support ARM platforms in the future as well. Removing the DLL makes TotalKeyMix platform-independent and hence future-proof.
2. A DLL also imposes a functional dependency. If we encounter issues which can be tracked down to the OSC communication, there would be no way to fix it in TotalKeyMix. We would have to rely on the DLL being fixed. Removing the DLL keeps the code and the functionality under our control.

TotalKeyMix has been an AHK project from the beginning and I would like to keep it a pure AHK project, without any external dependencies.
BuggyB
Posts: 44
Joined: 25 Mar 2019, 17:59

Re: TotalKeyMix: Windows volume control for RME TotalMix

26 Jul 2022, 06:13

Makes total sense, thanks for the explanation :)

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 268 guests