morevnaproject-org / papagayo-ng

Papagayo is a lip-syncing program designed to help you line up phonemes (mouth shapes) with the actual recorded sound of actors speaking. Papagayo makes it easy to lip sync animated characters by making the process very simple - just type in the words being spoken (or copy/paste them from the animation's script), then drag the words on top of the sound's waveform until they line up with the proper sounds.
233 stars 51 forks source link

Change current architecture to use anytree #97

Closed steveway closed 3 years ago

steveway commented 3 years ago

Currently for the Waveformview we pack the LipSync Objects into an Anytree structure. This makes handling relationships between them much easier. Every Node knows what it's parent is, it's children are, and it can even know it's left and right neighbors. It would then make sense to move this Tree System to our LipSync Objects themselves. At the moment we already have a tree system in a way, every object has some children in a list, but that is it already. Maybe we can condense it to a single class then too, there is a lot of duplication with the different classes for Words, Phrases, Voices and Phonemes. I believe this should allow us to clean up a lot of code, the WaveformView for example for sure should benefit. And other parts, like the export and saving might benefit too.

steveway commented 3 years ago

I begun with the restructure in a new branch: https://github.com/steveway/papagayo-ng/tree/node_export It's already partially working and you can already see that it should allow us to clean up the code quite a bit.

steveway commented 3 years ago

This is pretty much finished now. The new Code is a lot cleaner in my opinion. https://github.com/morevnaproject-org/papagayo-ng/pull/100 https://github.com/morevnaproject-org/papagayo-ng/pull/101 https://github.com/morevnaproject-org/papagayo-ng/pull/102