Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transition to replace an arrangment/tune with one that was computed separately #136

Open
ksunden opened this issue Jun 8, 2021 · 3 comments

Comments

@ksunden
Copy link
Member

ksunden commented Jun 8, 2021

e.g. with SDC we compute fresh from raw data an arrangement, but then want to use that arrangement in conjunction with other SDC curves from other OPAs/arrangements/tunes

perhaps have an option to remove existing tunes that are not in the specified arrangment

Currently the workaround is to do:

i_d = instr.as_dict()
i_d["arrangements"][key] = new_instr.arrangements[key]
instr = attune.Instrument(**i_d)

Which A) does not preserve the transition like desired and B is obtuse

I would like something like instr = attune.replace_arrangement(instr, arrangement)

which is its own transition

@kameyer226
Copy link
Contributor

would append.arrangement be a separate issue? For the most part, I can only imagine new arrangements working off of previous arrangements, and so appending could use some of the information from the arrangement(s) it is based from

@ksunden
Copy link
Member Author

ksunden commented Jul 7, 2022

@kameyer226 honestly, up to implementor whether to split it into different functions/transitions or not.

@ksunden
Copy link
Member Author

ksunden commented Aug 1, 2022

wait, is this not what update_merge (#150) does?

I guess the potential difference is that update_merge requires the arrangement to be included in an existing instrument, rather than a bare arrangement object.

Additionally, there is some ambiguity of whether this method would preserve tunes which appear in the original instrument but not the new arrangement. The proposed implementation/workaround would not, but update_merge would.

@ddkohler @kameyer226 thoughts?

My current leaning is that we have addressed the particular reasoning under which this was formulated (SDC) by update_merge, but not wholescale opposed to adding something which doesn't require an extra step of wrapping an arrangement into an instrument object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants