mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 19:37:39 +02:00
Improve note parameters (#798)
* Add note parameter * Increase max semitones * Add previewing sounds for notes * Add note preview toggle setting * Fix Launch Party starting note * Fix preview sound pooling + add BTS preview sound * Add previewing note when slider handle is clicked
This commit is contained in:

committed by
minenice55

parent
194b4b6e04
commit
35b1120d01
@ -26,12 +26,12 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new Param.CollapseParam((x, _) => !(bool)x, new string[] { "note1", "note2", "note3", "note4", "note5", "note6"})
|
||||
}),
|
||||
new Param("note1", new EntityTypes.Integer(-24, 24, 0), "1st note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Integer(-24, 24, 2), "2nd note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Integer(-24, 24, 4), "3rd note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Integer(-24, 24, 5), "4th note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Integer(-24, 24, 7), "5th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 6th note."),
|
||||
new Param("note6", new EntityTypes.Integer(-24, 24, 12), "6th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 5th note."),
|
||||
new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 3, 4, "builtToScaleDS/PianoPreview"), "1st note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 3, 4, "builtToScaleDS/PianoPreview"), "2nd note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 3, 4, "builtToScaleDS/PianoPreview"), "3rd note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 3, 4, "builtToScaleDS/PianoPreview"), "4th note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 3, 4, "builtToScaleDS/PianoPreview"), "5th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 6th note."),
|
||||
new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 3, 4, "builtToScaleDS/PianoPreview"), "6th note", "Set the number of semitones up or down this note should be pitched. This note plays together with the 5th note."),
|
||||
}
|
||||
},
|
||||
new GameAction("play piano", "Play Note")
|
||||
@ -40,7 +40,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("type", new EntityTypes.Integer(-24, 24, 0), "Semitones", "Set the number of semitones up or down this note should be pitched.")
|
||||
new Param("type", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 3, 4, "builtToScaleDS/PianoPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched.")
|
||||
},
|
||||
},
|
||||
new GameAction("color", "Color Palette")
|
||||
|
@ -26,17 +26,17 @@ namespace HeavenStudio.Games.Loaders
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("semiTones", new EntityTypes.Integer(-24, 24, -5), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Integer(-24, 24, -1), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Integer(-24, 24, 2), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -5, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("close", GleeClub.MouthOpenClose.Both, "Close/Open Mouth", "Choose if the chorus kids should close or open their mouth."),
|
||||
new Param("repeat", false, "Repeating", "Toggle if the left and middle chorus kid should repeat this singing cue.", new List<Param.CollapseParam>()
|
||||
{
|
||||
new Param.CollapseParam((x, _) => (bool)x, new string[] { "semiTonesLeft2", "semiTonesLeft3", "semiTonesMiddle2" })
|
||||
}),
|
||||
new Param("semiTonesLeft2", new EntityTypes.Integer(-24, 24, 0), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesLeft3", new EntityTypes.Integer(-24, 24, 0), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesMiddle2", new EntityTypes.Integer(-24, 24, 0), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesLeft2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesLeft3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesMiddle2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."),
|
||||
}
|
||||
},
|
||||
new GameAction("baton", "Baton")
|
||||
@ -50,9 +50,9 @@ namespace HeavenStudio.Games.Loaders
|
||||
defaultLength = 4f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("semiTones", new EntityTypes.Integer(-24, 24, -1), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Integer(-24, 24, 4), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Integer(-24, 24, 10), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 10, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("pitch", new EntityTypes.Float(0f, 5f, 1f), "Conductor Voice Pitch", "Choose the pitch of the conductor's voice. 1 is normal pitch.")
|
||||
}
|
||||
},
|
||||
@ -62,9 +62,9 @@ namespace HeavenStudio.Games.Loaders
|
||||
defaultLength = 0.5f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("semiTones", new EntityTypes.Integer(-24, 24, 0), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Integer(-24, 24, 0), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Integer(-24, 24, 0), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailPreview"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
|
||||
}
|
||||
},
|
||||
new GameAction("presence", "Toggle Chorus Kids")
|
||||
|
@ -20,10 +20,10 @@ namespace HeavenStudio.Games.Loaders
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("offset", new EntityTypes.Float(-1, 2, -1), "Spawn Offset", "Set when the rocket should rise up."),
|
||||
new Param("note1", new EntityTypes.Integer(-24, 24, 2), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Integer(-24, 24, 4), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Integer(-24, 24, 5), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Integer(-24, 24, 7), "4th Note", "Set the number of semitones up or down this note should be pitched.")
|
||||
new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 0,4, "launchParty/rocket_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0,4, "launchParty/rocket_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0,4, "launchParty/rocket_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0,4, "launchParty/rocket_note"), "4th Note", "Set the number of semitones up or down this note should be pitched.")
|
||||
}
|
||||
},
|
||||
new GameAction("partyCracker", "Party-Popper")
|
||||
@ -33,12 +33,12 @@ namespace HeavenStudio.Games.Loaders
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."),
|
||||
new Param("note1", new EntityTypes.Integer(-24, 24, 4), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Integer(-24, 24, 5), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Integer(-24, 24, 7), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Integer(-24, 24, 9), "4th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Integer(-24, 24, 11), "5th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Integer(-24, 24, 12), "6th Note", "Set the number of semitones up or down this note should be pitched.")
|
||||
new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0, 4, "launchParty/popper_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/popper_note"), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/popper_note"), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 9, 0, 4, "launchParty/popper_note"), "4th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 11, 0, 4, "launchParty/popper_note"), "5th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 0, 4, "launchParty/popper_note"), "6th Note", "Set the number of semitones up or down this note should be pitched.")
|
||||
}
|
||||
},
|
||||
new GameAction("bell", "Bell")
|
||||
@ -49,15 +49,15 @@ namespace HeavenStudio.Games.Loaders
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."),
|
||||
new Param("note1", new EntityTypes.Integer(-24, 24, 0), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Integer(-24, 24, 2), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Integer(-24, 24, 4), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Integer(-24, 24, 5), "4th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Integer(-24, 24, 7), "5th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Integer(-24, 24, 9), "6th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note7", new EntityTypes.Integer(-24, 24, 11), "7th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note8", new EntityTypes.Integer(-24, 24, 12), "8th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note9", new EntityTypes.Integer(-24, 24, 0), "9th Note (Launch)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/bell_note"), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 0, 4, "launchParty/bell_short"), "2nd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 0, 4, "launchParty/bell_short"), "3rd Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/bell_short"), "4th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/bell_short"), "5th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 9, 0, 4, "launchParty/bell_short"), "6th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note7", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 11, 0, 4, "launchParty/bell_short"), "7th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note8", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 12, 0, 4, "launchParty/bell_short"), "8th Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note9", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/bell_blast"), "9th Note (Launch)", "Set the number of semitones up or down this note should be pitched."),
|
||||
}
|
||||
},
|
||||
new GameAction("bowlingPin", "Bowling Pin")
|
||||
@ -68,21 +68,21 @@ namespace HeavenStudio.Games.Loaders
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("offset", new EntityTypes.Float(-1, 1, -1), "Spawn Offset", "Set when the rocket should rise up."),
|
||||
new Param("note1", new EntityTypes.Integer(-24, 24, 5), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Integer(-24, 24, -1), "2nd Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Integer(-24, 24, 0), "3rd Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Integer(-24, 24, -1), "4th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Integer(-24, 24, 0), "5th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Integer(-24, 24, -1), "6th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note7", new EntityTypes.Integer(-24, 24, 0), "7th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note8", new EntityTypes.Integer(-24, 24, -1), "8th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note9", new EntityTypes.Integer(-24, 24, 0), "9th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note10", new EntityTypes.Integer(-24, 24, -1), "10th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note11", new EntityTypes.Integer(-24, 24, 0), "11th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note12", new EntityTypes.Integer(-24, 24, -1), "12th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note13", new EntityTypes.Integer(-24, 24, 0), "13th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note14", new EntityTypes.Integer(-24, 24, 7), "14th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note15", new EntityTypes.Integer(-24, 24, 7), "15th Note", "The number of semitones up or down this note should be pitched")
|
||||
new Param("note1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 5, 0, 4, "launchParty/pin"), "1st Note", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "2nd Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "3rd Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note4", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "4th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note5", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "5th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note6", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "6th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note7", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "7th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note8", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "8th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note9", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "9th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note10", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "10th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note11", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "11th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note12", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 0, 4, "launchParty/flute"), "12th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note13", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 0, 4, "launchParty/flute"), "13th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note14", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/flute"), "14th Note (Flute)", "Set the number of semitones up or down this note should be pitched."),
|
||||
new Param("note15", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 7, 0, 4, "launchParty/pin"), "15th Note", "The number of semitones up or down this note should be pitched")
|
||||
}
|
||||
},
|
||||
new GameAction("posMove", "Change Launch Pad Position")
|
||||
|
@ -42,7 +42,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."),
|
||||
new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
@ -51,7 +51,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.")
|
||||
},
|
||||
},
|
||||
@ -62,8 +62,8 @@ namespace HeavenStudio.Games.Loaders
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("respond", true, "Respond", "Toggle if this guitar bend will have to be responded to by Soshi (the player)."),
|
||||
new Param("1JJ", new EntityTypes.Integer(-24, 24, 1), "Pitch Bend (JJ)", "Set how many semitones up the current riff will be pitchbent."),
|
||||
new Param("1S", new EntityTypes.Integer(-24, 24, 1), "Pitch Bend (Soshi)", "Set how many semitones up the current riff will be pitchbent."),
|
||||
new Param("1JJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 1), "Pitch Bend (JJ)", "Set how many semitones up the current riff will be pitchbent."),
|
||||
new Param("1S", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 1), "Pitch Bend (Soshi)", "Set how many semitones up the current riff will be pitchbent."),
|
||||
},
|
||||
},
|
||||
new GameAction("prepare", "Prepare")
|
||||
@ -126,21 +126,21 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new Param("moveCamera", true, "Move Camera", "Toggle if the camera should move to the middle."),
|
||||
new Param("JJ1", Rockers.PremadeSamples.ChordG5, "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."),
|
||||
new Param("pJJ1", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("JJ2", Rockers.PremadeSamples.ChordG5, "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."),
|
||||
new Param("pJJ2", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("JJ3", Rockers.PremadeSamples.ChordG5, "Premade Sample 3 (JJ)", "Set the sample to use for the 3rd riff."),
|
||||
new Param("pJJ3", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("JJ4", Rockers.PremadeSamples.ChordA, "Premade Sample 4 (JJ)", "Set the sample to use for the final riff."),
|
||||
new Param("pJJ4", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 4 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ4", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 4 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S1", Rockers.PremadeSamples.ChordG, "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."),
|
||||
new Param("pS1", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S2", Rockers.PremadeSamples.ChordG, "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."),
|
||||
new Param("pS2", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S3", Rockers.PremadeSamples.ChordG, "Premade Sample 3 (Soshi)", "Set the sample to use for the 3rd riff."),
|
||||
new Param("pS3", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S4", Rockers.PremadeSamples.ChordA, "Premade Sample 4 (Soshi)", "Set the sample to use for the final riff."),
|
||||
new Param("pS4", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS4", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
}
|
||||
},
|
||||
new GameAction("lastOne", "Last One!")
|
||||
@ -172,17 +172,17 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new Param("moveCamera", true, "Move Camera", "Toggle if the camera should move to the middle."),
|
||||
new Param("JJ1", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."),
|
||||
new Param("pJJ1", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("JJ2", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."),
|
||||
new Param("pJJ2", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("JJ3", Rockers.PremadeSamples.ChordAsus4, "Premade Sample 3 (JJ)", "Set the sample to use for the final riff."),
|
||||
new Param("pJJ3", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pJJ3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S1", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."),
|
||||
new Param("pS1", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS1", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S2", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."),
|
||||
new Param("pS2", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS2", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("S3", Rockers.PremadeSamples.ChordDmaj9, "Premade Sample 3 (Soshi)", "Set the sample to use for the final riff."),
|
||||
new Param("pS3", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pS3", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
}
|
||||
},
|
||||
new GameAction("count", "Count")
|
||||
@ -247,7 +247,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."),
|
||||
new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
@ -256,7 +256,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.")
|
||||
}
|
||||
},
|
||||
@ -272,7 +272,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5JJ", new EntityTypes.Integer(-1, 24, 0), "B3 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6JJ", new EntityTypes.Integer(-1, 24, 0), "E4 String (JJ)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleJJ", Rockers.PremadeSamples.None, "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleJJ", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcJJ", false, "Glee Club Guitar (JJ)", "Toggle if JJ should use the same guitar as in the Glee Club guitar lessons in DS."),
|
||||
new Param("1S", new EntityTypes.Integer(-1, 24, 0), "E2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("2S", new EntityTypes.Integer(-1, 24, 0), "A2 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
@ -281,7 +281,7 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("5S", new EntityTypes.Integer(-1, 24, 0), "B3 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("6S", new EntityTypes.Integer(-1, 24, 0), "E4 String (Soshi)", "Set how many semitones up the current string will be pitched. If this is left at -1, this string will not play."),
|
||||
new Param("sampleS", Rockers.PremadeSamples.None, "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-24, 24, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("pitchSampleS", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
|
||||
new Param("gcS", false, "Glee Club Guitar (Soshi)", "Toggle if Soshi should use the same guitar as in the Glee Club guitar lessons in DS.")
|
||||
}
|
||||
},
|
||||
|
@ -19,6 +19,7 @@ namespace HeavenStudio.Editor
|
||||
[Header("Property Prefabs")]
|
||||
[SerializeField] private GameObject IntegerP;
|
||||
[SerializeField] private GameObject FloatP;
|
||||
[SerializeField] private GameObject NoteP;
|
||||
[SerializeField] private GameObject ButtonP;
|
||||
[SerializeField] private GameObject BooleanP;
|
||||
[SerializeField] private GameObject DropdownP;
|
||||
@ -44,6 +45,7 @@ namespace HeavenStudio.Editor
|
||||
PropertyPrefabs = new() {
|
||||
{ typeof(Integer), IntegerP },
|
||||
{ typeof(Float), FloatP },
|
||||
{ typeof(Note), NoteP },
|
||||
{ typeof(Dropdown), DropdownP },
|
||||
{ typeof(Button), ButtonP },
|
||||
{ typeof(Color), ColorP },
|
||||
|
@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using HeavenStudio;
|
||||
using HeavenStudio.Common;
|
||||
using HeavenStudio.Editor;
|
||||
using HeavenStudio.Util;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class NotePropertyPrefab : NumberPropertyPrefab
|
||||
{
|
||||
public TMP_Text noteLabel;
|
||||
|
||||
private Sound previewAudioSource;
|
||||
private EntityTypes.Note note;
|
||||
private int offsetFromC;
|
||||
|
||||
public override void SetProperties(string propertyName, object type, string caption)
|
||||
{
|
||||
base.SetProperties(propertyName, type, caption);
|
||||
|
||||
note = (EntityTypes.Note)type;
|
||||
|
||||
slider.minValue = note.min;
|
||||
slider.maxValue = note.max;
|
||||
|
||||
slider.wholeNumbers = true;
|
||||
|
||||
offsetFromC = 3 - note.sampleNote;
|
||||
|
||||
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC;
|
||||
_defaultValue = slider.value;
|
||||
|
||||
inputField.text = slider.value.ToString();
|
||||
noteLabel.text = GetNoteText(note, (int)slider.value + offsetFromC);
|
||||
|
||||
slider.onValueChanged.AddListener(
|
||||
_ =>
|
||||
{
|
||||
int trueSemitones = (int)slider.value + offsetFromC;
|
||||
inputField.text = slider.value.ToString();
|
||||
parameterManager.entity[propertyName] = trueSemitones;
|
||||
if (slider.value != _defaultValue)
|
||||
{
|
||||
this.caption.text = _captionText + "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.caption.text = _captionText;
|
||||
}
|
||||
|
||||
noteLabel.text = GetNoteText(note, trueSemitones);
|
||||
|
||||
PlayPreview(note, trueSemitones);
|
||||
}
|
||||
);
|
||||
|
||||
inputField.onSelect.AddListener(
|
||||
_ =>
|
||||
Editor.instance.editingInputField = true
|
||||
);
|
||||
|
||||
inputField.onEndEdit.AddListener(
|
||||
_ =>
|
||||
{
|
||||
int trueSemitones = (int)slider.value + offsetFromC;
|
||||
|
||||
slider.value = Convert.ToSingle(inputField.text);
|
||||
parameterManager.entity[propertyName] = trueSemitones;
|
||||
Editor.instance.editingInputField = false;
|
||||
if (slider.value != _defaultValue)
|
||||
{
|
||||
this.caption.text = _captionText + "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.caption.text = _captionText;
|
||||
}
|
||||
|
||||
noteLabel.text = GetNoteText(note, trueSemitones);
|
||||
|
||||
PlayPreview(note, trueSemitones);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public void OnSelectSliderHandle()
|
||||
{
|
||||
PlayPreview(note, (int)slider.value + offsetFromC);
|
||||
}
|
||||
|
||||
private void PlayPreview(EntityTypes.Note note, int currentSemitones)
|
||||
{
|
||||
if (note.sampleName.Equals("") || !PersistentDataManager.gameSettings.previewNoteSounds) return;
|
||||
|
||||
if (previewAudioSource != null)
|
||||
{
|
||||
previewAudioSource.Stop(true);
|
||||
previewAudioSource = null;
|
||||
}
|
||||
|
||||
float pitch = SoundByte.GetPitchFromSemiTones(currentSemitones, true);
|
||||
previewAudioSource = SoundByte.PlayOneShotGame(note.sampleName, pitch: pitch, volume: 0.75f, forcePlay: true, ignoreConductorPause: true);
|
||||
}
|
||||
|
||||
private static readonly string[] notes = { "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" };
|
||||
|
||||
private static string GetNoteText(EntityTypes.Note note, int currentSemitones)
|
||||
{
|
||||
int noteIndex = (note.sampleNote + currentSemitones) % 12;
|
||||
if (noteIndex < 0)
|
||||
{
|
||||
noteIndex += 12;
|
||||
}
|
||||
|
||||
int octaveOffset = (note.sampleNote + currentSemitones) / 12;
|
||||
int octave = note.sampleOctave + octaveOffset;
|
||||
|
||||
if ((note.sampleNote + currentSemitones) % 12 < 0)
|
||||
{
|
||||
octave--;
|
||||
}
|
||||
|
||||
return notes[noteIndex] + octave;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d8108e287994e145a3ca0b3d19e40c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -14,8 +14,8 @@ namespace HeavenStudio.Editor
|
||||
[Space(10)]
|
||||
public Slider slider;
|
||||
public TMP_InputField inputField;
|
||||
|
||||
private float _defaultValue;
|
||||
|
||||
protected float _defaultValue;
|
||||
|
||||
public override void SetProperties(string propertyName, object type, string caption)
|
||||
{
|
||||
@ -70,7 +70,7 @@ namespace HeavenStudio.Editor
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
case EntityTypes.Float fl:
|
||||
slider.minValue = fl.min;
|
||||
slider.maxValue = fl.max;
|
||||
@ -119,6 +119,8 @@ namespace HeavenStudio.Editor
|
||||
);
|
||||
break;
|
||||
|
||||
case EntityTypes.Note: break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(
|
||||
nameof(type), type, "I don't know how to make a property of this type!"
|
||||
@ -135,7 +137,7 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case EntityTypes.Integer integer:
|
||||
case EntityTypes.Integer or EntityTypes.Note:
|
||||
slider.onValueChanged.AddListener(_ => UpdateCollapse((int)slider.value));
|
||||
inputField.onEndEdit.AddListener(_ => UpdateCollapse((int)slider.value));
|
||||
|
||||
@ -143,19 +145,41 @@ namespace HeavenStudio.Editor
|
||||
|
||||
break;
|
||||
|
||||
case EntityTypes.Float fl:
|
||||
case EntityTypes.Float:
|
||||
slider.onValueChanged.AddListener(newVal => UpdateCollapse((float)Math.Round(newVal, 4)));
|
||||
inputField.onEndEdit.AddListener(_ => UpdateCollapse(slider.value));
|
||||
|
||||
UpdateCollapse((float)Math.Round(slider.value, 4));
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(
|
||||
nameof(type), type, "I don't know how to make a property of this type!"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly string[] notes = {
|
||||
"A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#"
|
||||
};
|
||||
|
||||
private static string GetNoteText(EntityTypes.Note note, int newSemitones)
|
||||
{
|
||||
int noteIndex = (note.sampleNote + newSemitones) % 12;
|
||||
if (noteIndex < 0) {
|
||||
noteIndex += 12;
|
||||
}
|
||||
|
||||
int octaveOffset = (note.sampleNote + newSemitones) / 12;
|
||||
int octave = note.sampleOctave + octaveOffset;
|
||||
|
||||
if ((note.sampleNote + newSemitones) % 12 < 0)
|
||||
{
|
||||
octave--;
|
||||
}
|
||||
|
||||
return notes[noteIndex] + octave;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
@ -890,6 +890,7 @@ namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
object returnVal = ep[i].parameter switch {
|
||||
EntityTypes.Integer intVal => intVal.val,
|
||||
EntityTypes.Note noteVal => noteVal.val,
|
||||
EntityTypes.Float floatVal => floatVal.val,
|
||||
EntityTypes.Button buttonVal => buttonVal.defaultLabel,
|
||||
EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal),
|
||||
|
@ -252,6 +252,8 @@ namespace HeavenStudio
|
||||
e.dynamicData.Add(param.propertyName, ((EntityTypes.Integer)param.parameter).val);
|
||||
else if (type == typeof(EntityTypes.Float))
|
||||
e.dynamicData.Add(param.propertyName, ((EntityTypes.Float)param.parameter).val);
|
||||
else if (type == typeof(EntityTypes.Note))
|
||||
e.dynamicData.Add(param.propertyName, ((EntityTypes.Note)param.parameter).val);
|
||||
else if (type.IsEnum)
|
||||
e.dynamicData.Add(param.propertyName, (int)param.parameter);
|
||||
else
|
||||
@ -263,7 +265,7 @@ namespace HeavenStudio
|
||||
{
|
||||
try
|
||||
{
|
||||
if (type == typeof(EntityTypes.Integer))
|
||||
if (type == typeof(EntityTypes.Integer) || type == typeof(EntityTypes.Note))
|
||||
e.dynamicData[param.propertyName] = (int)e[param.propertyName];
|
||||
else if (type == typeof(EntityTypes.Float))
|
||||
e.dynamicData[param.propertyName] = (float)e[param.propertyName];
|
||||
@ -295,6 +297,8 @@ namespace HeavenStudio
|
||||
// use default value
|
||||
if (type == typeof(EntityTypes.Integer))
|
||||
e.dynamicData[param.propertyName] = ((EntityTypes.Integer)param.parameter).val;
|
||||
else if (type == typeof(EntityTypes.Note))
|
||||
e.dynamicData[param.propertyName] = ((EntityTypes.Note)param.parameter).val;
|
||||
else if (type == typeof(EntityTypes.Float))
|
||||
e.dynamicData[param.propertyName] = ((EntityTypes.Float)param.parameter).val;
|
||||
else if (type.IsEnum && param.propertyName != "ease")
|
||||
@ -1247,7 +1251,7 @@ namespace HeavenStudio
|
||||
new((x, e) => (bool)x, "semitones", "cents"),
|
||||
new((x, e) => !(bool)x, "pitch"),
|
||||
}),
|
||||
new Param("semitones", new EntityTypes.Integer(-24, 24, 0), "Semitones", "The semitones of the sfx."),
|
||||
new Param("semitones", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitones", "The semitones of the sfx."),
|
||||
new Param("cents", new EntityTypes.Integer(-100, 100, 0), "Cents", "The cents of the sfx."),
|
||||
new Param("pitch", new EntityTypes.Float(0, 5, 1), "Pitch", "The pitch of the sfx."),
|
||||
new Param("volume", new EntityTypes.Float(0, 2, 1), "Volume", "The volume of the sfx."),
|
||||
|
@ -132,7 +132,8 @@ namespace HeavenStudio.Common
|
||||
bool letterboxFxEnable = true,
|
||||
int editorScale = 0,
|
||||
bool scaleWScreenSize = false,
|
||||
bool showParamTooltips = true
|
||||
bool showParamTooltips = true,
|
||||
bool previewNoteSounds = true
|
||||
)
|
||||
{
|
||||
this.showSplash = showSplash;
|
||||
@ -154,6 +155,7 @@ namespace HeavenStudio.Common
|
||||
this.editorScale = editorScale;
|
||||
this.scaleWScreenSize = scaleWScreenSize;
|
||||
this.showParamTooltips = showParamTooltips;
|
||||
this.previewNoteSounds = previewNoteSounds;
|
||||
|
||||
this.perfectChallengeType = perfectChallengeType;
|
||||
this.isMedalOn = isMedalOn;
|
||||
@ -194,6 +196,7 @@ namespace HeavenStudio.Common
|
||||
public int editorScale;
|
||||
public bool scaleWScreenSize;
|
||||
public bool showParamTooltips;
|
||||
public bool previewNoteSounds;
|
||||
// public bool showCornerTooltips;
|
||||
|
||||
// Gameplay Settings
|
||||
|
18
Assets/Scripts/UI/LeftClickEvent.cs
Normal file
18
Assets/Scripts/UI/LeftClickEvent.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LeftClickEvent : Selectable
|
||||
{
|
||||
public UnityEvent OnLeftClick;
|
||||
public override void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
base.OnPointerDown(eventData);
|
||||
|
||||
if(eventData.button != PointerEventData.InputButton.Left) return;
|
||||
OnLeftClick?.Invoke();
|
||||
}
|
||||
}
|
11
Assets/Scripts/UI/LeftClickEvent.cs.meta
Normal file
11
Assets/Scripts/UI/LeftClickEvent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e365c37b20b7e15458fab7eef4b17449
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -13,6 +13,7 @@ namespace HeavenStudio.Editor
|
||||
[SerializeField] Button editorScaleDecre, editorScaleIncre;
|
||||
[SerializeField] Toggle scaleWSS;
|
||||
[SerializeField] Toggle paramTooltipsToggle;
|
||||
[SerializeField] Toggle previewNoteSoundsToggle;
|
||||
// [SerializeField] Toggle cornerTooltipsToggle;
|
||||
|
||||
private void Start()
|
||||
@ -21,6 +22,7 @@ namespace HeavenStudio.Editor
|
||||
discordRPCCheckbox.isOn = PersistentDataManager.gameSettings.discordRPCEnable;
|
||||
scaleWSS.isOn = PersistentDataManager.gameSettings.scaleWScreenSize;
|
||||
paramTooltipsToggle.isOn = PersistentDataManager.gameSettings.showParamTooltips;
|
||||
previewNoteSoundsToggle.isOn = PersistentDataManager.gameSettings.previewNoteSounds;
|
||||
|
||||
SetDecreIncreInteractable();
|
||||
}
|
||||
@ -61,6 +63,11 @@ namespace HeavenStudio.Editor
|
||||
PersistentDataManager.gameSettings.showParamTooltips = paramTooltipsToggle.isOn;
|
||||
}
|
||||
|
||||
public void OnPreviewNoteSoundsChanged()
|
||||
{
|
||||
PersistentDataManager.gameSettings.previewNoteSounds = previewNoteSoundsToggle.isOn;
|
||||
}
|
||||
|
||||
// public void OnCornerTooltipsChanged()
|
||||
// {
|
||||
// PersistentDataManager.gameSettings.showParamTooltips = cornerTooltipsToggle.isOn;
|
||||
|
@ -22,7 +22,29 @@ namespace HeavenStudio
|
||||
this.max = max;
|
||||
}
|
||||
}
|
||||
|
||||
public struct Note
|
||||
{
|
||||
public static int maxSemitones = 36;
|
||||
public int min;
|
||||
public int val;
|
||||
public int max;
|
||||
|
||||
public int sampleNote;
|
||||
public int sampleOctave;
|
||||
public string sampleName;
|
||||
|
||||
public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 0, string sampleName = "")
|
||||
{
|
||||
this.min = min;
|
||||
this.val = val;
|
||||
this.max = max;
|
||||
this.sampleNote = sampleNote;
|
||||
this.sampleOctave = sampleOctave;
|
||||
this.sampleName = sampleName;
|
||||
}
|
||||
}
|
||||
|
||||
public struct Float
|
||||
{
|
||||
public float min;
|
||||
|
@ -24,6 +24,7 @@ namespace HeavenStudio.Util
|
||||
private AudioSource audioSource;
|
||||
private Conductor cond;
|
||||
|
||||
public bool ignoreConductorPause = false;
|
||||
|
||||
private double startTime;
|
||||
|
||||
@ -114,7 +115,7 @@ namespace HeavenStudio.Util
|
||||
double dspTime = AudioSettings.dspTime;
|
||||
if (!(available || played))
|
||||
{
|
||||
if (!(cond.isPlaying || cond.isPaused))
|
||||
if (!ignoreConductorPause && !(cond.isPlaying || cond.isPaused))
|
||||
{
|
||||
GameManager.instance.SoundObjects.Release(this);
|
||||
return;
|
||||
@ -171,7 +172,7 @@ namespace HeavenStudio.Util
|
||||
|
||||
if (played)
|
||||
{
|
||||
if (!(cond.isPlaying || cond.isPaused))
|
||||
if (!ignoreConductorPause && !(cond.isPlaying || cond.isPaused))
|
||||
{
|
||||
GameManager.instance.SoundObjects.Release(this);
|
||||
return;
|
||||
@ -182,7 +183,7 @@ namespace HeavenStudio.Util
|
||||
return;
|
||||
}
|
||||
|
||||
if (cond.isPaused || cond.SongPitch == 0)
|
||||
if ((!ignoreConductorPause && cond.isPaused) || cond.SongPitch == 0)
|
||||
{
|
||||
if (!paused)
|
||||
{
|
||||
@ -233,8 +234,13 @@ namespace HeavenStudio.Util
|
||||
audioSource.UnPause();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public void Stop(bool releaseToPool = false)
|
||||
{
|
||||
if(releaseToPool && audioSource.isPlaying)
|
||||
{
|
||||
GameManager.instance.SoundObjects.Release(this);
|
||||
}
|
||||
|
||||
available = true;
|
||||
played = false;
|
||||
paused = false;
|
||||
@ -246,6 +252,7 @@ namespace HeavenStudio.Util
|
||||
loopEndBeat = -1;
|
||||
loopDone = false;
|
||||
startTime = 0;
|
||||
ignoreConductorPause = false;
|
||||
|
||||
audioSource.loop = false;
|
||||
audioSource.Stop();
|
||||
|
@ -284,7 +284,7 @@ namespace HeavenStudio.Util
|
||||
/// Unpitched, non-scheduled, non-looping sounds are played using a global One-Shot audio source that doesn't create a Sound object.
|
||||
/// Looped sounds return their created Sound object so they can be canceled after creation.
|
||||
/// </summary>
|
||||
public static Sound PlayOneShot(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, double offset = 0f)
|
||||
public static Sound PlayOneShot(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, double offset = 0f, bool ignoreConductorPause = false)
|
||||
{
|
||||
AudioClip clip = null;
|
||||
string soundName = name.Split('/')[^1];
|
||||
@ -334,6 +334,7 @@ namespace HeavenStudio.Util
|
||||
snd.volume = volume;
|
||||
snd.looping = looping;
|
||||
snd.offset = offset;
|
||||
snd.ignoreConductorPause = ignoreConductorPause;
|
||||
snd.Play();
|
||||
|
||||
return snd;
|
||||
@ -355,7 +356,7 @@ namespace HeavenStudio.Util
|
||||
/// <summary>
|
||||
/// Schedules a sound to be played at a specific time in seconds.
|
||||
/// </summary>
|
||||
public static Sound PlayOneShotScheduled(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, string game = null)
|
||||
public static Sound PlayOneShotScheduled(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, string game = null, bool ignoreConductorPause = false)
|
||||
{
|
||||
Sound snd = GetAvailableScheduledSound();
|
||||
AudioClip clip = null;
|
||||
@ -405,6 +406,7 @@ namespace HeavenStudio.Util
|
||||
|
||||
snd.scheduled = true;
|
||||
snd.scheduledTime = targetTime;
|
||||
snd.ignoreConductorPause = ignoreConductorPause;
|
||||
snd.Play();
|
||||
|
||||
return snd;
|
||||
@ -415,13 +417,13 @@ namespace HeavenStudio.Util
|
||||
/// Unpitched, non-scheduled, non-looping sounds are played using a global One-Shot audio source that doesn't create a Sound object.
|
||||
/// Looped sounds return their created Sound object so they can be canceled after creation.
|
||||
/// </summary>
|
||||
public static Sound PlayOneShotGame(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, double offset = 0f)
|
||||
public static Sound PlayOneShotGame(string name, double beat = -1, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, double offset = 0f, bool ignoreConductorPause = false)
|
||||
{
|
||||
string gameName = name.Split('/')[0];
|
||||
var inf = GameManager.instance.GetGameInfo(gameName);
|
||||
if (GameManager.instance.currentGame == gameName || forcePlay)
|
||||
{
|
||||
return PlayOneShot($"games/{name}", beat, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, offset);
|
||||
return PlayOneShot($"games/{name}", beat, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, offset, ignoreConductorPause);
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -431,13 +433,13 @@ namespace HeavenStudio.Util
|
||||
/// Schedules a sound to be played at a specific time in seconds.
|
||||
/// Audio clip is fetched from minigame resources
|
||||
/// </summary>
|
||||
public static Sound PlayOneShotScheduledGame(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false)
|
||||
public static Sound PlayOneShotScheduledGame(string name, double targetTime, float pitch = 1f, float volume = 1f, bool looping = false, bool forcePlay = false, bool ignoreConductorPause = false)
|
||||
{
|
||||
string gameName = name.Split('/')[0];
|
||||
var inf = GameManager.instance.GetGameInfo(gameName);
|
||||
if (GameManager.instance.currentGame == gameName || forcePlay)
|
||||
{
|
||||
return PlayOneShotScheduled($"games/{name}", targetTime, pitch, volume, looping, inf.usesAssetBundle ? gameName : null);
|
||||
return PlayOneShotScheduled($"games/{name}", targetTime, pitch, volume, looping, inf.usesAssetBundle ? gameName : null, ignoreConductorPause);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user