Git Product home page Git Product logo

netmd-js's Introduction

JS library to access NetMD MiniDisc devices

This is a port to TypeScript of the linux-minidisc project.

It works either in node and every browser supporting the WebUSB standard.

How to Install CLI (netmdcli)

npm install netmd-js -g

How to build

npm install
npm run build

How to upload music

There's a minimal CLI called netmdcli that I've written for testing, but the primary purpose of this library is to serve the Web MiniDisc project.

If you want to upload music to your device using the cli keep in mind that it won't parse your audio file container, but it works only with raw audio data.

ffmpeg will do the trick of extracting the raw data from your audio files for SP uploads. If you want to use LP2 or LP4 you'll also need atracdenc.

SP
ffmpeg -i youraudiofile -f s16be rawaudiodata.raw  # outputs raw audio data suitable for SP uploads
LP2
ffmpeg -i youraudiofile -ar 44100 youraudiofile.wav # 44100 16bit wav input file suitable for atracdenc
atracdenc -e atrac3 -i youraudiofile.wav -o youraudiofile.oma --bitrate 128
dd bs=96 skip=1 if=youraudiofile.oma of=rawaudiodata.raw # removes OMA file header
LP4
ffmpeg -i youraudiofile -ar 44100 youraudiofile.wav # 44100 16bit wav input file suitable for atracdenc
atracdenc -e atrac3 -i youraudiofile.wav -o youraudiofile.oma --bitrate 64
dd bs=96 skip=1 if=youraudiofile.oma of=rawaudiodata.raw # removes OMA file header

Then just run

netmdcli upload rawaudiodata.raw -f sp|lp2|lp4

How Contribute

Every contribute is welcome but, please, reach out to me before opening any PR.

Acknowledgments

This library has been made possible by the amazing work done from the linux-minidisc project.

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.