Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Conchylicultor/MusicGenerator
/ functions
Functions
185 in github.com/Conchylicultor/MusicGenerator
⨍
Functions
185
◇
Types & classes
43
↓ 13 callers
Method
register
Register a new module The only restriction is that the given class has to implement the static method get_module_id Args:
deepmusic/modulemanager.py:42
↓ 8 callers
Method
load
Restore the parameters from the configuration group Args: args (parse_args() returned Obj): the parameters of the models (will be
deepmusic/modulemanager.py:119
↓ 7 callers
Method
save
Save the current module parameters Args: config_group (dict): dictionary where to write the configuration
deepmusic/modulemanager.py:111
↓ 5 callers
Method
add_argparse
Add the module to the command line parser All modules have to be registered before that call Args: group_args (ArgumentPa
deepmusic/modulemanager.py:93
↓ 5 callers
Method
build_module
Instantiate the chosen module This function can be called only once when initializing the module Args: args (Obj): the gl
deepmusic/modulemanager.py:76
↓ 5 callers
Method
print
Just print the current module configuration We use the args parameters because the function is called before build_module Arg
deepmusic/modulemanager.py:128
↓ 3 callers
Method
__init__
(self)
deepmusic/modules/batchbuilder.py:32
↓ 3 callers
Method
_get_scale
Compute the unit scale factor for the song The scale factor allow to have a tempo independent time unit, to represent the song as an array
deepmusic/songstruct.py:106
↓ 3 callers
Method
get_input_type
()
deepmusic/imgconnector.py:62
↓ 3 callers
Method
normalize
Transform the song into a tempo independent song Warning: If the resolution of the song is is more fine that the given scale, some in
deepmusic/songstruct.py:119
↓ 3 callers
Method
step
Forward/training step operation. Does not perform run on itself but just return the operators to do so. Those have then to be run by the
deepmusic/model.py:261
↓ 2 callers
Method
__init__
Args: args: parameters of the model
deepmusic/modules/decoder.py:68
↓ 2 callers
Method
__init__
Args: args: parameters of the model
deepmusic/modules/encoder.py:97
↓ 2 callers
Method
_get_model_list
Return the list of the model files inside the model directory
deepmusic/composer.py:540
↓ 2 callers
Method
_get_model_name
Parse the argument to decide were to save/load the model This function is called at each checkpoint and the first time the model is load. If
deepmusic/composer.py:528
↓ 2 callers
Method
_restore_samples
Load samples from file Args: samples_path (str): The path where to load the model (all dirs should exist) Return:
deepmusic/musicdata.py:134
↓ 2 callers
Method
_save_samples
Save samples to file Args: samples_path (str): The path where to save the model (all dirs should exist)
deepmusic/musicdata.py:152
↓ 2 callers
Method
_save_session
Save the model parameters and the variables Args: sess: the current session
deepmusic/composer.py:412
↓ 2 callers
Method
build
Initialize the weights of the model
deepmusic/modules/decoder.py:77
↓ 2 callers
Method
create_extract
preprocessed song > batch
deepmusic/modules/batchbuilder.py:417
↓ 2 callers
Method
get_cell
a RNN decoder See parent class for arguments details
deepmusic/modules/decoder.py:89
↓ 2 callers
Method
get_input_dim
In the case of the relative song, the input dim is the number of note on the scale (12) + 1 for the next token Return: in
deepmusic/modules/batchbuilder.py:470
↓ 2 callers
Method
get_learning_rate
Return the learning rate associated at the current training step Args: glob_step (int): Number of iterations since the beginning
deepmusic/modules/learningratepolicy.py:123
↓ 2 callers
Method
get_list
See parent class for more details Args: dataset (list[Song]): the training/testing set name (str): indicate the datas
deepmusic/modules/batchbuilder.py:427
↓ 2 callers
Method
get_module_id
()
deepmusic/modules/decoder.py:65
↓ 2 callers
Method
init_state
Return the initial cell state
deepmusic/modules/decoder.py:84
↓ 2 callers
Method
process_song
Pre-process the data once globally Do it once globally. Args: old_song (Song): original song Returns:
deepmusic/modules/batchbuilder.py:279
↓ 2 callers
Method
reconstruct_song
Reconstruct the original raw song from the preprocessed data See parent class for details Some information will be lost compare to t
deepmusic/modules/batchbuilder.py:325
↓ 2 callers
Method
visit_recorder
Save the predicted output songs using the given recorder Args: outputs (List[np.array]): The list of the predictions of the decod
deepmusic/musicdata.py:360
↓ 2 callers
Method
write_song
Save the song on disk Args: piano_roll (np.array): a song object containing the tracks and melody filename (str): the
deepmusic/imgconnector.py:42
↓ 1 callers
Method
_build_network
Create the computational graph
deepmusic/model_old.py:228
↓ 1 callers
Method
_build_network
Create the computational graph
deepmusic/model.py:162
↓ 1 callers
Method
_create_raw_songs
Create the database from the midi files
deepmusic/musicdata.py:165
↓ 1 callers
Method
_get_device
Parse the argument to decide on which device run the model Return: str: The name of the device on which run the program
deepmusic/composer.py:545
↓ 1 callers
Method
_main_test
Generate some songs The midi files will be saved on the same model_dir
deepmusic/composer.py:287
↓ 1 callers
Method
_main_train
Training loop
deepmusic/composer.py:203
↓ 1 callers
Method
_parse_args
Parse the arguments from the given command line Args: args (list<str>): List of arguments to parse. If None, the default
deepmusic/composer.py:88
↓ 1 callers
Method
_print_params
Print the current params
deepmusic/composer.py:505
↓ 1 callers
Method
_restore_dataset
Load/create the conversations data Done in two steps: * Extract the midi files as a raw song format * Transform this raw son
deepmusic/musicdata.py:84
↓ 1 callers
Method
_restore_params
Load the some values associated with the current model, like the current glob_step value. Needs to be called before any other function becaus
deepmusic/composer.py:422
↓ 1 callers
Method
_restore_previous_model
Restore or reset the model, depending of the parameters If testing mode is set, the function has no effect If the destination directo
deepmusic/composer.py:364
↓ 1 callers
Method
_save_params
Save the params of the model, like the current glob_step value Warning: if you modify this function, make sure the changes mirror load_params
deepmusic/composer.py:474
↓ 1 callers
Method
_split_dataset
Create the test/train set from the loaded songs The dataset has been shuffled when calling this function (Warning: the shuffling is d
deepmusic/musicdata.py:248
↓ 1 callers
Method
_visualize_output
Record some result/generated songs during training. This allow to see the training progression and get an idea of what the network really lea
deepmusic/composer.py:339
↓ 1 callers
Function
convert_midi2mp3
Convert all midi files of the given directory to mp3
utils.py:64
↓ 1 callers
Method
generate
Is called just before feeding the placeholder, allows additional pre-processing Args: target(Bool): is true if the bach a
deepmusic/modules/batchbuilder.py:36
↓ 1 callers
Method
get_batches
Prepare the batches for the current epoch WARNING: The songs are not shuffled in this functions. We leave the choice to the batch_bui
deepmusic/musicdata.py:259
↓ 1 callers
Method
get_batches_test_old
Return the batches which initiate the RNN when generating The initial batches are loaded from a json file containing the first notes of the s
deepmusic/musicdata.py:284
↓ 1 callers
Method
get_chosen_name
Return the name of the chosen module Name is defined by get_module_id Returns: str: the name of the chosen module
deepmusic/modulemanager.py:60
↓ 1 callers
Method
get_learning_rate
Return the learning rate associated at the current training step Args: glob_step (int): Number of iterations since the be
deepmusic/model_old.py:191
↓ 1 callers
Method
get_module
Return the chosen module Returns: Obj: the reference on the module instance
deepmusic/modulemanager.py:68
↓ 1 callers
Method
get_op
Return the chosen labels from the softmax distribution Allows to reconstruct the song
deepmusic/modules/loopprocessing.py:93
↓ 1 callers
Method
get_policies
Return the list of the different modes Useful when parsing the command lines arguments
deepmusic/model.py:62
↓ 1 callers
Method
get_prev_threshold
Return the previous sampling probability for the current step. If above, the RNN should use the previous step instead of the given input.
deepmusic/model_old.py:123
↓ 1 callers
Method
get_prev_threshold
Return the previous sampling probability for the current step. If above, the RNN should use the previous step instead of the given input.
deepmusic/model.py:124
↓ 1 callers
Method
get_relative_note
Convert the absolute midi position into the range given by MIDI_NOTES_RANGE Return int: The new position relative to the range (p
deepmusic/songstruct.py:40
↓ 1 callers
Method
get_test_modes
Return the list of the different testing modes Useful on when parsing the command lines arguments
deepmusic/composer.py:50
↓ 1 callers
Method
get_weight
Return the target weight for the given step i using the chosen policy
deepmusic/model_old.py:48
↓ 1 callers
Method
get_weight
Return the target weight for the given step i using the chosen policy
deepmusic/model.py:49
↓ 1 callers
Method
load_all
Restore the module configuration
deepmusic/moduleloader.py:84
↓ 1 callers
Method
load_file
Extract data from midi file Args: filename (str): a valid img file Return: np.array: the piano roll associate
deepmusic/imgconnector.py:32
↓ 1 callers
Method
main
Launch the training and/or the interactive mode
deepmusic/composer.py:140
↓ 1 callers
Method
print_all
Print modules current configuration
deepmusic/moduleloader.py:94
↓ 1 callers
Method
process_batch
Create the batch associated with the song Args: raw_song (Song): The song to convert Return: RelativeBatch
deepmusic/modules/batchbuilder.py:370
↓ 1 callers
Method
reconstruct_batch
Create the song associated with the network output Args: output (list[np.Array]): The ouput of the network (size batch_size*outpu
deepmusic/modules/batchbuilder.py:382
↓ 1 callers
Method
register_all
List all available modules for the current session This function should be called only once at the beginning of the program, before p
deepmusic/moduleloader.py:41
↓ 1 callers
Method
save_all
Save the modules configurations
deepmusic/moduleloader.py:73
↓ 1 callers
Method
set_instrument
Initialize from a mido message Args: msg (mido.MidiMessage): a valid control_change message
deepmusic/songstruct.py:68
↓ 1 callers
Method
set_relative_note
Convert given note into a absolute midi position Args: rel (int): The new position relative to the range (position on keyboard)
deepmusic/songstruct.py:47
Method
__call__
Run the cell at step t Args: prev_keyboard: keyboard configuration for the step t-1 (Ground truth or previous step) p
deepmusic/keyboardcell.py:48
Method
__call__
Function which apply the preprocessing Args: prev_output (tf.Tensor): the ouput on which applying the transformation Retu
deepmusic/modules/loopprocessing.py:30
Method
__call__
Use TODO formula Args: prev_output (tf.Tensor): the ouput on which applying the transformation Return: tf.Ops
deepmusic/modules/loopprocessing.py:58
Method
__call__
Predict the output from prev and scale the result on [-1, 1] Use sigmoid activation Args: X (tf.Tensor): the input
deepmusic/modules/loopprocessing.py:110
Method
__init__
(self, args)
deepmusic/keyboardcell.py:32
Method
__init__
Args: args: parameters of the model
deepmusic/model_old.py:41
Method
__init__
(self, args)
deepmusic/model_old.py:79
Method
__init__
Args: args: parameters of the model
deepmusic/model_old.py:150
Method
__init__
Args: args: parameters of the model
deepmusic/model_old.py:200
Method
__init__
Args: name (str): the name of the module manager (useful for saving/printing)
deepmusic/modulemanager.py:31
Method
__init__
deepmusic/composer.py:56
Method
__init__
(self)
deepmusic/songstruct.py:35
Method
__init__
(self)
deepmusic/songstruct.py:61
Method
__init__
(self)
deepmusic/songstruct.py:95
Method
__init__
Load all conversations Args: args: parameters of the model
deepmusic/musicdata.py:36
Method
__init__
Args: args: parameters of the model
deepmusic/model.py:42
Method
__init__
(self, args)
deepmusic/model.py:80
Method
__init__
Args: args: parameters of the model
deepmusic/model.py:133
Method
__init__
Args: args: parameters of the model
deepmusic/modules/decoder.py:32
Method
__init__
Args: args: parameters of the model
deepmusic/modules/decoder.py:122
Method
__init__
Args: args: parameters of the model
deepmusic/modules/decoder.py:164
Method
__init__
deepmusic/modules/batchbuilder.py:58
Method
__init__
(self)
deepmusic/modules/batchbuilder.py:193
Method
__init__
All attribute are defined with respect with the previous one
deepmusic/modules/batchbuilder.py:210
Method
__init__
(self)
deepmusic/modules/batchbuilder.py:221
Method
__init__
Args: extracts(list[SongExtract]): Should be of length batch_size, or at least all from the same size
deepmusic/modules/batchbuilder.py:226
Method
__init__
(self, args)
deepmusic/modules/batchbuilder.py:272
Method
__init__
(self, args)
deepmusic/modules/batchbuilder.py:482
Method
__init__
(self, args)
deepmusic/modules/loopprocessing.py:27
Method
__init__
(self, args, *args_module)
deepmusic/modules/loopprocessing.py:53
Method
__init__
(self, args)
deepmusic/modules/loopprocessing.py:107
next →
1–100 of 185, ranked by callers