Code Monkey home page Code Monkey logo

keyasio.net's Introduction

KeyASIO.Net

External ASIO/WASAPI_EXCLUSIVE backend for low-latency and safe osu! audio playback experience.

While osu's original audio system has a latency for about 40 ms, this program can provide extremely low latency to as low as 0.6ms (Verified by EmertxE, determine by your devices, from tapping to hearing), and for most players the latency can be lower than about 8-15ms (with no professional soundcard, from tapping to hearing).

Introduction

We have been waiting for the very near future for several years, but it looks like that the dev team has been stopped supporting such heavy development for legacy osu. So there are many nice external community audio tools before like REAL, osu-External-ASIO-Sound, AsioHookForOsu, etc. But:

  • Even with REAL, the osu's playback latency is still about 25ms. Anyway this is the easiest way to gain such improvement.
  • Tools like osu-External-ASIO-Sound or AsioHookForOsu gives ASIO support, but they have some inevitable problems: 1. Inject and hook which is unsafe for your account. 2. Not perfect for custom hitsound support.

This project born to resolve these problems. As default, this program enables RealtimeMode in the configuration, which will use OsuRTDataProvider to read osu's memory without modifying. The OsuRTDataProvider is commonly used for broadcasting tools (like RTPP Displayer), and it looks safe because it was approved by peppy. But nothing will be guaranteed, so I should still say please do at your own risk.

Benifits of KeyASIO.Net

  1. Support extremely low-latency playback around 0.6ms (determine by your devices, from tapping to hearing).
  2. Fully support for playing beatmap's custom hitsound including storyboard samples, and hitsound customization like: User skin, Ignore custom hitsound, Ignore samples, Ignore volumes, Ignore slidertails, etc.
  3. Optimize mania as per-key sound, just like behaviors in the game.
  4. Safe for your account, but no guarantee.
  5. A easy-to-use user interface.

Screenshots


Overview


Realtime options

Configuration

The KeyASIO.Net supports FullMode (EnableMusicFunctions in configuration), which can also synchronize the music, that will completely replace osu's sounds. This will make you much easier to start, but it has irresolvable problems. For players who has only one soundcard, you can try the fullmode. Otherwise, I only suggest with this option off.

Without standalone soundcard

FullMode ENABLED

Prerequisites

  1. Change the device in the software GUI, select ASIO4ALL or your default WASAPI device with exclusive, and confirm.
  2. If the ASIO4ALL is selected, open ASIO control panel and select your output device with others deselected. Press Advanced Options and adjust the options to lower the latency (Check latency at the software GUI)
  3. Check your osu game to test whether the game has lags or problems to play. If yes, select the game's output to VB-CABLE Input

This is because of whether the same audio device in game settings is used exclusively in other applications. In case of exclusive using, the osu game's time synchronization may stuck while game playing, so the hitbox check will always fail.

  1. (Optional for livestream) Select the game's output to VB-CABLE Input, and add the VB-CABLE Output as second audio output device in your livestream software.
  2. Enjoy

FullMode DISABLED

Prerequisites

  • Make sure you have at least 2 audio output devices (including HDMI Audio). An HDMI decoder with audio port is required if your monitor doesn't have audio port.
  • A standalone mixer. Low-end device is just ok, since they are always very cheap. DO NOT USE WINDOWS MIXER SOFTWARES, since they will only increase the latency.
  • Install ASIO4ALL / Just use WASAPI_EXCLUSIVE
  1. Use HDMI output to display monitor or HDMI decoder, and line-out to the mixer. Line-out your motherboard soundcard to the mixer. Plug your headphone into the mixer.
  2. Change the device in the software GUI, select ASIO4ALL and confirm.
  3. Open the ASIO4ALL control panel, and select something like HDMI Out with others deselected. Press Advanced Options and adjust the options to lower the latency (Check latency at the software GUI)
  4. Select your motherboard device in osu game. Please do not select the same device as ASIO4ALL. It doesn't work.
  5. Change your own key bindings in the software GUI.
  6. Set the effect volume to 0 in osu!.
  7. Open offset wizard, play with Auto mod and adjust the software's offset and osu!'s offset.
  8. Enjoy

