WavySlider - Sine wave slider

WavySlider

Sine wave slider

Customizable:

  • Left color (progress), Right color and Thumb.
  • Wave length and Height.
  • Speed.

GIF_20250108_031407_300


InitializeSlider

Initializes the slider within an HVArrangement.


SetSliderRange

Sets the range (min, max) and increment step of the slider.

Increment values ​​can be integers or floats.

  • min: 0
    max: 100

Increments can be any int number, if it's 3, it will jump like this:
0, 3, 6, 9, 12 ...
Same with float values, if it's 0.4:
0, 0.4, 0.8, 1.2 ...


SetSliderColors

Sets the colors of the slider, only AI2 and RGB colors.


SetWaveProperties

Sets the amplitude (wave height) and wavelength of the progress, values ​​in integers.


SetWaveSpeed

Sets the speed of the wave, values ​​in integers.


GetSliderMinValue

Gets the minimum value.


GetSliderMaxValue

Gets the maximum value.


SetSliderThumbPosition


GetThumbPosition

Get the current thumb position.


SliderStopTracking

Fired when the slider stops being tracked.


SliderMaxValue

Fired when the slider reaches its maximum value.

component_event (28)


Update v1.0.2 Mar 08, 2025.

  • Added a new parameter: fromUser to the SliderValueChanged event.

SliderValueChanged

Fired when the slider value changes.

Now the SliderValueChanged event detects whether the slider is manipulated manually or by code.

For example:

If it is being manipulated by the user (with the thumb) the parameter fromUser will return true or programmatically (by a timer) it will return false.


aia project:
WavySlider.aia (17.1 KB)

Extension v1.0.2.
joejsanz.joedevwavyslider.aix (13.5 KB)


minSdk: 21
maxSdk: 34
JDK: 11

Built using: FAST-CLI v2.6.0


Thanks.

Github

5 Likes

As with the Slider component, are 100 values ​​distributed over the respective interval? If so, shouldn't it then be "float min: 0.0, max: 10" if increment = 0.1?

1 Like

Not necessarily, if you put a range of 100, of course it will.

By putting 0.01, you increase the decimals, you can use any number.

This is what I have to calculate:

data.minValue = min;
data.maxValue = max;
data.increment = increment;
data.seekBar.setMax((int) ((max - min) / increment));

And in the value change event the formula is used:

double value = data.minValue + progress * data.increment;
1 Like

2 Likes

... but

1 Like

I've seen the error and it's not just in that number.
I've left the computer for now, but I'll fix it tomorrow when I have access.

1 Like

What happens if we give min- 0, max- 10 and increment- 0.3?

It will increase from 0.3 to 0.6. 0.9... until reaching 9.9.
The same if you put the -, it will reach -9.9.

1 Like

Update

1 Like

Update v1.0.2 Mar 08, 2025.

This update was to help prevent interference between the Player's SeekTo function when used in the SliderValueChanged event and SetSliderThumbPosition when used in a timer.
Since using both would cause the music to crash.

1 Like