mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:17: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
@ -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."),
|
||||
|
Reference in New Issue
Block a user