Class FilterBuilder

  • All Implemented Interfaces:

    
    public final class FilterBuilder
    
                        

    Helper class fo builder Filters.

    • Constructor Detail

      • FilterBuilder

        FilterBuilder()
    • Method Detail

      • setVolume

         final FilterBuilder setVolume(Float volume)

        Sets the filter volume. If you just want to change the volume, it is highly recommended to use dev.arbjerg.lavalink.client.IUpdatablePlayer.setVolume instead.

        This volume takes the time of your buffer size to apply and should only be used if any other filters would increase the overall volume too much.

        Parameters:
        volume - The volume to apply to the filter.
        Returns:

        The updated builder, useful for chaining

      • setEqualizer

         final FilterBuilder setEqualizer(List<Band> equalizer)

        Set the equalizer bands on the player.

        Parameters:
        equalizer - Each band to set in the equalizer.
        Returns:

        The updated builder, useful for chaining

      • setKaraoke

         final FilterBuilder setKaraoke(Karaoke karaoke)

        Set the karaoke filter on the player.

        Parameters:
        karaoke - The karaoke filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setTimescale

         final FilterBuilder setTimescale(Timescale timescale)

        Sets the timescale filter on the player.

        Parameters:
        timescale - The timescale filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setTremolo

         final FilterBuilder setTremolo(Tremolo tremolo)

        Sets the tremolo filter on the player.

        Parameters:
        tremolo - The tremolo filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setVibrato

         final FilterBuilder setVibrato(Vibrato vibrato)

        Sets the vibrato filter on the player.

        Parameters:
        vibrato - The vibrato filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setDistortion

         final FilterBuilder setDistortion(Distortion distortion)

        Sets the distortion filter on the player.

        Parameters:
        distortion - The distortion filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setRotation

         final FilterBuilder setRotation(Rotation rotation)

        Sets the rotation filter on the player.

        Parameters:
        rotation - The rotation filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setChannelMix

         final FilterBuilder setChannelMix(ChannelMix channelMix)

        Sets the channel mix filter on the player.

        Parameters:
        channelMix - The channel mix filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setLowPass

         final FilterBuilder setLowPass(LowPass lowPass)

        Sets the low pass filter on the player.

        Parameters:
        lowPass - The low pass filter to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setPluginFilter

         final FilterBuilder setPluginFilter(String name, Object filter)

        Set custom filter data for a plugin.

        Parameters:
        name - the name of the plugin filter
        filter - the filter data, can be a custom class as it will be serialised to json
        Returns:

        The updated builder, useful for chaining

      • setPluginFilter

         final FilterBuilder setPluginFilter(String name, JsonElement filter)

        Set custom filter data for a plugin.

        Parameters:
        name - the name of the plugin filter
        filter - kotlin JsonElement that holds the filter data.
        Returns:

        The updated builder, useful for chaining

      • removePluginFilter

         final FilterBuilder removePluginFilter(String name)

        Removes a plugin filter with the given name.

        Parameters:
        name - the name of the plugin filter
        Returns:

        The updated builder, useful for chaining

      • build

         final Filters build()

        Builds the Filters object with the current configuration.

        Returns:

        the Filters object with the current configuration