GithubHelp home page GithubHelp logo

fizban99 / vst_latency_test Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 6 KB

script to test the latency of a DAC/Audio Interface/Sound Card when using a midi keyboard with a vst instrument

License: MIT License

Python 100.00%

vst_latency_test's Introduction

vst_latency_test

This script tests the latency of a DAC/Audio Interface/Sound Card when using a midi keyboard with a vst instrument. VST or VSTI are virtual instruments that you can use with your digital keyboard connected to the computer. Although you can use ASIO4ALL and your internal sound card, it is recommended to use an external sound card/audio interface that supports ASIO natively. For a nice playing experience, the time between pressing a key and hearing a sound should be minimal. This is called latency and should be less than 20ms in order not to interfere with the playing, although some players prefer values of less than 10ms. The best tool to test audio interface latencies is the RTL Utility (https://oblique-audio.com/rtl-utility.php) from Oblique Audio, but that assumes that the audio interface has both an output and an input and shows the round-trip latency (output latency + input latency). Some people, though, use DACs or USB cards without an input line and it is difficult to know the latency of those devices in this case. This script helps measuring that value and allows comparing it with other devices you might have.

Installation

  1. You need python 3.x installed
  2. Download the vst_latency_test.py script and requirements.txt or clone the repository
  3. In the install directory run pip3 install -r requirements.txt
  4. Download and install loopMIDI (https://www.tobias-erichsen.de/software/loopmidi.html). This is used to create a virtual MIDI port to emulate an external keyboard.
  5. Start your VST of preference. See below for free and easy options.
  6. Configure the VST Host to play through the audio device you want to test. Preferrably using ASIO. Start with a 128 buffer size.
  7. Connect a cable from the output of the audio device you want to test to another input device (such as the computer's soundcard)
  8. Run the vst_latency_test script.
  9. Repeat with a 256 buffer size. One way to estimate the latency of a 128 buffer size is actually substracting the 128 buffer size latency from the 256 buffer size latency. Since the input latency is the same, and the output latency tends to double when doubling the buffer size, the difference is aproximately the output latency of a 128 buffer size.

Free VSTs

To play a virtual instrument you need the VST software and a host application that can communicate with it. One of the smallest hosts is nanoHost (https://www.tone2.com/nanohost.html). It is small, portable and free. Once you have the host, you can choose from a myriad of VSTs. If you like the sound of the piano, 4FrontPiano (http://www.yohng.com/software/piano.html) is a free small VST with a nice sound and low on computer resources. Another option is BassMidi VSTi from falcosoft (http://falcosoft.hu/softwares.html#bassmidi_vsti). This makes use of soundfonts. Some of the best free soundfonts can be found at Soundfonts4U (https://sites.google.com/site/soundfonts4u/)

vst_latency_test's People

Contributors

fizban99 avatar

Stargazers

 avatar

Watchers

 avatar

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.