With standalone soundcard

FullMode ENABLED

Prerequisites

  1. Change the device in the software GUI, select your standalone soundcard, and confirm.
  2. Check your osu game to test whether the game has lags or problems to play. If yes, select the game's output to VB-CABLE Input

This is because of whether the same audio device in game settings is used exclusively in other applications. In case of exclusive using, the osu game's time synchronization may stuck while game playing, so the hitbox check will always fail.

  1. (Optional for livestream) Select the game's output to VB-CABLE Input, and add the VB-CABLE Output as second audio output device in your livestream software.
  2. Enjoy

FullMode DISABLED

Prerequisites

  • Check if your soundcard has original ASIO driver. If no, install ASIO4ALL / just use WASAPI_EXCLUSIVE
  • If your soundcard driver doesn't support ASIO concurrency, a standalone mixer is needed. Low-end device is just ok, since they are always very cheap. DO NOT USE WINDOWS MIXER SOFTWARES, since they will only increase the latency.
  1. Change the device in the software GUI, and select your ASIO Device.
  2. Change options in your ASIO control panel to lower the latency (Check latency at the software GUI).
  3. If you use mixer, line-out your motherboard soundcard and soundcard to the mixer. Plug your headphone into the mixer.
  4. Select the fit device in osu game. Select motherboard if you use mixer, select your soundcard otherwise.
  5. Change your own key bindings in the software GUI.
  6. Set the effect volume to 0 in osu!.
  7. Open offset wizard, play with Auto mod and adjust the software's offset and osu!'s offset.
  8. Enjoy

Full options in appsettings.yaml: (Modify after program closed)

Item Description
Debugging Show debug logs.
Device Device configuration (Recommend to configure in GUI).
HitsoundPath Default hitsound path (relative or absolute) for playing.
Keys Triggering keys. See https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-6.0 for more inforamtion.
RealtimeMode If true, the software will enable memory scanning and play the right hitsounds of beatmaps.
RealtimeMode.AudioOffset The offset when RealtimeMode is true (allow adjusting in GUI).
RealtimeMode.BalanceFactor Balance factor.
RealtimeMode.IgnoreBeatmapHitsound Ignore beatmap's hitsound and force using user skin instead.
RealtimeMode.IgnoreComboBreak Ignore combo break sound.
RealtimeMode.IgnoreSliderTicksAndSlides Ignore slider's ticks and slides.
RealtimeMode.IgnoreStoryboardSamples Ignore beatmap's storyboard samples.
RealtimeMode.SliderTailPlaybackBehavior Slider tail's playback behavior. Normal: Force to play slider tail's sounds; KeepReverse: Play only if a slider with multiple reverses; Ignore: Ignore slider tail's sounds.
SampleRate Device's sample rate (allow adjusting in GUI).
SkinFolder The skin folder when RealtimeMode is true.
VolumeEnabled Software volume control. Disable for extremely low latency when RealtimeMode is false
Volume Configured device volume.

FAQs

Why my auto behaves like a fool?

This is because of whether the same audio device in game settings is used exclusively in other applications (like KeyASIO). In case of exclusive using, the osu game's time synchronization may stuck while game playing, so the hitbox checking will always fail.

Why only sliderend sounds for auto mod?

Currently it's a software limit, please open offset guide by clicking Offset... button first before playing with auto.

How to report bugs?

If you're sure it's a bug and have steps to reproduce, please open Github issue. For any other problems please reply in the forum page or Github's discussion page.

Todo

  • Sometimes the hit is muted. (headache thing)
  • The music time synchronization is different from osu.

keyasio.net's People

Contributors

milkitic avatar mother-ship avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

keyasio.net's Issues

KeyASIO keep crashing

after little amount of time, program keep crash, due to i use this program for sound system, when i play map there is no sound.

image
image

Setting mouse buttons as triggering keys won't take effect

