Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@magenta/music

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magenta/music - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

dist/deps.js

6

package.json
{
"name": "@magenta/music",
"version": "0.0.5",
"description": "",
"version": "0.0.6",
"description": "Make music in the browser with machine learning.",
"main": "es5/index.js",

@@ -10,3 +10,3 @@ "types": "es5/index.d.ts",

"dependencies": {
"@tensorflow/tfjs-core": "^0.8.4",
"@tensorflow/tfjs-core": "^0.8.5",
"midiconvert": "^0.4.4",

@@ -13,0 +13,0 @@ "protobufjs": "^6.8.6",

@@ -5,8 +5,13 @@ # MagentaMusic.js API

We have made an effort to port our most useful models, but please file an issue if you think something is
missing, or feel free to submit a Pull Request!
For the Python TensorFlow implementations, see the [main Magenta repo](https://github.com/tensorflow/magenta).
## Contents
* [Example Applcations](#example-applications)
* [Supported Models](#supported-models)
* [Getting Started](#getting-started)
* [Model Checkpoints](#model-checkpoints)
## Example Applications
Here are a few applications built with MagentaMusic.js:

@@ -19,3 +24,7 @@

## Available Models
## Supported Models
We have made an effort to port our most useful models, but please file an issue if you think something is
missing, or feel free to submit a Pull Request!
### MusicRNN

@@ -41,3 +50,3 @@ [MusicRNN](./music_rnn) implements Magenta's LSTM-based language models. These include [MelodyRNN][melody-rnn], [DrumsRNN][drums-rnn], [ImprovRNN][improv-rnn], and [PerformanceRNN][performance-rnn].

<!-- Load MagentaMusic.js -->
<script src="https://cdn.jsdelivr.net/npm/@magenta/music"> </script>
<script src="https://cdn.jsdelivr.net/npm/@magenta/music@0.0.6"> </script>

@@ -50,13 +59,9 @@ <!-- Place your code in the script tag below. You can also use an external .js file -->

'http://download.magenta.tensorflow.org/tfjs_checkpoints/music_vae/' +
'drums_2bar_hikl_small');
'trio_4bar_lokl_small_q1');
const player = new mm.Player();
model.initialize()
.then(() => model.sample(1))
.then((samples) => player.start(samples[0]));
model.sample(1).then((samples) => player.start(samples[0]));
</script>
</head>
<body>
</body>
<body></body>
</html>

@@ -66,5 +71,5 @@ ```

Open up that html file in your browser and the code should run. After a few seconds you'll
hear a drum beat that was randomly generated by MusicVAE!
hear a 4-bar trio that was randomly generated by MusicVAE!
See *TODO(adarob, teropa): INSERT DEMO LINK* for a complete example application with code.
See the [Neural Drum Machine](https://codepen.io/teropa/pen/RMGxOQ) by [@teropa](https://github.com/teropa) for a complete example application with code.

@@ -101,23 +106,12 @@ ### via NPM

## Pre-trained Checkpoints
## Model Checkpoints
Since MagentaMusic.js does not support training models, you must use weights from a model trained with the Python-based [Magenta models][magenta-models]. We are also making available our own hosted pre-trained checkpoints.
### Magenta-Hosted Checkpoints
Several pre-trained MusicRNN and MusicVAE checkpoints are hosted on GCS. You can access a JSON index available checkpoints at https://goo.gl/magenta/js-checkpoints.
The JSON is formatted as a list of entries with the the following interface:
Several pre-trained MusicRNN and MusicVAE checkpoints are hosted on GCS. The full list can is available in [this table](checkpoints/README.md#table) and can be accessed programmatically via a JSON index at https://goo.gl/magenta/js-checkpoints-json.
```ts
interface Checkpoint {
id: string; // A unique id for this checkpoint.
model: 'MusicRNN'|'MusicVAE'; // The model class.
description: string; // A short human-readable description of the trained model.
url: string; // Path to the checkpoint directory.
}
```
More information is available at https://goo.gl/magenta/js-checkpoints.
While we do not plan to remove any of the current checkpoints, we will be adding more in the future.
If your application has a high QPS, you must mirror these files on your own server.
### Your Own Checkpoints

@@ -124,0 +118,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc