-
Notifications
You must be signed in to change notification settings - Fork 30
[Event Highlighting]: use timetags of bundled osc messages #230
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
base: master
Are you sure you want to change the base?
[Event Highlighting]: use timetags of bundled osc messages #230
Conversation
abfac86 to
5dd387d
Compare
Delete styles/tidal.less Restore tidal.less file Add condition to ensure, that meta data will only be added, when the feature is enabled. Refactor osc handling Introduce eventIds Add multiple text editor support Fix PR issues Refactor osc server transformer logic chore: move highlight feature enable check to main Add LineProcessor helper class Extract regex statements Add audio motion analyzer Add styles Use MrReason setup directory as stack enrtry point Change stack package path Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Continue rebasing Fix remaining rebase issues Fix remote control Add safety check Handle osc style changes Add a event highlighting web worker Replace old event queue with worker queue Add set tests Remove rebase duplication Add osc style description to README Remove polyfills set import in main Add first attempt of state resetting when receiving hush Add a discard counter in the worker Fix bugs Remove worker Group tidal events by timestamp Remove missThreshold Rename messageBuffer array Refactor event-highlighter Update README Fix unit tests Revert mrreason setup changes Remove fonts and styles Add fps description Remove hush handling Remove line processor fixes
107afd4 to
aefc595
Compare
|
@ndr-brt there is nothing left to do from my end here, could you please give it a look? Would be awesome, if I could start adding the rest of the optimizations and one more feature. Then I would be ready to launch a new version :-) |
|
@thgrund hey, I wasn't aware, for the next time, when you are ready for another review, you can re-request it, so I will get a notification ;) |
| const transformedArgs = [ | ||
| { value: "time" }, { value: time }, | ||
| { value: "id" }, args[0], | ||
| { value: "duration" }, args[1], | ||
| { value: "cycle" }, args[2], | ||
| { value: "colStart" }, args[3], | ||
| { value: "eventId" }, { value: args[4].value - 1 }, | ||
| { value: "colEnd" }, args[5], | ||
| ]; | ||
|
|
||
| /** requestAnimationFrame callback */ | ||
| animate(now) { | ||
| const elapsed = now - this.then; | ||
| const configFPS = atom.config.get('tidalcycles.eventHighlighting.fps'); | ||
| const fpsInterval = 1000 / configFPS; | ||
| const message = OscServer.asDictionary(transformedArgs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd avoid to call OscServer.asDictionary here, it will be easier to just create the message directly from args
|
|
||
| if (oscMessage.oscType === "bundle") { | ||
| oscMessage.elements.forEach(element => { | ||
| element.time = OscServer.fromNTPTime(oscMessage.timetag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to pass the timetag to the subscriber and let them to convert it, if needed
The timestamps of the OSC bundles are considered now and are used for collecting messages before using them for calculcations. This stabilizes the event-highlighting animation, especially when working with big files.
See: #229