MusicVAE constructor.
Path to the checkpoint directory.
(Optional) MusicVAESpec object. If undefined, will be loaded
from a config.json file in the checkpoint directory.
Decodes the input latnet vectors into NoteSequences.
The latent vectors to decode, sized [batchSize, zSize].
(Optional) The softmax temperature to use when sampling. The argmax is used if not provided.
(Optional) Chord progression to use as conditioning.
The step resolution of the resulting
NoteSequence.
The decoded NoteSequences.
Disposes of any untracked Tensors to avoid GPU memory leaks.
Encodes the input NoteSequences into latent vectors.
An array of NoteSequences to encode.
(Optional) Chord progression to use as conditioning.
A Tensor containing the batch of latent vectors, sized
[inputSequences.length, zSize].
Loads variables from the checkpoint and instantiates the Encoder and
Decoder.
Interpolates between the input NoteSequences in latent space.
If 2 sequences are given, a single linear interpolation is computed,
with the first output sequence being a reconstruction of sequence A and
the final output being a reconstruction of sequence B, with
numInterps total sequences.
If 4 sequences are given, bilinear interpolation is used. The results
are returned in row-major order for a matrix with the following layout:
| A . . C |
| . . . . |
| . . . . |
| B . . D |
where the letters represent the reconstructions of the four inputs, in
alphabetical order, with the number of output columns and rows specified
by numInterps.
An array of 2 or 4 NoteSequences to interpolate
between.
The number of pairwise interpolation sequences to
return, including the reconstructions. If 4 inputs are given, this can be
either a single number specifying the side length of a square, or a
[columnCount, rowCount] array to specify a rectangle.
(Optional) The softmax temperature to use when sampling from the logits. Argmax is used if not provided.
(Optional) Chord progression to use as conditioning.
An array of interpolation NoteSequence objects, as described
above.
Returns true iff model is intialized.
Samples sequences from the model prior.
The number of samples to return.
The softmax temperature to use when sampling.
(Optional) Chord progression to use as conditioning.
The step resolution of the resulting
NoteSequences.
An array of sampled NoteSequence objects.
Generated using TypeDoc
Main MusicVAE model class.
A MusicVAE is a variational autoencoder made up of an
EncoderandDecoder, along with aDataConverterfor converting betweenTensorandNoteSequenceobjects for input and output.Exposes methods for interpolation and sampling of musical sequences.