The Z key and X key works fine. When I try setting mouse keys as triggering key by modifying appsetting.yaml referring to Keys Enum, it doesn't work.

# Triggering keys. See https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-6.0 for more inforamtion.
Keys:
- LButton
- RButton

no hitsounds if pressed key overlaps

my setup:
I am using "," and "." for left and right click, have alternating playstyle.

I noticed that if I keep holding the first key while press other key to hit next object there's very high chance that no hitsound will be played.
Doing further investigation I found out that if the previous object is a "note", doing what I described will resolve to no hitsound.

sound issues

after updating to the lastest version, a lot of the sound is like distorted or similar, it sounds like bad quality but it's the same files. so for now i will use the 2nd lastest version

"KeyASIO 3.0.0" doesn't seem to work properly in "Atlas OS"

I installed "Atlas 20H2" from this site https://atlasos.net/downloads, to run "Osu!" in a relatively pure "Windows" environment.

However, when I tried to play beatmaps in "Osu!", some notes were muted without correct hitsounds, which were supposed to be provided by "KeyASIO" (and the lag of hitsound is somehow weird as far as my sense of playing is concerned).

According to the log:

02:36:16.120 DEBUG STA Window: Z KeyDown
02:36:16.120 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:36:16.120 DEBUG StandardAudioProvider: Click: 51339; First node: 51321
02:36:16.120 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.023ms
02:36:16.120 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.032812502
02:36:16.391 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.140625
02:36:16.433 DEBUG STA Window: X KeyDown
02:36:16.433 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:36:16.433 DEBUG StandardAudioProvider: Click: 51652; First node: 51418
02:36:16.433 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.023ms
02:36:16.433 DEBUG RealtimeModeManager: Play soft-hitclap; Vol. 1; Bal. -0.1921875
02:36:16.433 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.1921875
02:36:16.686 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.1734375
02:36:17.504 DEBUG ORTDP: Mode Address (0):0x00000000
02:36:17.504 DEBUG ORTDP: Mode Address (1):0x00000000
02:36:17.504 ERROR ORTDP: [ID:0]Init ModeFinder Failed! Retry after 3 seconds

It seems that "KeyASIO" cannot fetch the correct Mode Address, even when playing is started. I've noticed that, standard "Windows" does not suffer from this problem and "KeyASIO" can find a proper Mode Address, such as:

22:18:53.169 DEBUG RealtimeModeManager: [InitFolder] executing
22:18:53.193 DEBUG RealtimeModeManager: [InitFolder] executed in 22.281ms
22:18:53.193 DEBUG RealtimeModeManager: [InitAudio] executing
22:18:53.210 DEBUG ORTDP: Playing Accuracy Base Address (0):0x62149FFC
22:18:53.210 DEBUG ORTDP: Playing Accuracy Base Address (1):0x8200652A
22:18:53.233 DEBUG ORTDP: Time Base Address (0):0x0F60AC9F
22:18:53.233 DEBUG ORTDP: Time Base Address (1):0x027A6AC8
22:18:53.233 INFO ORTDP: [ID:0]Init PlayFinder Success!
22:18:53.246 DEBUG ORTDP: Mode Address (0):0x02770C10
22:18:53.246 DEBUG ORTDP: Mode Address (1):0x027A6660
22:18:53.246 INFO ORTDP: [ID:0]Init ModeFinder Success!

Hope this problem can be solved.

Weird key jitters when using "KeyASIO 3.0.0" in official "Windows Home 22H2"

