xiphonics / picoTracker

BSD 3-Clause "New" or "Revised" License
213 stars 19 forks source link

Instrument deep clone #217

Open djdiskmachine opened 1 month ago

djdiskmachine commented 1 month ago

Deep clone is a feature found in LSDJ and M8tracker that significantly speeds up arrangement and composing. In LSDJ, it's a toggle in the project view and in M8tracker it's a button combo. When regular cloning chain 00, containing the phrases 00 01 00 02

The resulting chain 01 would contain 00 01 00 02

Deep clone however, cloning the above example 00 would result in chain 01 containing 03 04 03 05

The contents of phrases would be identical and no cloning of instruments or other phrase information would occur.

A suggestion of how to implement can be found in these commits for Piggy:

https://github.com/djdiskmachine/LittleGPTracker/pull/81 https://github.com/djdiskmachine/LittleGPTracker/pull/98 https://github.com/djdiskmachine/LittleGPTracker/pull/135

Would you be interested in having this feature in picoTracker too?

edit: example clarification

maks commented 1 month ago

Yes 💯 interested! 🙂 Quick questions:

  1. I'm guessing you meant "01 would contain..." not 00 ?
  2. What happens if the subsequent phrase numbers are already in use, say in example above, there are already phrases 03,04,05,06, in that case would it clone to phrases: 06,07,06,08 ?
djdiskmachine commented 1 month ago

1: indeed! Does my updated comment clarify things? 2: Deep cloning won't overwrite any already populated chains/phrases but will check for empty ones up until max available chains/phrases.

Missing in this suggestion is a screen notification for any possible unsuccessful operations. I'll hold off making a PR for now and will await The Great Refactoring 🙂

djdiskmachine commented 1 month ago

Notification design suggestion can be found here https://github.com/djdiskmachine/LittleGPTracker/pull/137

maks commented 1 month ago

Thanks @djdiskmachine this looks like the code showing the UI? https://github.com/djdiskmachine/LittleGPTracker/pull/137/files#diff-94b69f9eae3719c36fa76074f69dae6953ae9038fc2ed9349fa214f0abab414eR239-R260

djdiskmachine commented 1 month ago

That's right! It doesn't work perfectly together with the help legend feature, need to work something out there. :)