-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from nano-devs/development
Development: Deafened by default
- Loading branch information
Showing
9 changed files
with
201 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package command.music; | ||
|
||
import com.jagrosh.jdautilities.command.Command; | ||
import com.jagrosh.jdautilities.command.CommandEvent; | ||
|
||
public class KaraokeModeCommand extends Command { | ||
@Override | ||
protected void execute(CommandEvent event) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package command.owner; | ||
|
||
import com.jagrosh.jdautilities.command.Command; | ||
import com.jagrosh.jdautilities.command.CommandEvent; | ||
import service.music.GuildMusicManager; | ||
|
||
public class ApplyBassFilterCommand extends Command { | ||
public ApplyBassFilterCommand() { | ||
this.name = "ab"; | ||
this.category = new Category("Owner"); | ||
this.ownerCommand = true; | ||
} | ||
@Override | ||
protected void execute(CommandEvent event) { | ||
String args = event.getArgs(); | ||
|
||
String[] splitArgs = args.split(" "); | ||
|
||
float diff = Float.parseFloat(splitArgs[1]); | ||
|
||
GuildMusicManager musicManager = event.getClient().getSettingsFor(event.getGuild()); | ||
|
||
// if (splitArgs[0].equals("h")) { | ||
// musicManager.getBassBoostFilter().applyHighBass(diff); | ||
// event.reply("Equalizer: HighBass filter applied with diff " + event.getArgs()); | ||
// } | ||
// else { | ||
// musicManager.getBassBoostFilter().applyLowBass(diff); | ||
// event.reply("Equalizer: LowBass filter applied with diff " + event.getArgs()); | ||
// } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package service.music.filter; | ||
|
||
import com.github.natanbc.lavadsp.karaoke.KaraokePcmAudioFilter; | ||
import com.sedmelluq.discord.lavaplayer.filter.equalizer.EqualizerFactory; | ||
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; | ||
|
||
import java.util.Collections; | ||
|
||
public class BassBoostFilter { | ||
|
||
private static final float[] BASS_BOOST = { 0.2f, 0.15f, 0.1f, 0.05f, 0.0f, -0.05f, -0.1f, -0.1f, -0.1f, -0.1f, | ||
-0.1f, -0.1f, -0.1f, -0.1f, -0.1f }; | ||
|
||
private final EqualizerFactory equalizer; | ||
private final AudioPlayer player; | ||
|
||
public BassBoostFilter(AudioPlayer player) { | ||
this.equalizer = new EqualizerFactory(); | ||
this.player = player; | ||
this.player.setFilterFactory(equalizer); | ||
} | ||
|
||
public void applyHighBass(float diff) { | ||
for (int i = 0; i < BASS_BOOST.length; i++) { | ||
equalizer.setGain(i, BASS_BOOST[i] + diff); | ||
} | ||
} | ||
|
||
public void applyLowBass(float diff) { | ||
for (int i = 0; i < BASS_BOOST.length; i++) { | ||
equalizer.setGain(i, -BASS_BOOST[i] + diff); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package service.music.setting; | ||
|
||
public enum BoostSetting { | ||
OFF(0.0F, 0.0F), | ||
SOFT(0.25F, 0.15F), | ||
HARD(0.50F, 0.25F), | ||
EXTREME(0.75F, 0.50F), | ||
MINDBEND(1F, 0.75F); | ||
|
||
public final float band1; | ||
public final float band2; | ||
|
||
BoostSetting(float band1, float band2) { | ||
this.band1 = band1; | ||
this.band2 = band2; | ||
} | ||
} |