I installed the official "Windows Home 22H2" as a second system w.r.t. my original one, which seems to be the factory system of "Lenovo Legion Y9000X 2021" (this system has been too bloated to run "Osu!" smoothly, and that's why I decided to install a relatively clean system).

Although everything about "KeyASIO 3.0.0" works well in my original system, unexpected jitters of keyboard inputs are observed (via the logging file, as shown below) in the newly installed system.

02:20:34.618 DEBUG STA Window: Z KeyDown
02:20:34.618 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:20:34.618 DEBUG StandardAudioProvider: Click: 589; First node: 175
02:20:34.618 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.332ms
02:20:34.618 DEBUG RealtimeModeManager: Play normal-hitnormal; Vol. 1; Bal. -0.22265626
02:20:34.829 DEBUG STA Window: X KeyDown
02:20:34.829 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:20:34.829 DEBUG StandardAudioProvider: Click: 800; First node: 831
02:20:34.829 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.030ms
02:20:34.829 DEBUG RealtimeModeManager: Play soft-hitwhistle; Vol. 1; Bal. -0.22265626
02:20:34.829 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.22265626
02:20:35.078 DEBUG RealtimeModeManager: Play normal-hitnormal; Vol. 1; Bal. -0.19101563

# The following "X KeyDown" is unexpected and seems to a jitter, as I am an "alternate" player and I'm sure it is not my mis-tap
02:20:35.484 DEBUG STA Window: X KeyDown
02:20:35.484 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:20:35.484 DEBUG StandardAudioProvider: Click: 1454; First node: 1268
02:20:35.484 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.056ms
02:20:35.484 DEBUG RealtimeModeManager: Play normal-hitwhistle; Vol. 1; Bal. -0.124218754
02:20:35.484 DEBUG RealtimeModeManager: Play normal-hitnormal; Vol. 1; Bal. -0.124218754
02:20:35.501 INFO RealtimeModeManager: Cached music: E:\Osu\Songs\1808105 WORLD ORDER - HAVE A NICE DAY\audio.mp3
02:20:35.736 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.032812502
02:20:35.952 DEBUG RealtimeModeManager: Play normal-hitnormal; Vol. 1; Bal. -0.124218754

02:20:36.137 DEBUG STA Window: Z KeyDown
02:20:36.137 DEBUG StandardAudioProvider: [GetSoundOnClick] executing
02:20:36.137 DEBUG StandardAudioProvider: Click: 2107; First node: 2145
02:20:36.137 DEBUG StandardAudioProvider: [GetSoundOnClick] executed in 0.033ms
02:20:36.137 DEBUG RealtimeModeManager: Play soft-hitwhistle; Vol. 1; Bal. -0.20859376
02:20:36.137 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.20859376
02:20:36.393 DEBUG RealtimeModeManager: Play normal-hitnormal; Vol. 1; Bal. -0.3
02:20:36.611 DEBUG RealtimeModeManager: Play soft-hitnormal; Vol. 1; Bal. -0.20859376

I've installed all system update patches in the new system and all drivers from "Lenovo" official website are installed. It is really weird for me that "KeyASIO" suffers from key jitters in the new system. I think it is possibly due to the logic of key triggering, such as LowLevelKeyboardProc or so? Such logic might require some system-sensitive or device-sensitive features, which should be combined with a clean "Windows". However, sadly, I'm totally a noob in these topics and I cannot find out the reason on my own.

Hope this problem can be solved.

Issues when running on Linux(wine)

HI. I was trying to use this software on wine, to see if it would work better than current community wine solutions.

Even though we have our own methods for low latency audio playback (like reverting winepulse and patching it, using pipewire), I wanted to potentially explore this software as well. Unfortunately, the software is having issues playing audio at all. Sometimes if you fiddle enough, it would play something. But most of the time it's only the beatmap mp3 and not hitsounds.

Testing environment:
Arch Linux (but could use any distribution, I think.)
Wine staging 7.14 (I am personally faulting this, because staging has file access speed issues)
64 bit prefix, but only 32 bit version of the program launches.
wineasio installed on the prefix
$ winetricks -q -f dotnet48

log (if needed: https://gist.github.com/KatouMegumi-osu/17d92d00b88a3ff3a2aefb44e13d8de5

希望能够选择是否只使用default音效

在使用ORTDP的keyasio时,即使我勾选了忽略谱面音效,keyasio依旧会播放谱面音效而不是default的音效。在 某些地图中 会变的十分恼人。
是否能加一个选项,只使用default的音效,而不是优先选用谱面音效呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.