As I mentioned here Visual feedback - #3 by mrreason I started to implement the event highlighting for TidalCycles in the Pulsar editor. I will continue the discussion in this thread - it feels more fitting.
I still have some work to do to make it easy accessible for everybody, but the implementaton itself is done I expect that I will create a PR for this implementation next week.
Thanks to @archaic.tech and @Zalastax. The summary on Github and the implementation in text.management was really helpful. With this in mind I knew, that it is possible to implement event highlighting with the current data we receive from TidalCycles.
Here is a demo video I made. It show that it even works with a real special setup (in this case my setup :-D). I would really appreciate some early feedback:
This is really great and been something that TidalCyclers have wanted for years!
Is changing the colours the highlighting as easy as editing a css file? I often overlay my code onto visuals using obs and it would be great if the highlight could optionally be a solid background instead of only a box outline.
Even if not possible this is still great and I look forward to trying it out!
Ah, yes - this provided me the final idea. I already wrapped my head around this topic. But your "Is changing the colours the highlighting as easy as editing a css file" was the key. It should be and this is why I added it like this now
I added a default style, but you can override it like this in your global stylesheet (Pulsar -> Stylesheet...):
And you can override it for every individual stream like this:
.event-highlight-2 {
background-color: white;
}
The pattern here is .event-highlight-[streamID].
Last but not least I indent to be able to override these with OSC messages from outside as well. Because I wanted to change the styles based on my SuperDirtMixer presets.
Finally I created the Pull Request for the event highlighting in the TidalCycles Pulsar package. Whoever wants to try it out, I am eager to receive some feedback
Extract OSC message queuing and calculation to a Web-Worker
Reset internal state, when hush was received
Overwrite internal markers, when a line was received, that has active markers
Change CSS properties with OSC messages from an external client
And then the bug fixing of course My ideas tend to optimize the performance, when editing big files. Because frame drops could cause flickering of highlighting events. So I am a heavy user of this feature and try to optimize it.
But yeah for most cases the current implementation should be fine. Thanks @ndr_brt for the intense review - it was definitely an improvement!
@yaxu@geikha@th4 could someone of you please create a separate thread for the pulsar event highlighting and move the corresponding messages from this thread? I will create a new thread for the NeoVim event highlighting. Both is under active development right now and we receive user feedbacks for both. I would like to split and collect the informations in separate threads.
@ndr_brt just a quick vital sign. I just wanted to try out the event highlighting in NeoVim and now this became a bigger project. I want to resolve some minor topics there and then I continue with the Pulsar editor.
I tried out all optimization strategies that I came up so far and I was able to fix all the bugs. Now I need to carefully add it to the project and do the review with you. This will definitely happen. But sorry for the interruption. In the end what we will have is a solid workin implementation for two editors I am really looking forward to this!
The highlighting works but there is no way for me to play this way,, i use the console feedback constantly + i use :script for loading some custom functions
Yes this happens, because I do not know what a Pattern in mini notation is and what an indented String. This is a general issue and the only way I came up with, is a blacklisting approach. Maybe we can add a fixed set and a configuration option?
OK, I think I got it. But why is it printing every time to console? That's a bit confusing to me.
I surely get the problem with the script tho! For which I think the solution is getting the extension to ignore all lines starting with :, as they are GHCi functionalities.