magenta / midi-ddsp

Synthesis of MIDI with DDSP (https://midi-ddsp.github.io/)
Apache License 2.0
302 stars 17 forks source link

ImportError and AttributeError #35

Closed MasayaKawamura closed 2 years ago

MasayaKawamura commented 2 years ago

Hi! Very interesting work! I’m trying to run MIDI_DDSP_Demo.ipynb, and I encountered some errors.

  1. ImportError: cannot import name 'LD_RANGE' occurred in from ddsp.spectral_ops import F0_RANGE, LD_RANGE(see here). -> According to DDSP, I think 'DB_RANGE' is correct, not 'LD_RANGE' .

  2. AttributeError: module 'ddsp.spectral_ops' has no attribute 'amplitude_to_db' occurred where ddsp.spectral_ops.amplitude_to_db is used (see here). -> According to DDSP, I suppose it is 'ddsp.core', not 'ddsp.spectral_ops'.

lukewys commented 2 years ago

Hi! Huge thanks for pointing it out! It is because DDSP updated its version and changed some apis. I updated the code and released the new pip package of MIDI-DDSP. The colab notebook should be able to run now. Please let me know if there are further problems. Huge thanks again!

MasayaKawamura commented 2 years ago

Thank you very much for the swift reply!

lukewys commented 2 years ago

Closing the issue as the problem has been fixed. Huge thanks @MasayaKawamura !