Ghadjeres / DeepBach

code accompanying "DeepBach: a Steerable Model for Bach Chorales Generation" paper
MIT License
500 stars 131 forks source link

Usage with NONOTO #76

Open JacobH140 opened 3 years ago

JacobH140 commented 3 years ago

Hi there! Is there a way to constrain the output to a given soprano melody within the NONOTO interface? Or, more generally, to edit specific notes using NONOTO akin to what can be seen within the MuseScore plugin here? https://www.youtube.com/watch?v=OkkKjy3WRNo

Thanks!

Ghadjeres commented 3 years ago

Hi! Thanks for your interest! Currently we did not implement the possibility to freeze one voice in NONOTO as we wanted to keep the interface as simple as possible. Concerning editing notes directly within NONOTO, this is impossible as we rely on OpenSheetMusicDisplay which only renders the score. Depending on your needs, if you want to interact with NONOTO with a pre-determined fixed melody, the simplest way would be to directly modify the flask_server.py file: If you modify the compose() method, to return a chorale with the predifined soprano, and add the voice_index_range=[1,2,3] argument in the deepbach.generation() method l. 249 in timerange_change(), this should work. Hope this helps. Best