From 22f88459f2950eb163a8844badd884b3e1d193cd Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 27 Mar 2024 17:56:47 +0300 Subject: replaced Stream:foreach() with Stream:iter() * This allows the native syntax `for f in Stream:iter() do ... end` without using lambda functions. Also you can use `break` and `return` statements. * On the other hand we cannot exploit the extended xpcall() semantics and had to introduce another lambda in Stream:play(). * In general the number of function calls per tick stays the same. Stream:gtick() itself could be used as an iterator, but Stream:iter() adds checking for CTRL+C, resetting of the sample cache and binding functions. --- TODO | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'TODO') diff --git a/TODO b/TODO index 58240ed..0fbacf9 100644 --- a/TODO +++ b/TODO @@ -52,7 +52,7 @@ Perhaps bundle https://github.com/Xpra-org/xpra/. The HTML client might even allow integrating Tk windows into Jupyter cells? * Widget toolkit integration. - We could optionally integrate Gtk (lgi) or Tcl and drive their main loops from Stream:foreach() or Stream:play() + We could optionally integrate Gtk (lgi) or Tcl and drive their main loops from Stream:iter() or Stream:play() whenever their modules are loaded. This would allow creating GUIs to control streams without having to go via external MIDI applications. There would also have to be a new Stream class that reads values always from the @@ -114,3 +114,6 @@ Tk canvases. * Automatically detect whether terminal supports the Kitty graphics protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol/#querying-support-and-available-transmission-mediums +* Two C non-inlineable function calls per sample due to applause_push_sample() could be avoided by including our + own lockless ring-buffer implementation. +* Document ZipStream semantics - see chapter Stream Algebra in my thesis. -- cgit v1.2.3