Git Product home page Git Product logo

vban's Introduction

VBAN

NPM version CI codecov Downloads License Known Vulnerabilities vban GitHub stars Package Quality

Bugs Code Smells Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities

Dependencies update - renovate

NPM

Implementation of the VBAN protocol in node.js ( rev 9, oct 2021 )

https://www.vb-audio.com/Voicemeeter/VBANProtocol_Specifications.pdf

Install

npm i vban

Examples

// define your server, type, features, rates, a color, a name / username ... All are optionnal
const server = new VBANServer({
    application: {
        applicationName: 'VBAN Example',
        manufacturerName: 'Anonymous',
        applicationType: EServicePINGApplicationType.SERVER,
        features: [EServicePINGFeatures.AUDIO, EServicePINGFeatures.MIDI, EServicePINGFeatures.TXT, EServicePINGFeatures.SERIAL],
        bitFeatureEx: 0,
        PreferredRate: 0,
        minRate: 6000,
        maxRate: 705600,
        color: { blue: 74, green: 232, red: 57 },
        nVersion: 12345,
        GPSPosition: '',
        userPosition: '',
        langCode: 'fr-fr',
        deviceName: 'NodeJs Server',
        userName: '',
        userComment: ''
    }
});

//do something on error
server.on('error', (err) => {
    console.log(`server error:\n${err.stack}`);
    server.close();
});

server.on('message', (packet, sender) => {
    //here you can do the magic !
    //each packet is a VBAN Object parsed

    //We will send a text message each time we receive a packet (for example)
    //try to create a new TEXT packet
    const textPacket = new VBANTEXTPacket(
        {
            streamName: 'Command1', //the streamName waited by the other tool
            formatBit: EFormatBit.VBAN_DATATYPE_BYTE8, //the storage format, currently this is the only option available
            streamType: ETextEncoding.VBAN_TXT_UTF8 //we will send it in UTF8, most of VM Tools use UTF8
        },
        'test' // => the message we want to send (always in UTF8, if streamType is not UTF8, the library will convert)
    );

    //send it to 127.0.0.1 on port 6980
    server.send(textPacket, 6980, '127.0.0.1');
})

//listen on event when the server start listening, to log the port used
server.on('listening', () => {
    const address = server.address();
    console.log(`server listening ${address.address}:${address.port}`);
});

//start to listen on port 7000
server.bind(7000);

More Examples in the examples folder

Documentation

technical documentation is available here

Package Status

This package is a work in progress .

Functionalities in progress :

  • Convert UDP packet to objects
  • Convert Objects to UDP packet
  • Start a VBAN Server, with configuration, and auto SERVICE replies
  • Implements RT-Packet Service

Thanks to

This project is inspired by node-VBAN from Jacob Bower. He does the job for audio part, and the example .

And a big thanks to VB-Audio, for the VBAN protocol

Donations

If you want to do a donations, please do it on the VBAN creator website : https://vb-audio.com/Services/licensing.htm

vban's People

Contributors

dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar thib3113 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

vban's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update dependency @types/jest to v29.5.11
  • chore(deps): update dependency ts-jest to v29.1.2
  • chore(deps): update dependency typedoc to v0.25.7
  • chore(deps): update dependency @types/node to v20.11.10
  • chore(deps): update dependency dotenv to v16.4.1
  • chore(deps): update dependency eslint to v8.56.0
  • chore(deps): update dependency eslint-plugin-prettier to v5.1.3
  • chore(deps): update dependency prettier to v3.2.4
  • chore(deps): update typescript-eslint monorepo to v6.20.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore(deps): update codecov/codecov-action action to v4

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/CI.yml
  • actions/checkout v4
  • actions/setup-node v4
  • mattallty/jest-github-action v1
  • actions/upload-artifact v3
  • actions/checkout v4
  • actions/upload-artifact v3
  • actions/checkout v4
  • actions/download-artifact v3
  • codecov/codecov-action v3
  • actions/checkout v4
  • actions/download-artifact v3
.github/workflows/codeql-analysis.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/documentation.yml
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-gh-pages v3
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/setup-node v4
  • actions/upload-artifact v3
  • actions/checkout v4
  • actions/download-artifact v3
  • actions/setup-node v4
  • mattallty/jest-github-action v1
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @tsconfig/node14 14.1.0
  • @types/jest 29.5.10
  • @types/node 20.10.3
  • @typescript-eslint/eslint-plugin 6.14.0
  • @typescript-eslint/parser 6.14.0
  • dotenv 16.3.1
  • eslint 8.55.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-prettier 5.0.1
  • eslint-plugin-tsdoc 0.2.17
  • jest 29.7.0
  • jest-sonar 0.2.16
  • prettier 3.1.1
  • source-map-support 0.5.21
  • ts-jest 29.1.1
  • ts-node 10.9.2
  • typedoc 0.25.4
  • typescript 5.3.3

  • Check this box to trigger a request for Renovate to run again on this repository

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.