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

Reuse Playback-object ? #78

Open
FischertBilligheim opened this issue Apr 6, 2020 · 8 comments
Open

Reuse Playback-object ? #78

FischertBilligheim opened this issue Apr 6, 2020 · 8 comments
Labels
feature request API changes required
Projects
Milestone

Comments

@FischertBilligheim
Copy link
Contributor

Hi Max,
I have a question referring the "Playback" object:

If I created a playback-object, and I'm now using it (e.g. also by having added EventHandlers and play-event filters) and now I'm modifying the midi-events:
Do I always have to recreate a new Playback-object? Or can I anyhow reuse it and give the updated chunks/midi-events to it? (So I don't always have to add the event-handlers to it, or to set a new current time........)

Best regards
Thomas

@melanchall
Copy link
Owner

Hi Thomas,

Right now there is no way to update Playback object on changes in underlying events collection. So you need to recreate it every time.

BUT I have plans regarding what you talking about. So please don't close the issue and let's discuss what API will be most flexible and useful.

I suppose we should introduce some collection type (like ObservableCollection) which will fire some event like CollectionChanged. If Playback created by an instance of this collection type, Playback will subscribe to that CollectionChanged event and update internal state when it's fired.

Does this sound good for you?

Max

@melanchall melanchall added this to To do in DryWetMIDI via automation Apr 7, 2020
@melanchall melanchall added feature request API changes required question Just question about the library labels Apr 7, 2020
@melanchall melanchall modified the milestones: 5.1.0, Future, 5.1.1 Apr 7, 2020
@melanchall melanchall moved this from To do to In progress in DryWetMIDI Apr 7, 2020
@FischertBilligheim
Copy link
Contributor Author

Hi Max,
That sounds great to me !! 👍😉

@melanchall
Copy link
Owner

Thomas,

Right now I'm working on documentation of DryWetMIDI so I'll return to this task as soon as possible. Please be patient :)

@melanchall melanchall removed the question Just question about the library label Apr 11, 2020
@melanchall
Copy link
Owner

Thomas,

I'm ready to implement the feature. Please tell me what kind of objects do you want to track first? Low-level (MidiEvent) or high-level ones (TimedEvent, Note and Chord)? Last one easier to support so I can track these objects at first iteration.

@FischertBilligheim
Copy link
Contributor Author

Hi Max,
mmmh - good question....
I think High-Level events, specially "Notes" are the most important ones. This would be great for a first iteration....

By the way:
You mentioned Chords: Are they relevant for a PlayBack-object?

Best regards
Thomas

@melanchall
Copy link
Owner

melanchall commented May 5, 2020

Thomas,

Yes, you can use instances of any class that implements ITimedObject: TimedEvent, Note or Chord.

OK, I'm starting the feature implementation :)

@melanchall
Copy link
Owner

Small piece of news.

I'm implementing the feature in separate branch: playback-source. It's quite difficult task with a lot of things involved so please be patient. I suppose the first implementation will not be effficient in terms of performance but I hope we'll improve it with your feedback :)

@melanchall
Copy link
Owner

Setup benchmarking to store API performance metrics in InfluxDB Cloud to monitor how new feature will affect playback latency.

@melanchall melanchall modified the milestones: 5.1.1, 5.2.0 Jun 29, 2020
@melanchall melanchall modified the milestones: 5.2.0, Future Oct 1, 2020
@melanchall melanchall moved this from In progress to To do in DryWetMIDI Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request API changes required
Projects
DryWetMIDI
  
To do
Development

No branches or pull requests

2 participants