Minor improvements to README.md
Browse files
README.md
CHANGED
@@ -94,10 +94,10 @@ def generate(self, z_sample: tf.Tensor=None) -> tf.Tensor:
|
|
94 |
Decode a latent representation of a song.
|
95 |
|
96 |
Parameters:
|
97 |
-
*
|
98 |
|
99 |
Returns:
|
100 |
-
* tf.Tensor
|
101 |
|
102 |
## **_audio_**
|
103 |
|
@@ -110,10 +110,10 @@ Convert midi file to "song map" (dataframe where each note is broken
|
|
110 |
into its components)
|
111 |
|
112 |
Parameters:
|
113 |
-
* midi_file (str)
|
114 |
|
115 |
Returns:
|
116 |
-
* pd.
|
117 |
|
118 |
### display_audio
|
119 |
|
@@ -123,11 +123,11 @@ def display_audio(pm: pretty_midi.PrettyMIDI, seconds=-1) -> display.Audio:
|
|
123 |
Display a song in PrettyMIDI format as a display.Audio object. This method is especially useful in a Jupyter notebook.
|
124 |
|
125 |
Parameters
|
126 |
-
* pm (pretty_midi.PrettyMIDI)
|
127 |
-
* seconds (int)
|
128 |
|
129 |
Returns:
|
130 |
-
* display.Audio
|
131 |
|
132 |
### map_to_wav
|
133 |
|
@@ -138,12 +138,12 @@ Convert "song map" to midi file (reverse process with respect to
|
|
138 |
midi_to_notes) and (optionally) save it, generating a PrettyMidi object in the process.
|
139 |
|
140 |
Parameters:
|
141 |
-
* song_map (pd.DataFrame)
|
142 |
-
* out_file (str)
|
143 |
-
* velocity (int)
|
144 |
|
145 |
Returns:
|
146 |
-
* pretty_midi.PrettyMIDI
|
147 |
|
148 |
### generate_and_display
|
149 |
|
@@ -157,11 +157,11 @@ def generate_and_display(model: VAE,
|
|
157 |
Generate a song, (optionally) save it and display it.
|
158 |
|
159 |
Parameters:
|
160 |
-
* model (VAE)
|
161 |
-
* out_file (str)
|
162 |
-
* z_sample (tf.Tensor)
|
163 |
-
* velocity (int)
|
164 |
-
* seconds (int)
|
165 |
|
166 |
Returns:
|
167 |
-
* display.Audio
|
|
|
94 |
Decode a latent representation of a song.
|
95 |
|
96 |
Parameters:
|
97 |
+
* ``z_sample (tf.Tensor)``: Song encoding outputed by the encoder. If None, this sampling is done over an unit Gaussian distribution.
|
98 |
|
99 |
Returns:
|
100 |
+
* ``tf.Tensor``: Song map corresponding to the encoding.
|
101 |
|
102 |
## **_audio_**
|
103 |
|
|
|
110 |
into its components)
|
111 |
|
112 |
Parameters:
|
113 |
+
* ``midi_file (str)``: Path to the midi file.
|
114 |
|
115 |
Returns:
|
116 |
+
* ``pd.DataFrame``: 3xN matrix where each column is a note, composed of pitch, duration and step.
|
117 |
|
118 |
### display_audio
|
119 |
|
|
|
123 |
Display a song in PrettyMIDI format as a display.Audio object. This method is especially useful in a Jupyter notebook.
|
124 |
|
125 |
Parameters
|
126 |
+
* ``pm (pretty_midi.PrettyMIDI)``: PrettyMIDI object containing a song.
|
127 |
+
* ``seconds (int)``: Time fraction of the song to be displayed. When set to -1, the full length is taken.
|
128 |
|
129 |
Returns:
|
130 |
+
* ``display.Audio``: Song as an object allowing for display.
|
131 |
|
132 |
### map_to_wav
|
133 |
|
|
|
138 |
midi_to_notes) and (optionally) save it, generating a PrettyMidi object in the process.
|
139 |
|
140 |
Parameters:
|
141 |
+
* ``song_map (pd.DataFrame)``: 3xN matrix where each column is a note, composed of pitch, duration and step.
|
142 |
+
* ``out_file (str)``: Path or file to write .mid file to. If None, no saving is done.
|
143 |
+
* ``velocity (int)``: Note loudness, i. e. the hardness a piano key is struck with.
|
144 |
|
145 |
Returns:
|
146 |
+
* ``pretty_midi.PrettyMIDI``: PrettyMIDI object containing the song's representation.
|
147 |
|
148 |
### generate_and_display
|
149 |
|
|
|
157 |
Generate a song, (optionally) save it and display it.
|
158 |
|
159 |
Parameters:
|
160 |
+
* ``model (VAE)``: Instance of VAE to generate the song with.
|
161 |
+
* ``out_file (str)``: Path or file to write .mid file to. If None, no saving is done.
|
162 |
+
* ``z_sample (tf.Tensor)``: Song encoding used to generate a song. If None, perform generate an unconditioned piece.
|
163 |
+
* ``velocity (int)``: Note loudness, i. e. the hardness a piano key is struck with.
|
164 |
+
* ``seconds (int)``: Time fraction of the song to be displayed. When set to -1, the full length is taken.
|
165 |
|
166 |
Returns:
|
167 |
+
* ``display.Audio``: Song as an object allowing for display.
|