muup-audio

MuUp Audio player

Play audio using a new script called MuUp, enabling you to type in music, and hear it played from your speakers.

MuUp

MuUp offers an easy and convenient way to (manually, for now) translate music to a string of text, capable of being analysed by software. By grouping notes together, it decreases the amount of text to be typed to represent the same piece of music.

Installation

To install the latest version of MuUp Audio Player, execute the following at the nearest prompt:

npm i muup-audio

Installing muup-audio (obviously) requires npm, learn how to here.

Getting started

To start using the audio converter, include in file as:

const muup = require('muup-audio')

How to convert

Simply pass the MuUp string to the playAudio() function to start the playing of the MuUp encoded music:

const status = muup.playAudio(muup-string)

To set the tempo of the audio, use the setBPM() function as:

muup.setBPM(bpm)

How to play on the browser

After the conversion file is ready, generate a client-side, browser-compatible JS file using Browserify like so:

npx browserify <file-name> > <bundled-file-name>

For example, if the conversion file was index.js, and the Browserify-ed file was to be bundle.js, the following would be executed:

npx browserify index.js > bundle.js

Include this bundled file in your webpage’s source code via a script tag and you’re done!

<script src="bundle.js"></script>