Package client.teavm.common.oscilloscope
package client.teavm.common.oscilloscope
Provides classes for visualizing SID chip activity in real time within the
browser-based JSIDPlay2 TeaVM front end.
The client.teavm.common.oscilloscope package implements an
oscilloscope-like display that visualizes waveforms, envelopes, filter curves
and other chip characteristics of one or multiple SID emulations.
This module integrates with C64 and
Mixer to collect live sample data via
OscilloscopeUtil. It periodically updates
and transmits visualization data (paths and textual labels) to the JavaScript
front end using the TeaVM interop API
(IImportedApi).
Key Components
Oscilloscope— the main controller class coordinating all gauge instances and SID sampling logic.Gauge— the abstract base class handling generic path and drawing logic for all oscilloscope widgets.WaveGauge— visualizes the current waveform output of each SID voice, including waveform type and modulation flags.- Additional gauge subclasses (e.g.
EnvelopeGauge,FrequencyGauge,VolumeGauge,ResonanceGauge,FilterGauge) visualize the corresponding SID parameters.
Usage
A typical usage scenario is to create an
Oscilloscope instance for a given
C64 and Mixer, then start
sampling and rendering using
Oscilloscope.start(int). The data is
periodically transferred to the JavaScript layer for WebGL or Canvas
rendering.
Implementation Notes
- Sampling runs asynchronously using
OscilloscopeUtil. - Gauge instances internally store pre-transformed line coordinates inside
IntBuffers to allow efficient memory transfer to JavaScript. - Localization for gauge labels is provided via a
Functionpassed into the constructor.
- Siehe auch:
-
KlassenKlasseBeschreibung