sumuzhao / CycleGAN-Music-Style-Transfer

Symbolic Music Genre Transfer with CycleGAN
MIT License
261 stars 66 forks source link

Questions about data #5

Open guanfaqian opened 5 years ago

guanfaqian commented 5 years ago

Congratulations on your groundbreaking work!

I know that you and the musegan's data are different from the audio track.But I can't understand the difference in time.

His time is 496. Yours seems to be 416, but you write directly to 64, which means that your four bars are a phrase and there is no bar length for him. Is this the meaning?

guanfaqian commented 5 years ago

His time is 4X96. Yours seems to be 4X16, but you write directly to 64, which means that your four bars are a phrase and there is no bar length for him. Is this the meaning?

你能给我留给邮箱吗?

sumuzhao commented 5 years ago

Hi, thanks. In MuseGAN paper, they sampled each bar by a sampling rate of 96 time steps. While in our case, each phrase is composed of four consecutive bars. Each bar is sampled by a sampling rate of 16 time steps, which means that the shortest possible note is the 16th note. I think you could take a look at the dataset part in our paper, it should be clear enough. But just contact us if you have any confusions.

guanfaqian commented 5 years ago

I don't seem to see the code in your data processing section. Does your original data use LPD or LMD? Can you send me a copy of the data processing part of the code? Thank you very much.

sumuzhao commented 5 years ago

No, I didn't use LPD or LMD. You can download via the link in Datasets part in ReadMe. Please read ReadME file carefully. Basically, everything has been introduced clearly. For the data preprocessing, you can refer to Testfile.py and convert_clean.py, in which I have made quite a lot comments.

guanfaqian commented 5 years ago

Your processing data code is only available to a single instrument. I am trying to get npy files for 5 instruments.But I don't understand the format of the following steps.

def get_merged(multitrack): ... return Multitrack(None, tracks, multitrack.tempo, multitrack.downbeat, multitrack.beat_resolution, multitrack.name)

Can you send me the code that generates 5 tracks that final is npy file ? Thanks!

sumuzhao commented 5 years ago

I use the packages pretty_midi and pypianoroll a lot in my project. They are really nice tools to deal with MIDI files. I recommend you could read their documents and learn how to play with MIDI files. In pypianoroll, for example, class Track can define single track and class Multitrack have the method get_merged_pianoroll(). Generally, it's not that hard if you spend some time on it. Good luck.

guanfaqian commented 5 years ago

Ok. I will take a closer look. thank you

dedededefo commented 1 year ago

我在我的项目中经常使用包 pretty_midi 和 pypianoroll。它们是处理 MIDI 文件的非常好的工具。我建议您可以阅读他们的文档并学习如何使用 MIDI 文件进行演奏。例如,在 pypianoroll 中,类 Track 可以定义单轨,类 Multitrack 有方法 get_merged_pianoroll()。通常,如果您花一些时间在上面,这并不难。祝你好运。

Hello, I think the convertclean.py used in the second step of data preprocessing There is a problem with the converter function in it. It cannot implement the function when installing the package you specified