MCPcopy Index your code
hub / github.com/cybercase/netmd-js

github.com/cybercase/netmd-js @v4.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.4.1 ↗ · + Follow
281 symbols 773 edges 20 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 142
Function 85
Class 26
Enum 19
Interface 9

Languages

TypeScript100%

Modules by API surface

src/netmd-interface.ts100 symbols
src/utils.ts36 symbols
src/factory/netmd-factory-interface.ts34 symbols
src/netmd.ts22 symbols
src/netmd-commands.ts22 symbols
src/netmd-ekb.ts17 symbols
src/factory/netmd-factory-commands.ts11 symbols
src/netmd-shared-objects.ts10 symbols
src/logger.ts10 symbols
src/cli.ts6 symbols
src/web-encrypt-worker.ts4 symbols
src/query-utils.ts4 symbols

For agents

$ claude mcp add netmd-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page