andreasjansson
/
musicgen-choral-chord
- Public
- 25 runs
Run andreasjansson/musicgen-choral-chord with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
prompt |
string
|
A description of the music you want to generate.
|
|
text_chords |
string
|
A text based chord progression condition. Single uppercase alphabet character(eg. `C`) is considered as a major chord. Chord attributes like(`maj`, `min`, `dim`, `aug`, `min6`, `maj6`, `min7`, `minmaj7`, `maj7`, `7`, `dim7`, `hdim7`, `sus2` and `sus4`) can be added to the root alphabet character after `:`.(eg. `A:min7`) Each chord token splitted by `SPACE` is allocated to a single bar. If more than one chord must be allocated to a single bar, cluster the chords adding with `,` without any `SPACE`.(eg. `C,C:7 G, E:min A:min`) You must choose either only one of `audio_chords` below or `text_chords`.
|
|
bpm |
number
|
BPM condition for the generated output. `text_chords` will be processed based on this value. This will be appended at the end of `prompt`.
|
|
time_sig |
string
|
Time signature value for the generate output. `text_chords` will be processed based on this value. This will be appended at the end of `prompt`.
|
|
audio_chords |
string
|
An audio file that will condition the chord progression. You must choose only one among `audio_chords` or `text_chords` above.
|
|
audio_start |
integer
|
0
|
Start time of the audio file to use for chord conditioning.
|
audio_end |
integer
|
End time of the audio file to use for chord conditioning. If None, will default to the end of the audio clip.
|
|
duration |
integer
|
8
|
Duration of the generated audio in seconds.
|
continuation |
boolean
|
False
|
If `True`, generated music will continue from `audio_chords`. If chord conditioning, this is only possible when the chord condition is given with `text_chords`. If `False`, generated music will mimic `audio_chords`'s chord.
|
multi_band_diffusion |
boolean
|
False
|
If `True`, the EnCodec tokens will be decoded with MultiBand Diffusion.
|
normalization_strategy |
string
(enum)
|
loudness
Options: loudness, clip, peak, rms |
Strategy for normalizing audio.
|
chroma_coefficient |
number
|
1
Min: 0.5 Max: 2.5 |
Coefficient value multiplied to multi-hot chord chroma.
|
top_k |
integer
|
250
|
Reduces sampling to the k most likely tokens.
|
top_p |
number
|
0
|
Reduces sampling to tokens with cumulative probability of p. When set to `0` (default), top_k sampling is used.
|
temperature |
number
|
1
|
Controls the 'conservativeness' of the sampling process. Higher temperature means more diversity.
|
classifier_free_guidance |
integer
|
3
|
Increases the influence of inputs on the output. Higher values produce lower-varience outputs that adhere more closely to inputs.
|
output_format |
string
(enum)
|
wav
Options: wav, mp3 |
Output format for generated audio.
|
seed |
integer
|
Seed for random number generator. If `None` or `-1`, a random seed will be used.
|
{
"type": "object",
"title": "Input",
"properties": {
"bpm": {
"type": "number",
"title": "Bpm",
"x-order": 2,
"description": "BPM condition for the generated output. `text_chords` will be processed based on this value. This will be appended at the end of `prompt`."
},
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 17,
"description": "Seed for random number generator. If `None` or `-1`, a random seed will be used."
},
"top_k": {
"type": "integer",
"title": "Top K",
"default": 250,
"x-order": 12,
"description": "Reduces sampling to the k most likely tokens."
},
"top_p": {
"type": "number",
"title": "Top P",
"default": 0,
"x-order": 13,
"description": "Reduces sampling to tokens with cumulative probability of p. When set to `0` (default), top_k sampling is used."
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "A description of the music you want to generate."
},
"duration": {
"type": "integer",
"title": "Duration",
"default": 8,
"x-order": 7,
"description": "Duration of the generated audio in seconds."
},
"time_sig": {
"type": "string",
"title": "Time Sig",
"x-order": 3,
"description": "Time signature value for the generate output. `text_chords` will be processed based on this value. This will be appended at the end of `prompt`."
},
"audio_end": {
"type": "integer",
"title": "Audio End",
"minimum": 0,
"x-order": 6,
"description": "End time of the audio file to use for chord conditioning. If None, will default to the end of the audio clip."
},
"audio_start": {
"type": "integer",
"title": "Audio Start",
"default": 0,
"minimum": 0,
"x-order": 5,
"description": "Start time of the audio file to use for chord conditioning."
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 1,
"x-order": 14,
"description": "Controls the 'conservativeness' of the sampling process. Higher temperature means more diversity."
},
"text_chords": {
"type": "string",
"title": "Text Chords",
"x-order": 1,
"description": "A text based chord progression condition. Single uppercase alphabet character(eg. `C`) is considered as a major chord. Chord attributes like(`maj`, `min`, `dim`, `aug`, `min6`, `maj6`, `min7`, `minmaj7`, `maj7`, `7`, `dim7`, `hdim7`, `sus2` and `sus4`) can be added to the root alphabet character after `:`.(eg. `A:min7`) Each chord token splitted by `SPACE` is allocated to a single bar. If more than one chord must be allocated to a single bar, cluster the chords adding with `,` without any `SPACE`.(eg. `C,C:7 G, E:min A:min`) You must choose either only one of `audio_chords` below or `text_chords`."
},
"audio_chords": {
"type": "string",
"title": "Audio Chords",
"format": "uri",
"x-order": 4,
"description": "An audio file that will condition the chord progression. You must choose only one among `audio_chords` or `text_chords` above."
},
"continuation": {
"type": "boolean",
"title": "Continuation",
"default": false,
"x-order": 8,
"description": "If `True`, generated music will continue from `audio_chords`. If chord conditioning, this is only possible when the chord condition is given with `text_chords`. If `False`, generated music will mimic `audio_chords`'s chord."
},
"output_format": {
"enum": [
"wav",
"mp3"
],
"type": "string",
"title": "output_format",
"description": "Output format for generated audio.",
"default": "wav",
"x-order": 16
},
"chroma_coefficient": {
"type": "number",
"title": "Chroma Coefficient",
"default": 1,
"maximum": 2.5,
"minimum": 0.5,
"x-order": 11,
"description": "Coefficient value multiplied to multi-hot chord chroma."
},
"multi_band_diffusion": {
"type": "boolean",
"title": "Multi Band Diffusion",
"default": false,
"x-order": 9,
"description": "If `True`, the EnCodec tokens will be decoded with MultiBand Diffusion."
},
"normalization_strategy": {
"enum": [
"loudness",
"clip",
"peak",
"rms"
],
"type": "string",
"title": "normalization_strategy",
"description": "Strategy for normalizing audio.",
"default": "loudness",
"x-order": 10
},
"classifier_free_guidance": {
"type": "integer",
"title": "Classifier Free Guidance",
"default": 3,
"x-order": 15,
"description": "Increases the influence of inputs on the output. Higher values produce lower-varience outputs that adhere more closely to inputs."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output",
"format": "uri"
}