convert: start parsing arguments more flexibly In particular, allow default pot values (all at noon), and specifying input and output files rather than always doing stdin/stdout. And no, this is still not all that smart, but it is at least a tiny bit more flexible than it used to be, and the Makefile has been updated accordingly. Also, when F_SETPIPE_SZ is available, use it to limit the buffering of the output if it's a pipe. That, together with the very limited buffering by 'make_one_noise()' should make this somewhat real-time if the target i sreading a pipe and doesn't have huge input buffers. Put another way: if I add interfaces to modify the pots concurrently, that hopefully actually takes effect in a timely way. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Recent Commits to AudioNoise:main
-
convert: start parsing arguments more flexibly
-
Update effect definition interface
Update effect definition interface Add a 'description' callback for printing pot meaning, and pass the pot values as an array to it and to the init function. This makes the interface a bit cleaner, but also means that we can now use the same structure as the RP2354A hardware does: call the '->init' function multiple times as the pots may change during playback. The pots don't actually change during playback - yet - but this starts the restructuring. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
Refactor visualize.py to use native sample units and improve slider
Refactor visualize.py to use native sample units and improve slider Dynamically visualize the X axis in different modes, making the raw sample data the core internal data. This is similar to how we format the Y axis. - Switch internal logic (view updates, data loading, panning) from seconds to sample indices (integers) to match the underlying data structure - Add 'Samples' vs 'Time' X-axis mode toggle using RadioButtons - Update X-axis FuncFormatter to display either integer samples or seconds based on selected mode - Overhaul slider logic to dynamically switch ranges and formats: - In Time mode: Range [0, Duration Seconds], Format '%.3f s' - In Samples mode: Range [0, Max Samples], Format '%d' - Make the slider be a range slider rather than just showing where the current audio window plot starts This was more antigravity with hand-holding and some manual edits. Also just update the initial window size to the full audio size (ok, still limited to one hour), since it's now no longer a performance issue at least with the test file I have. Knock wood. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -
Optimize visualize.py for large datasets
Optimize visualize.py for large datasets Speed up plotting (courtesy of antigravity) to the point where you can reasonably zoom out to fairly long audio files: - Implement downsampling based on MAX_PLOT_POINTS to avoid over-plotting massive datasets - Pre-allocate time axis and index buffers to eliminate transient float allocations during zoom/scroll operations - Use in-place numpy operations for coordinate generation - Remove arbitrary MAX_WIDTH_SEC limit and instead clamp zoom to the actual data duration - Fix backwards compatibility issue with np.linspace by using np.copyto and a pre-computed index buffer Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>