justinsalamon / scaper

A library for soundscape synthesis and augmentation
BSD 3-Clause "New" or "Revised" License
384 stars 56 forks source link

Use pop_data instead of hacking the value dict in generate_from_jams #37

Open justinsalamon opened 6 years ago

justinsalamon commented 6 years ago

generate_from_jams() requires updating observations if a new fg/bg path is provided. Currently this is done by updating the value dict directly, which is a hack because in principle the observation object is meant to be immutable. Solution is to pop the observation to be modified and add a new one with the updated field values.