14class AudioFilePosition;
101 void fileDragEnter(
const StringArray& files,
int x,
int y)
override;
118 void mouseDown(
const MouseEvent& e)
override;
119 void mouseDrag(
const MouseEvent& e)
override;
120 void mouseUp(
const MouseEvent& e)
override;
147 std::vector<DragListener*> drag_listeners_;
153 float window_position_;
157 AudioSampleBuffer sample_buffer_;
160 Point<float> last_mouse_position_;
253 void loadFile(
const File& file)
override;
A listener interface for classes interested in receiving audio file load events.
Definition audio_file_drop_source.h:26
A helper class for handling drag-and-drop of audio files into a JUCE component.
Definition audio_file_drop_source.h:19
Interface for listening to mouse drag movements relative to the waveform.
Definition file_source_overlay.h:33
virtual ~DragListener()
Definition file_source_overlay.h:35
virtual void positionMovedRelative(float ratio, bool mouse_up)=0
Called when the user moves the mouse while dragging over the audio waveform.
A component for visualizing and interacting with an audio waveform.
Definition file_source_overlay.h:24
void resized() override
Resizes the component, adjusting the waveform display and line positions.
Definition file_source_overlay.cpp:73
static constexpr float kResolution
Definition file_source_overlay.h:46
void mouseUp(const MouseEvent &e) override
Definition file_source_overlay.cpp:208
void setWindowPosition(float window_position)
Sets the window start position for display.
Definition file_source_overlay.h:78
void fileDragEnter(const StringArray &files, int x, int y) override
Called when files are dragged into this component.
Definition file_source_overlay.cpp:183
virtual ~AudioFileViewer()
Definition file_source_overlay.h:52
AudioSampleBuffer * getSampleBuffer()
Gets the underlying sample buffer of the loaded audio.
Definition file_source_overlay.h:126
void fileDragExit(const StringArray &files) override
Called when files are dragged out of this component.
Definition file_source_overlay.cpp:187
void mouseDrag(const MouseEvent &e) override
Definition file_source_overlay.cpp:201
void clearAudioPositions()
Clears the currently displayed audio positions in the waveform.
Definition file_source_overlay.cpp:108
int getSampleRate() const
Gets the sample rate of the loaded audio.
Definition file_source_overlay.h:132
void audioFileLoaded(const File &file) override
Called when an audio file is loaded via drag-and-drop.
Definition file_source_overlay.cpp:170
float updateMousePosition(Point< float > position)
Updates the mouse position and returns the relative movement ratio.
Definition file_source_overlay.cpp:191
void addDragListener(DragListener *listener)
Adds a drag listener to receive callbacks on waveform drags.
Definition file_source_overlay.h:144
void setWindowValues()
Updates the display to reflect new window position and size.
Definition file_source_overlay.cpp:145
void mouseDown(const MouseEvent &e) override
Mouse event handlers for adjusting audio window start on drag.
Definition file_source_overlay.cpp:197
void setFileSource(FileSource *file_source)
Sets the FileSource reference for retrieving audio data.
Definition file_source_overlay.h:138
void setAudioPositions()
Updates the waveform visualization based on the current audio file data.
Definition file_source_overlay.cpp:116
void setWindowSize(float window_size)
Sets the window size for display.
Definition file_source_overlay.h:84
AudioFileViewer()
Constructs an AudioFileViewer.
Definition file_source_overlay.cpp:54
void setWindowFade(float window_fade)
Sets the window fade amount, controlling the fade shape on the edges of the window.
Definition file_source_overlay.h:90
A specific WavetableKeyframe that uses the FileSource’s audio buffer.
Definition file_source.h:74
A WavetableComponent that uses an external audio sample as its source.
Definition file_source.h:23
An overlay UI component for editing FileSource Wavetable components.
Definition file_source_overlay.h:175
void textEditorFocusLost(TextEditor &text_editor) override
Called when text editors lose focus, updating values.
Definition file_source_overlay.cpp:473
void loadFilePressed()
Opens a file chooser to load an audio file into the FileSource.
Definition file_source_overlay.cpp:444
FileSourceOverlay()
Constructs a FileSourceOverlay.
Definition file_source_overlay.cpp:215
void sliderDragEnded(Slider *moved_slider) override
Called when slider drag ends, finalizing changes.
Definition file_source_overlay.cpp:422
std::unique_ptr< OpenGlTextEditor > start_position_
Definition file_source_overlay.h:286
virtual void setEditBounds(Rectangle< int > bounds) override
Sets the editing bounds for controls in this overlay.
Definition file_source_overlay.cpp:338
void positionMovedRelative(float ratio, bool mouse_up) override
Called by AudioFileViewer when the mouse moves relative to waveform position.
Definition file_source_overlay.cpp:480
void loadStartingPositionText()
Updates the FileSource's starting position from text input.
Definition file_source_overlay.cpp:532
std::unique_ptr< AudioFileViewer > audio_thumbnail_
Definition file_source_overlay.h:293
void loadFile(const File &file) override
Loads an audio file into the FileSource and updates UI.
Definition file_source_overlay.cpp:426
std::unique_ptr< OpenGlTextEditor > window_size_
Definition file_source_overlay.h:287
void audioFileLoaded(const File &file) override
Called when an audio file is loaded (via drag-drop or load button).
Definition file_source_overlay.cpp:462
void setFileSource(FileSource *file_source)
Sets the FileSource this overlay edits.
Definition file_source_overlay.cpp:552
std::unique_ptr< TextSelector > phase_style_
Definition file_source_overlay.h:291
void buttonClicked(Button *clicked_button) override
Handles button clicks (e.g., load button, normalize toggle).
Definition file_source_overlay.cpp:450
void clampStartingPosition()
Ensures the starting position is within valid range.
Definition file_source_overlay.cpp:559
FileSource::FileSourceKeyframe * current_frame_
Definition file_source_overlay.h:284
std::unique_ptr< SynthSlider > window_fade_
Definition file_source_overlay.h:288
FileSource * file_source_
Definition file_source_overlay.h:283
std::unique_ptr< OpenGlToggleButton > normalize_gain_
Definition file_source_overlay.h:292
void setTextEditorVisuals(TextEditor *text_editor, float height)
Applies visuals and font settings to a text editor.
Definition file_source_overlay.cpp:502
void textEditorReturnKeyPressed(TextEditor &text_editor) override
Called when return key is pressed in text editors (start position, window size).
Definition file_source_overlay.cpp:466
virtual void frameDragged(WavetableKeyframe *keyframe, int position) override
Called when a keyframe is dragged, not used here.
Definition file_source_overlay.h:192
std::unique_ptr< TextButton > load_button_
Definition file_source_overlay.h:289
virtual void frameSelected(WavetableKeyframe *keyframe) override
Called when a keyframe is selected in the Wavetable.
Definition file_source_overlay.cpp:302
virtual ~FileSourceOverlay()
Definition file_source_overlay.cpp:300
void loadWindowSizeText()
Updates the FileSource's window size from text input.
Definition file_source_overlay.cpp:514
std::unique_ptr< TextSelector > fade_style_
Definition file_source_overlay.h:290
void sliderValueChanged(Slider *moved_slider) override
Responds to slider changes (window fade, fade style, phase style).
Definition file_source_overlay.cpp:404
A component for rendering lines with optional filling and boost effects using OpenGL.
Definition open_gl_line_renderer.h:16
A convenience class for a single quad rendered via OpenGL.
Definition open_gl_multi_quad.h:447
Base class for all synthesizer sections, providing UI layout, painting, and interaction logic.
Definition synth_section.h:193
A base overlay component for editing and interacting with a wavetable component's parameters.
Definition wavetable_component_overlay.h:22
Represents a single state of a waveform at a specific position in a wavetable.
Definition wavetable_keyframe.h:35
Declares the SampleViewer class that displays and animates a waveform sample.
Declares the TextSelector class and PaintPatternSelector class for selecting text-based options and d...