Updates to note paramaters + some additional sound fixes (for r2) (#834)

* Note param stuff + some other fixes

* Stuff just for r2
This commit is contained in:
EpicGamer2469 2024-04-07 21:18:51 -05:00 committed by GitHub
parent 471a26a92b
commit bef6fb2bbb
30 changed files with 765 additions and 360 deletions

View File

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 32a60be2b7dcb764a91b761a6a3d3022
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 129f3ac5047e96247955adaff500b692
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -30,13 +30,13 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6158244586633658522}
m_RootOrder: 3
m_Father: {fileID: 8117968045240430172}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 5, y: 0}
m_SizeDelta: {x: 45.77002, y: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 47, y: 23.44}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &6991969534857496180
CanvasRenderer:
@ -100,7 +100,7 @@ MonoBehaviour:
m_fontSizeMin: 3
m_fontSizeMax: 20
m_fontStyle: 0
m_HorizontalAlignment: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
@ -137,6 +137,208 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4464354052749239616
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3080040525156679747}
- component: {fileID: 7690655211411837336}
- component: {fileID: 2364948491564333022}
m_Layer: 5
m_Name: Flat Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3080040525156679747
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4464354052749239616}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8117968045240430172}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 47, y: 16.41}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &7690655211411837336
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4464354052749239616}
m_CullTransparentMesh: 1
--- !u!114 &2364948491564333022
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4464354052749239616}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: (Db4)
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4292730333
m_fontColor: {r: 0.8679245, g: 0.8679245, b: 0.8679245, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 14
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 3
m_fontSizeMax: 14
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5263626353470047177
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8117968045240430172}
- component: {fileID: 7498406572278276061}
m_Layer: 5
m_Name: Note Label Container
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8117968045240430172
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5263626353470047177}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 985107624212317837}
- {fileID: 3080040525156679747}
m_Father: {fileID: 6158244586633658522}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 47, y: 40}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &7498406572278276061
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5263626353470047177}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 3
m_Spacing: -3
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &6158244585101124322
GameObject:
m_ObjectHideFlags: 0
@ -247,6 +449,7 @@ MonoBehaviour:
slider: {fileID: 6158244586633658523}
inputField: {fileID: 6158244586579295859}
noteLabel: {fileID: 7386330486652876290}
flatLabel: {fileID: 2364948491564333022}
--- !u!1 &6158244585406534007
GameObject:
m_ObjectHideFlags: 0
@ -623,6 +826,35 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e365c37b20b7e15458fab7eef4b17449, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6158244586092265564}
OnLeftClick:
m_PersistentCalls:
m_Calls:
@ -1098,7 +1330,7 @@ RectTransform:
- {fileID: 6158244585994109202}
- {fileID: 6158244585657951267}
- {fileID: 6158244585562834553}
- {fileID: 985107624212317837}
- {fileID: 8117968045240430172}
m_Father: {fileID: 6158244585233792465}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1201,6 +1433,35 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e365c37b20b7e15458fab7eef4b17449, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
OnLeftClick:
m_PersistentCalls:
m_Calls: []

View File

@ -26,7 +26,7 @@ namespace HeavenStudio.Games.Scripts_BoardMeeting
{
if (rollLoop != null)
{
rollLoop.Stop();
rollLoop.KillLoop();
}
}

View File

@ -48,11 +48,11 @@ namespace HeavenStudio.Games.Loaders
new((x, _) => (int)x == 1, new string[] { "variationPa"}),
new((x, _) => (int)x == 2, new string[] { "variationPa_n"}),
}),
new Param("variationPan", BonOdori.variationPan.PanC, "Pan Type", "Set the variation of the voice line."),
new Param("variationPa", BonOdori.variationPa.PaG, "Pa Type", "Set the variation of the voice line."),
new Param("variationPa_n", BonOdori.variationPa_n.Pa_nA , "Pa-n Type", "Set the variation of the voice line."),
new Param("variationPan", new EntityTypes.NoteSampleDropdown(BonOdori.variationPan.PanC, BonOdori.GetSample, "semitone"), "Pan Type", "Set the variation of the voice line."),
new Param("variationPa", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa.PaG, BonOdori.GetSample, "semitone"), "Pa Type", "Set the variation of the voice line."),
new Param("variationPa_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa_n.Pa_nA, BonOdori.GetSample, "semitone") , "Pa-n Type", "Set the variation of the voice line."),
new Param("clapType", BonOdori.typeClap.SideClap, "Clap Type", "Set the type of clap."),
new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."),
new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."),
},
},
@ -71,10 +71,10 @@ namespace HeavenStudio.Games.Loaders
new((x, _) => (int)x == 1, new string[] { "variationDo"}),
new((x, _) => (int)x == 2, new string[] { "variationDo_n"}),
}),
new Param("variationDon", BonOdori.variationDon.DonA, "Don Type", "Set the variation of the voice line."),
new Param("variationDo", BonOdori.variationDo.DoC, "Do Type", "Set the variation of the voice line."),
new Param("variationDo_n", BonOdori.variationDo_n.Do_nA, "Do-n Type", "Set the variation of the voice line."),
new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."),
new Param("variationDon", new EntityTypes.NoteSampleDropdown(BonOdori.variationDon.DonA, BonOdori.GetSample, "semitone"), "Don Type", "Set the variation of the voice line."),
new Param("variationDo", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo.DoC, BonOdori.GetSample, "semitone"), "Do Type", "Set the variation of the voice line."),
new Param("variationDo_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo_n.Do_nA, BonOdori.GetSample, "semitone"), "Do-n Type", "Set the variation of the voice line."),
new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."),
},
},
@ -251,6 +251,29 @@ namespace HeavenStudio.Games
DoG = 1
}
public static readonly Dictionary<object, NoteSample> NoteSamples = new()
{
{ variationPan.PanC, new("bonOdori/pan1", 3, 4) },
{ variationPan.PanE, new("bonOdori/pan2", 7, 4) },
{ variationPan.PanA, new("bonOdori/pan3", 0, 4) },
{ variationPa_n.Pa_nA, new("bonOdori/pa_n1", 0, 4) },
{ variationPa_n.Pa_nC, new("bonOdori/pa_n2", 3, 4) },
{ variationPa.PaG, new("bonOdori/pa1", 7, 4) },
{ variationDon.DonA, new("bonOdori/don1", 0, 4) },
{ variationDon.DonD, new("bonOdori/don2", 5, 4) },
{ variationDon.DonC, new("bonOdori/don3", 3, 4) },
{ variationDon.DonG, new("bonOdori/don4", 10, 4) },
{ variationDo_n.Do_nA, new("bonOdori/do_n1", 0, 4) },
{ variationDo_n.Do_nG, new("bonOdori/do_n2", 7, 4) },
{ variationDo.DoC, new("bonOdori/do1", 3, 4) },
{ variationDo.DoG, new("bonOdori/do2", 7, 4) }
};
public static NoteSample GetSample(object sampleEnum)
{
return NoteSamples[sampleEnum];
}
public static BonOdori instance { get; set; }
public void Awake()

View File

@ -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.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 Param("note1", new EntityTypes.Note(0, 3, 4, "builtToScaleDS/Piano"), "1st note", "Set the number of semitones up or down this note should be pitched."),
new Param("note2", new EntityTypes.Note(2, 3, 4, "builtToScaleDS/Piano"), "2nd note", "Set the number of semitones up or down this note should be pitched."),
new Param("note3", new EntityTypes.Note(4, 3, 4, "builtToScaleDS/Piano"), "3rd note", "Set the number of semitones up or down this note should be pitched."),
new Param("note4", new EntityTypes.Note(5, 3, 4, "builtToScaleDS/Piano"), "4th note", "Set the number of semitones up or down this note should be pitched."),
new Param("note5", new EntityTypes.Note(7, 3, 4, "builtToScaleDS/Piano"), "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(12, 3, 4, "builtToScaleDS/Piano"), "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.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 Param("type", new EntityTypes.Note(0, 3, 4, "builtToScaleDS/Piano"), "Semitones", "Set the number of semitones up or down this note should be pitched.")
},
},
new GameAction("color", "Color Palette")

View File

@ -848,7 +848,7 @@ namespace HeavenStudio.Games
Conductor.instance.FadeMinigameVolume(0, 0, 1);
drumTempVolume = 1;
if (isWhirringPlaying) { whirring.Stop(); isWhirringPlaying = false; }
if (isWhirringPlaying) { whirring.KillLoop(); isWhirringPlaying = false; }
}
//make sure music volume resetting can be remembered between blastoffs

View File

@ -74,7 +74,7 @@ namespace HeavenStudio.Games.Scripts_GleeClub
anim.SetBool("Mega", true);
anim.Play("OpenMouth", 0, 0);
shouldMegaClose = true;
if (currentSound != null) currentSound.Stop();
if (currentSound != null) currentSound.KillLoop();
SoundByte.PlayOneShotGame("gleeClub/LoudWailStart");
currentSound = SoundByte.PlayOneShotGame("gleeClub/LoudWailLoop", -1, currentPitch, 1f, true);
BeatAction.New(game, new List<BeatAction.Action>()
@ -95,7 +95,7 @@ namespace HeavenStudio.Games.Scripts_GleeClub
anim.SetBool("Mega", false);
shouldMegaClose = false;
anim.Play("OpenMouth", 0, 0);
if (currentSound != null) currentSound.Stop();
if (currentSound != null) currentSound.KillLoop();
currentSound = SoundByte.PlayOneShotGame("gleeClub/WailLoop", -1, currentPitch, 1f, true);
}
@ -104,7 +104,8 @@ namespace HeavenStudio.Games.Scripts_GleeClub
if (!singing || disappeared) return;
singing = false;
anim.Play(mega ? "MegaCloseMouth" : "CloseMouth", 0, 0);
if (currentSound != null) currentSound.Stop();
if (currentSound != null) currentSound.KillLoop();
currentSound = null;
if (playSound) SoundByte.PlayOneShotGame("gleeClub/StopWail");
}
}

View File

@ -26,17 +26,17 @@ namespace HeavenStudio.Games.Loaders
resizable = true,
parameters = new List<Param>()
{
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("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -5, 4, 5, "gleeClub/WailLoop"), "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/WailLoop"), "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/WailLoop"), "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.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 Param("semiTonesLeft2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "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/WailLoop"), "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/WailLoop"), "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.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("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailLoop"), "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/WailLoop"), "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/WailLoop"), "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.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 Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "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/WailLoop"), "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/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
}
},
new GameAction("presence", "Toggle Chorus Kids")

View File

@ -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.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 Param("note1", new EntityTypes.Note(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(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(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(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.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 Param("note1", new EntityTypes.Note(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(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(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(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(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(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.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 Param("note1", new EntityTypes.Note(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(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(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(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(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(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(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(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(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.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 Param("note1", new EntityTypes.Note(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(-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(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(-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(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(-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(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(-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(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(-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(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(-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(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(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(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")

View File

@ -572,7 +572,7 @@ namespace HeavenStudio.Games
if (crowdSound != null)
{
crowdSound.Stop();
crowdSound.KillLoop();
}
}
@ -588,7 +588,7 @@ namespace HeavenStudio.Games
{
if (crowdSound != null)
{
crowdSound.Stop();
crowdSound.KillLoop();
}
crowdSound = SoundByte.PlayOneShotGame("manzai/disappointed");
@ -774,7 +774,7 @@ namespace HeavenStudio.Games
if (crowdSound != null)
{
crowdSound.Stop();
crowdSound.KillLoop();
}
}
@ -782,7 +782,7 @@ namespace HeavenStudio.Games
{
if (crowdSound != null)
{
crowdSound.Stop();
crowdSound.KillLoop();
}
if (!missedWithWrongButton)

View File

@ -66,7 +66,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
tweezers.hitOnFrame++;
if (pullSound != null)
pullSound.Stop();
pullSound.KillLoop();
pluckState = -1;
}
@ -78,7 +78,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
tweezers.anim.Play("Tweezers_Idle", 0, 0);
if (pullSound != null)
pullSound.Stop();
pullSound.KillLoop();
pluckState = -1;
game.ScoreMiss();

View File

@ -35,25 +35,25 @@ namespace HeavenStudio.Games.Loaders
parameters = new List<Param>()
{
new Param("respond", true, "Respond", "Toggle if this guitar riff will have to be responded to by Soshi (the player)."),
new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 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("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 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("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 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("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 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("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 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("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "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."),
new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 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("4S", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "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.Note(-1, 24, 0, 0, 2, offsetToC: false), "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."),
new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "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.")
},
}
},
new GameAction("bend", "Bend")
{
@ -125,22 +125,22 @@ namespace HeavenStudio.Games.Loaders
parameters = new List<Param>()
{
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(-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(-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(-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(-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(-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(-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(-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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ1"), "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."),
new Param("pJJ1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ2"), "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."),
new Param("pJJ2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG5, Rockers.GetSample, "pJJ3"), "Premade Sample 3 (JJ)", "Set the sample to use for the 3rd riff."),
new Param("pJJ3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ4", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordA, Rockers.GetSample, "pJJ4"), "Premade Sample 4 (JJ)", "Set the sample to use for the final riff."),
new Param("pJJ4", new EntityTypes.Note(offsetToC: false), "Sample Semitones 4 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("S1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS1"), "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."),
new Param("pS1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("S2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS2"), "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."),
new Param("pS2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("S3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordG, Rockers.GetSample, "pS3"), "Premade Sample 3 (Soshi)", "Set the sample to use for the 3rd riff."),
new Param("pS3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("S4", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordA, Rockers.GetSample, "pS4"), "Premade Sample 4 (Soshi)", "Set the sample to use for the final riff."),
new Param("pS4", new EntityTypes.Note(offsetToC: false), "Sample Semitones 4 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
}
},
new GameAction("lastOne", "Last One!")
@ -171,18 +171,18 @@ namespace HeavenStudio.Games.Loaders
parameters = new List<Param>()
{
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(-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(-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(-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(-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(-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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ1"), "Premade Sample 1 (JJ)", "Set the sample to use for the 1st riff."),
new Param("pJJ1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ2"), "Premade Sample 2 (JJ)", "Set the sample to use for the 2nd riff."),
new Param("pJJ2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("JJ3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordAsus4, Rockers.GetSample, "pJJ3"), "Premade Sample 3 (JJ)", "Set the sample to use for the final riff."),
new Param("pJJ3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("S1", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS1"), "Premade Sample 1 (Soshi)", "Set the sample to use for the 1st riff."),
new Param("pS1", new EntityTypes.Note(offsetToC: false), "Sample Semitones 1 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("S2", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS2"), "Premade Sample 2 (Soshi)", "Set the sample to use for the 2nd riff."),
new Param("pS2", new EntityTypes.Note(offsetToC: false), "Sample Semitones 2 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("S3", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.ChordDmaj9, Rockers.GetSample, "pS3"), "Premade Sample 3 (Soshi)", "Set the sample to use for the final riff."),
new Param("pS3", new EntityTypes.Note(offsetToC: false), "Sample Semitones 3 (Soshi)", "Set how many semitones the premade sample should be pitched up."),
}
},
new GameAction("count", "Count")
@ -240,23 +240,23 @@ namespace HeavenStudio.Games.Loaders
resizable = true,
parameters = new List<Param>()
{
new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 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("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 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("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 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("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 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("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 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("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "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."),
new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 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("4S", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "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.Note(-1, 24, 0, 0, 2, offsetToC: false), "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."),
new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "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.")
}
},
@ -265,23 +265,23 @@ namespace HeavenStudio.Games.Loaders
resizable = true,
parameters = new List<Param>()
{
new Param("1JJ", new EntityTypes.Integer(-1, 24, 0), "E2 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("2JJ", new EntityTypes.Integer(-1, 24, 0), "A2 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("3JJ", new EntityTypes.Integer(-1, 24, 0), "D3 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("4JJ", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (JJ)", "Set how many semitones the premade sample should be pitched up."),
new Param("1JJ", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "E2 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("2JJ", new EntityTypes.Note(-1, 24, 0, 0, 2, offsetToC: false), "A2 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("3JJ", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4JJ", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5JJ", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleJJ"), "Premade Sample (JJ)", "Set if this riff should use a premade sample."),
new Param("pitchSampleJJ", new EntityTypes.Note(offsetToC: false), "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."),
new Param("3S", new EntityTypes.Integer(-1, 24, 0), "D3 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("4S", new EntityTypes.Integer(-1, 24, 0), "G3 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("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(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Sample Semitones (Soshi)", "Set how many semitones the premade sample should be pitched up."),
new Param("1S", new EntityTypes.Note(-1, 24, 0, 7, 2, offsetToC: false), "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.Note(-1, 24, 0, 0, 2, offsetToC: false), "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."),
new Param("3S", new EntityTypes.Note(-1, 24, 0, 5, 3, offsetToC: false), "D3 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("4S", new EntityTypes.Note(-1, 24, 0, 10, 3, offsetToC: false), "G3 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("5S", new EntityTypes.Note(-1, 24, 0, 2, 3, offsetToC: false), "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.Note(-1, 24, 0, 7, 4, offsetToC: false), "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", new EntityTypes.NoteSampleDropdown(Rockers.PremadeSamples.None, Rockers.GetSample, "pitchSampleS"), "Premade Sample (Soshi)", "Set if this riff should use a premade sample."),
new Param("pitchSampleS", new EntityTypes.Note(offsetToC: false), "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.")
}
},
@ -341,6 +341,58 @@ namespace HeavenStudio.Games
DoremiNoteA2,
DoremiNoteE2
}
public static readonly Dictionary<object, NoteSample> NoteSamples = new()
{
{ PremadeSamples.None, new NoteSample() },
{ PremadeSamples.BendG5, new("rockers/BendG5", 10, 5) },
{ PremadeSamples.BendC6, new("rockers/BendC6", 3, 6) },
{ PremadeSamples.ChordA, new("rockers/rocker/rockerChordA", 0, 4) },
{ PremadeSamples.ChordAsus4, new("rockers/rocker/rockerChordAsus4", 0, 4) },
{ PremadeSamples.ChordBm, new("rockers/rocker/rockerChordBm", 2, 4) },
{ PremadeSamples.ChordCSharpm7, new("rockers/rocker/rockerChordC#m7", 4, 4) },
{ PremadeSamples.ChordDmaj7, new("rockers/rocker/rockerChordDmaj7", 5, 4) },
{ PremadeSamples.ChordDmaj9, new("rockers/rocker/rockerChordDmaj9", 5, 4) },
{ PremadeSamples.ChordFSharp5, new("rockers/rocker/rockerChordF#5", 9, 4) },
{ PremadeSamples.ChordG, new("rockers/rocker/rockerChordG", 10, 4) },
{ PremadeSamples.ChordG5, new("rockers/rocker/rockerChordG5", 10, 4) },
{ PremadeSamples.ChordGdim7, new("rockers/rocker/rockerChordGdim7", 10, 4) },
{ PremadeSamples.ChordGm, new("rockers/rocker/rockerChordGm", 10, 4) },
{ PremadeSamples.NoteASharp4, new("rockers/rocker/rockerNoteA#4", 1, 4) },
{ PremadeSamples.NoteA5, new("rockers/rocker/rockerNoteA5", 0, 5) },
{ PremadeSamples.PracticeChordD, new("rockers/rocker/rockerPracticeChordD", 5, 4) },
{ PremadeSamples.Remix6ChordA, new("rockers/rocker/rockerRemix6ChordA", 0, 4) },
{ PremadeSamples.Remix10ChordD, new("rockers/rocker/rockerRemix10ChordD", 5, 4) },
{ PremadeSamples.Remix10ChordFSharpm, new("rockers/rocker/rockerRemix10ChordF#m", 9, 4) },
{ PremadeSamples.DoremiChordA7, new("rockers/doremi/doremiChordA7", 0, 4) },
{ PremadeSamples.DoremiChordAm7, new("rockers/doremi/doremiChordAm7", 0, 4) },
{ PremadeSamples.DoremiChordC, new("rockers/doremi/doremiChordC", 3, 4) },
{ PremadeSamples.DoremiChordC7, new("rockers/doremi/doremiChordC7", 3, 4) },
{ PremadeSamples.DoremiChordCadd9, new("rockers/doremi/doremiChordCadd9", 3, 4) },
{ PremadeSamples.DoremiChordDm, new("rockers/doremi/doremiChordDm", 5, 4) },
{ PremadeSamples.DoremiChordDm7, new("rockers/doremi/doremiChordDm7", 5, 4) },
{ PremadeSamples.DoremiChordEm, new("rockers/doremi/doremiChordEm", 7, 4) },
{ PremadeSamples.DoremiChordF, new("rockers/doremi/doremiChordF", 8, 4) },
{ PremadeSamples.DoremiChordFadd9, new("rockers/doremi/doremiChordFadd9", 8, 4) },
{ PremadeSamples.DoremiChordFm, new("rockers/doremi/doremiChordFm", 8, 4) },
{ PremadeSamples.DoremiChordG, new("rockers/doremi/doremiChordG", 10, 4) },
{ PremadeSamples.DoremiChordG7, new("rockers/doremi/doremiChordG7", 10, 4) },
{ PremadeSamples.DoremiChordGm, new("rockers/doremi/doremiChordGm", 10, 4) },
{ PremadeSamples.DoremiChordGsus4, new("rockers/doremi/doremiChordGsus4", 10, 4) },
{ PremadeSamples.DoremiNoteA2, new("rockers/doremi/doremiNoteA2", 0, 2) },
{ PremadeSamples.DoremiNoteE2, new("rockers/doremi/doremiNoteE2", 7, 2) },
};
public static NoteSample GetSample(object sampleEnum)
{
return NoteSamples[sampleEnum];
}
public static NoteSample GetSample(int sampleIndex)
{
return NoteSamples[(PremadeSamples)sampleIndex];
}
public enum WhoMutes
{
JJ,
@ -700,7 +752,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 3, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[0], JJPitches[0]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[0]), JJPitches[0]);
}),
new BeatAction.Action(beat + 3.5f, delegate
{
@ -708,7 +760,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 4.5f, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[1], JJPitches[1]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[1]), JJPitches[1]);
}),
new BeatAction.Action(beat + 5f, delegate
{
@ -716,7 +768,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 6, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[2], JJPitches[2]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[2]), JJPitches[2]);
}),
new BeatAction.Action(beat + 6.5f, delegate
{
@ -724,15 +776,15 @@ namespace HeavenStudio.Games
}),
});
RockersInput riffComp = Instantiate(rockerInputRef, transform);
riffComp.Init(false, new int[6], beat, 3, (PremadeSamples)SoshiSamples[0], SoshiPitches[0]);
riffComp.Init(false, new int[6], beat, 3, GetSample(SoshiSamples[0]), SoshiPitches[0]);
ScheduleInput(beat, 3.5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty);
RockersInput riffComp2 = Instantiate(rockerInputRef, transform);
riffComp2.Init(false, new int[6], beat, 4.5f, (PremadeSamples)SoshiSamples[1], SoshiPitches[1]);
riffComp2.Init(false, new int[6], beat, 4.5f, GetSample(SoshiSamples[1]), SoshiPitches[1]);
ScheduleInput(beat, 5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty);
RockersInput riffComp3 = Instantiate(rockerInputRef, transform);
riffComp3.Init(false, new int[6], beat, 6, (PremadeSamples)SoshiSamples[2], SoshiPitches[2]);
riffComp3.Init(false, new int[6], beat, 6, GetSample(SoshiSamples[2]), SoshiPitches[2]);
ScheduleInput(beat, 6.5f, InputAction_TriggerDown, JustMute, MuteMiss, Empty);
}
@ -755,7 +807,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 3, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[0], JJPitches[0]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[0]), JJPitches[0]);
}),
new BeatAction.Action(beat + 4, delegate
{
@ -763,7 +815,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 4.5f, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[1], JJPitches[1]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[1]), JJPitches[1]);
}),
new BeatAction.Action(beat + 5.5f, delegate
{
@ -771,7 +823,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 6, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[2], JJPitches[2]);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[2]), JJPitches[2]);
}),
new BeatAction.Action(beat + 6.5, delegate
{
@ -779,7 +831,7 @@ namespace HeavenStudio.Games
}),
new BeatAction.Action(beat + 7, delegate
{
JJ.StrumStrings(false, new int[6], (PremadeSamples)JJSamples[3], JJPitches[3], false, true);
JJ.StrumStrings(false, new int[6], GetSample(JJSamples[3]), JJPitches[3], false, true);
}),
new BeatAction.Action(beat + 10, delegate
{
@ -787,19 +839,19 @@ namespace HeavenStudio.Games
}),
});
RockersInput riffComp = Instantiate(rockerInputRef, transform);
riffComp.Init(false, new int[6], beat, 3, (PremadeSamples)SoshiSamples[0], SoshiPitches[0]);
riffComp.Init(false, new int[6], beat, 3, GetSample(SoshiSamples[0]), SoshiPitches[0]);
ScheduleAutoplayInput(beat, 4, InputAction_BasicPress, JustMute, MuteMiss, Empty);
RockersInput riffComp2 = Instantiate(rockerInputRef, transform);
riffComp2.Init(false, new int[6], beat, 4.5f, (PremadeSamples)SoshiSamples[1], SoshiPitches[1]);
riffComp2.Init(false, new int[6], beat, 4.5f, GetSample(SoshiSamples[1]), SoshiPitches[1]);
ScheduleAutoplayInput(beat, 5.5f, InputAction_BasicPress, JustMute, MuteMiss, Empty);
RockersInput riffComp3 = Instantiate(rockerInputRef, transform);
riffComp3.Init(false, new int[6], beat, 6, (PremadeSamples)SoshiSamples[2], SoshiPitches[2]);
riffComp3.Init(false, new int[6], beat, 6, GetSample(SoshiSamples[2]), SoshiPitches[2]);
ScheduleInput(beat, 6.5f, InputAction_BasicPress, JustMute, MuteMiss, Empty);
RockersInput riffComp4 = Instantiate(rockerInputRef, transform);
riffComp4.Init(false, new int[6], beat, 7, (PremadeSamples)SoshiSamples[3], SoshiPitches[3], true);
riffComp4.Init(false, new int[6], beat, 7, GetSample(SoshiSamples[3]), SoshiPitches[3], true);
ScheduleAutoplayInput(beat, 10, InputAction_BasicPress, JustMute, MuteMiss, Empty);
}
@ -845,12 +897,12 @@ namespace HeavenStudio.Games
e["4JJ"],
e["5JJ"],
e["6JJ"],
}, (PremadeSamples)e["sampleJJ"], e["pitchSampleJJ"]);
}, GetSample(e["sampleJJ"]), e["pitchSampleJJ"]);
}));
actions.Add(new BeatAction.Action(e.beat + e.length, delegate { JJ.Mute(); }));
RockersInput riffComp = Instantiate(rockerInputRef, transform);
riffComp.Init(e["gcS"], new int[6] { e["1S"], e["2S"], e["3S"], e["4S"], e["5S"], e["6S"] }, beat, e.beat - beat,
(PremadeSamples)e["sampleS"], e["pitchSampleS"]);
GetSample(e["sampleS"]), e["pitchSampleS"]);
if (e.length <= 0.5f) ScheduleInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
else ScheduleAutoplayInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
}
@ -866,12 +918,12 @@ namespace HeavenStudio.Games
e["4JJ"],
e["5JJ"],
e["6JJ"],
}, (PremadeSamples)e["sampleJJ"], e["pitchSampleJJ"], false, true);
}, GetSample(e["sampleJJ"]), e["pitchSampleJJ"], false, true);
}));
actions.Add(new BeatAction.Action(e.beat + e.length, delegate { JJ.Mute(); }));
RockersInput riffComp = Instantiate(rockerInputRef, transform);
riffComp.Init(e["gcS"], new int[6] { e["1S"], e["2S"], e["3S"], e["4S"], e["5S"], e["6S"] }, beat, e.beat - beat,
(PremadeSamples)e["sampleS"], e["pitchSampleS"], true);
GetSample(e["sampleS"]), e["pitchSampleS"], true);
if (e.length <= 0.5f) ScheduleInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
else ScheduleAutoplayInput(beat, e.beat - beat + e.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
break;
@ -976,7 +1028,7 @@ namespace HeavenStudio.Games
public void Riff(double beat, float length, int[] pitches, bool gleeClubJJ, int sampleJJ, int sampleTonesJJ, bool noRespond)
{
JJ.StrumStrings(gleeClubJJ, pitches, (PremadeSamples)sampleJJ, sampleTonesJJ, noRespond);
JJ.StrumStrings(gleeClubJJ, pitches, GetSample(sampleJJ), sampleTonesJJ, noRespond);
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length, delegate { JJ.Mute(); })
@ -1086,7 +1138,7 @@ namespace HeavenStudio.Games
RockersInput riffComp = Instantiate(rockerInputRef, transform);
riffComp.Init(crEvent["gcS"], new int[6] { crEvent["1S"], crEvent["2S"], crEvent["3S"], crEvent["4S"], crEvent["5S"], crEvent["6S"] }, beat, relativeBeat,
(PremadeSamples)crEvent["sampleS"], crEvent["pitchSampleS"]);
GetSample(crEvent["sampleS"]), crEvent["pitchSampleS"]);
if (crEvent.length > 0.5f) ScheduleAutoplayInput(beat, relativeBeat + crEvent.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
else ScheduleInput(beat, relativeBeat + crEvent.length, InputAction_BasicPress, JustMute, MuteMiss, Empty);
}

View File

@ -11,14 +11,14 @@ namespace HeavenStudio.Games.Scripts_Rockers
private bool gleeClub;
private Rockers.PremadeSamples sample;
private NoteSample sample;
private int sampleTones;
private bool jump;
private Rockers game;
public void Init(bool gleeClub, int[] pitches, double beat, double length, Rockers.PremadeSamples sample, int sampleTones, bool jump = false)
public void Init(bool gleeClub, int[] pitches, double beat, double length, NoteSample sample, int sampleTones, bool jump = false)
{
game = Rockers.instance;
this.gleeClub = gleeClub;

View File

@ -46,13 +46,17 @@ namespace HeavenStudio.Games.Scripts_Rockers
{
if (sound != null)
{
sound.KillLoop(0);
sound.KillLoop();
}
}
if (chordSound != null)
{
chordSound.KillLoop(0);
chordSound.KillLoop();
chordSound = null;
}
stringSounds = new Sound[6];
}
public void PrepareTogether(bool forceMute = false)
@ -100,7 +104,7 @@ namespace HeavenStudio.Games.Scripts_Rockers
}
private bool lastGleeClub = false;
private Rockers.PremadeSamples lastSample;
private NoteSample lastSample;
private int lastSampleTones;
public void StrumStringsLast(bool disableStrumEffect = false, bool jump = false, bool barely = false)
@ -108,7 +112,7 @@ namespace HeavenStudio.Games.Scripts_Rockers
StrumStrings(lastGleeClub, lastPitches, lastSample, lastSampleTones, disableStrumEffect, jump, barely);
}
public void StrumStrings(bool gleeClub, int[] pitches, Rockers.PremadeSamples sample, int sampleTones, bool disableStrumEffect = false, bool jump = false, bool barely = false)
public void StrumStrings(bool gleeClub, int[] pitches, NoteSample sample, int sampleTones, bool disableStrumEffect = false, bool jump = false, bool barely = false)
{
if (strumming) return;
lastGleeClub = gleeClub;
@ -117,7 +121,7 @@ namespace HeavenStudio.Games.Scripts_Rockers
muted = false;
strumming = true;
StopSounds();
if (sample == Rockers.PremadeSamples.None)
if (sample.sample == null)
{
lastPitches = pitches;
for (int i = 0; i < pitches.Length; i++)
@ -133,48 +137,7 @@ namespace HeavenStudio.Games.Scripts_Rockers
else
{
float pitch = SoundByte.GetPitchFromSemiTones(sampleTones, true);
string soundName = sample switch
{
Rockers.PremadeSamples.None => "",
Rockers.PremadeSamples.BendG5 => "rockers/BendG5",
Rockers.PremadeSamples.BendC6 => "rockers/BendC6",
Rockers.PremadeSamples.ChordA => "rockers/rocker/rockerChordA",
Rockers.PremadeSamples.ChordAsus4 => "rockers/rocker/rockerChordAsus4",
Rockers.PremadeSamples.ChordBm => "rockers/rocker/rockerChordBm",
Rockers.PremadeSamples.ChordCSharpm7 => "rockers/rocker/rockerChordC#m7",
Rockers.PremadeSamples.ChordDmaj7 => "rockers/rocker/rockerChordDmaj7",
Rockers.PremadeSamples.ChordDmaj9 => "rockers/rocker/rockerChordDmaj9",
Rockers.PremadeSamples.ChordFSharp5 => "rockers/rocker/rockerChordF#5",
Rockers.PremadeSamples.ChordG => "rockers/rocker/rockerChordG",
Rockers.PremadeSamples.ChordG5 => "rockers/rocker/rockerChordG5",
Rockers.PremadeSamples.ChordGdim7 => "rockers/rocker/rockerChordGdim7",
Rockers.PremadeSamples.ChordGm => "rockers/rocker/rockerChordGm",
Rockers.PremadeSamples.NoteASharp4 => "rockers/rocker/rockerNoteA#4",
Rockers.PremadeSamples.NoteA5 => "rockers/rocker/rockerNoteA5",
Rockers.PremadeSamples.PracticeChordD => "rockers/rocker/rockerPracticeChordD",
Rockers.PremadeSamples.Remix6ChordA => "rockers/rocker/rockerRemix6ChordA",
Rockers.PremadeSamples.Remix10ChordD => "rockers/rocker/rockerRemix10ChordD",
Rockers.PremadeSamples.Remix10ChordFSharpm => "rockers/rocker/rockerRemix10ChordF#m",
Rockers.PremadeSamples.DoremiChordA7 => "rockers/doremi/doremiChordA7",
Rockers.PremadeSamples.DoremiChordAm7 => "rockers/doremi/doremiChordAm7",
Rockers.PremadeSamples.DoremiChordC => "rockers/doremi/doremiChordC",
Rockers.PremadeSamples.DoremiChordC7 => "rockers/doremi/doremiChordC7",
Rockers.PremadeSamples.DoremiChordCadd9 => "rockers/doremi/doremiChordCadd9",
Rockers.PremadeSamples.DoremiChordDm => "rockers/doremi/doremiChordDm",
Rockers.PremadeSamples.DoremiChordDm7 => "rockers/doremi/doremiChordDm7",
Rockers.PremadeSamples.DoremiChordEm => "rockers/doremi/doremiChordEm",
Rockers.PremadeSamples.DoremiChordF => "rockers/doremi/doremiChordF",
Rockers.PremadeSamples.DoremiChordFadd9 => "rockers/doremi/doremiChordFadd9",
Rockers.PremadeSamples.DoremiChordFm => "rockers/doremi/doremiChordFm",
Rockers.PremadeSamples.DoremiChordG => "rockers/doremi/doremiChordG",
Rockers.PremadeSamples.DoremiChordG7 => "rockers/doremi/doremiChordG7",
Rockers.PremadeSamples.DoremiChordGm => "rockers/doremi/doremiChordGm",
Rockers.PremadeSamples.DoremiChordGsus4 => "rockers/doremi/doremiChordGsus4",
Rockers.PremadeSamples.DoremiNoteA2 => "rockers/doremi/doremiNoteA2",
Rockers.PremadeSamples.DoremiNoteE2 => "rockers/doremi/doremiNoteE2",
_ => throw new System.NotImplementedException(),
};
chordSound = SoundByte.PlayOneShotGame(soundName, -1, pitch, 1, true);
chordSound = SoundByte.PlayOneShotGame(sample.sample, -1, pitch, 1, true);
}
if (together)
@ -301,7 +264,7 @@ namespace HeavenStudio.Games.Scripts_Rockers
private float GetBentPitch(float pitch, int bend)
{
float unscaledPitch = chordSound.pitch / Conductor.instance.musicSource.pitch;
float unscaledPitch = pitch / Conductor.instance.musicSource.pitch;
float bendPitch = SoundByte.GetPitchFromSemiTones(bend, false);
return (unscaledPitch * bendPitch) * Conductor.instance.musicSource.pitch;

View File

@ -239,7 +239,7 @@ namespace HeavenStudio.Games
{
evt.Disable();
}
if (_landSoundEnd != null) _landSoundEnd.Stop();
if (_landSoundEnd != null) _landSoundEnd.KillLoop();
}
private void PersistColors(double beat)

View File

@ -219,7 +219,7 @@ namespace HeavenStudio.Games
string hitSfx = "slotMonster/stop_" + (isLast && isHit && !isMiss ? "hit" : (currentButton + 1));
SoundByte.PlayOneShotGame(hitSfx, forcePlay: true);
if (isLast) {
if (rollingSound != null) rollingSound.Stop();
if (rollingSound != null) rollingSound.KillLoop();
inputsActive = false;
if (isHit && !isMiss) {
smAnim.DoScaledAnimationAsync("Win", 0.5f);
@ -235,7 +235,7 @@ namespace HeavenStudio.Games
public void StartInterval(RiqEntity si, bool autoPass, int eyeSprite, double gameSwitchBeat)
{
if (rollingSound != null) rollingSound.Stop();
if (rollingSound != null) rollingSound.KillLoop();
List<RiqEntity> slotActions = gameEntities.FindAll(e => e.datamodel == "slotMonster/slot" && e.beat >= si.beat && e.beat < si.beat + si.length);
if (slotActions.Count <= 0) return;
@ -322,7 +322,7 @@ namespace HeavenStudio.Games
private void ButtonEndMiss(PlayerActionEvent caller)
{
Debug.Log("miss i guess");
if (rollingSound != null) rollingSound.Stop();
if (rollingSound != null) rollingSound.KillLoop();
inputsActive = false;
smAnim.DoScaledAnimationAsync("Lose", 0.5f);
foreach (var anim in eyeAnims) {

View File

@ -139,9 +139,9 @@ namespace HeavenStudio.Games
tunnelLightMaterial.SetColor("_Color", Color.white);
tunnelLightMaterial.SetColor("_AddColor", Color.black);
tunnelSoundRight?.Stop();
tunnelSoundMiddle?.Stop();
tunnelSoundLeft?.Stop();
tunnelSoundRight?.KillLoop();
tunnelSoundMiddle?.KillLoop();
tunnelSoundLeft?.KillLoop();
}
}
@ -291,9 +291,9 @@ namespace HeavenStudio.Games
this.fadeDuration = fadeDuration;
conductor.FadeMinigameVolume(beat, fadeDuration, volume);
tunnelSoundRight?.Stop();
tunnelSoundMiddle?.Stop();
tunnelSoundLeft?.Stop();
tunnelSoundRight?.KillLoop();
tunnelSoundMiddle?.KillLoop();
tunnelSoundLeft?.KillLoop();
tunnelSoundRight = SoundByte.PlayOneShotGame("tunnel/tunnelRight", beat, looping: true);
tunnelSoundMiddle = SoundByte.PlayOneShotGame("tunnel/tunnelMiddle", beat + (6 / 48f), looping: true);

View File

@ -33,6 +33,8 @@ namespace HeavenStudio.Editor
private int childCountAtStart;
public Dictionary<string, EventPropertyPrefab> currentProperties = new();
public bool canDisable = true;
public static EventParameterManager instance { get; set; }
@ -47,6 +49,7 @@ namespace HeavenStudio.Editor
{ typeof(Float), FloatP },
{ typeof(Note), NoteP },
{ typeof(Dropdown), DropdownP },
{ typeof(NoteSampleDropdown), DropdownP },
{ typeof(Button), ButtonP },
{ typeof(Color), ColorP },
{ typeof(bool), BooleanP },
@ -111,26 +114,31 @@ namespace HeavenStudio.Editor
DestroyParams();
Dictionary<string, GameObject> ePrefabs = new();
for (int i = 0; i < action.parameters.Count; i++)
{
var p = action.parameters[i];
ePrefabs.Add(p.propertyName, AddParam(p.propertyName, p.parameter, p.caption, p.tooltip));
currentProperties.Add(p.propertyName, AddParam(p.propertyName, p.parameter, p.caption, p.tooltip));
}
foreach (var p in action.parameters)
{
if (p.collapseParams == null || p.collapseParams.Count == 0) continue;
EventPropertyPrefab input = ePrefabs[p.propertyName].GetComponent<EventPropertyPrefab>();
EventPropertyPrefab input = currentProperties[p.propertyName];
foreach (var c in p.collapseParams)
{
List<GameObject> collapseables = c.collapseables.Select(x => ePrefabs[x]).ToList();
List<GameObject> collapseables = c.collapseables.Select(x => currentProperties[x].gameObject).ToList();
input.propertyCollapses.Add(new EventPropertyPrefab.PropertyCollapse(collapseables, c.CollapseOn, entity));
}
input.SetCollapses(p.parameter);
}
foreach (var p in action.parameters)
{
EventPropertyPrefab prop = currentProperties[p.propertyName];
prop.PostLoadProperties(p.parameter);
}
active = true;
}
else
@ -139,7 +147,7 @@ namespace HeavenStudio.Editor
}
}
private GameObject AddParam(string propertyName, object type, string caption, string tooltip = "")
private EventPropertyPrefab AddParam(string propertyName, object type, string caption, string tooltip = "")
{
Type typeType = type.GetType();
GameObject propertyPrefab = DropdownP; // enum check is hardcoded because enums are awesome (lying)
@ -163,7 +171,7 @@ namespace HeavenStudio.Editor
EventPropertyPrefab property = input.GetComponent<EventPropertyPrefab>();
property.SetProperties(propertyName, type, caption);
return input;
return property;
}
private void DestroyParams()
@ -174,6 +182,8 @@ namespace HeavenStudio.Editor
{
Destroy(transform.GetChild(i).gameObject);
}
currentProperties.Clear();
}
}
}

View File

@ -28,6 +28,7 @@ namespace HeavenStudio.Editor
this.caption.text = _captionText = caption;
}
public virtual void SetCollapses(object type) { }
public virtual void PostLoadProperties(object type) { }
public void UpdateCollapse(object type)
{

View File

@ -20,27 +20,34 @@ namespace HeavenStudio.Editor
public Scrollbar scrollbar;
public int[] values;
private int _defaultValue;
private int defaultValue;
private int lastValue = -1;
private Array enumValues;
private object type;
private bool openedDropdown = false;
private bool setup = false;
public override void SetProperties(string propertyName, object type, string caption)
{
base.SetProperties(propertyName, type, caption);
this.type = type;
int selected = 0;
switch (type)
{
case EntityTypes.Dropdown dropdownEntity:
// entity[propertyName].ChangeValues(dropdownEntity.Values);
_defaultValue = dropdownEntity.defaultValue;
defaultValue = dropdownEntity.defaultValue;
EntityTypes.DropdownObj dropdownObj = entity[propertyName];
int size = dropdownObj.Values.Count;
values = new int[size];
for (int i = 0; i < size; i++) {
for (int i = 0; i < size; i++)
{
values[i] = i;
}
@ -53,32 +60,51 @@ namespace HeavenStudio.Editor
dropdown.ClearOptions();
dropdown.AddOptions(newValues);
dropdown.enabled = newValues.Count > 0;
dropdownObj.value = _defaultValue;
dropdownObj.value = defaultValue;
});
break;
case Enum enumEntity:
Type enumType = enumEntity.GetType();
_defaultValue = (int)type;
values = Enum.GetValues(enumType).Cast<int>().ToArray();
defaultValue = (int)type;
enumValues = Enum.GetValues(enumType);
values = enumValues.Cast<int>().ToArray();
selected = Array.FindIndex(values, val => val == (int)entity[propertyName]);
dropdown.AddOptions(Enum.GetNames(enumType).ToList());
dropdown.onValueChanged.AddListener(val => entity[propertyName] = values[val]);
break;
default:
break;
case EntityTypes.NoteSampleDropdown noteDropdown:
Type noteEnumType = noteDropdown.defaultValue.GetType();
enumValues = Enum.GetValues(noteEnumType);
values = enumValues.Cast<int>().ToArray();
selected = Array.FindIndex(values, val => val == (int)entity[propertyName]);
defaultValue = selected;
lastValue = selected;
dropdown.AddOptions(Enum.GetNames(noteEnumType).ToList());
dropdown.onValueChanged.AddListener(val =>
{
entity[propertyName] = values[val];
UpdateNoteProperty(noteDropdown, enumValues.GetValue(values[val]));
lastValue = values[val];
});
break;
default: break;
}
dropdown.value = selected;
dropdown.enabled = dropdown.options.Count > 0;
dropdown.onValueChanged.AddListener(newValue => {
this.caption.text = (newValue != _defaultValue) ? (_captionText + "*") : _captionText;
dropdown.onValueChanged.AddListener(newValue =>
{
this.caption.text = (newValue != defaultValue) ? (_captionText + "*") : _captionText;
});
}
public void ResetValue()
{
dropdown.value = _defaultValue;
dropdown.value = defaultValue;
}
public override void SetCollapses(object type)
@ -105,5 +131,44 @@ namespace HeavenStudio.Editor
openedDropdown = false;
}
}
#region Note Sample Dropdown
private void OnEnable() { // Used for when the dropdown is uncollapsed
if (setup && type is EntityTypes.NoteSampleDropdown sampleDropdown)
{
UpdateNoteProperty(sampleDropdown, enumValues.GetValue(values[entity[propertyName]]), true);
}
}
public override void PostLoadProperties(object type)
{
base.PostLoadProperties(type);
setup = true;
if (type is EntityTypes.NoteSampleDropdown sampleDropdown && gameObject.activeSelf)
{
UpdateNoteProperty(sampleDropdown, enumValues.GetValue(values[entity[propertyName]]));
}
}
private void UpdateNoteProperty(EntityTypes.NoteSampleDropdown noteDropdown, object newSampleEnum, bool forceSwitchCheck = false)
{
EventParameterManager.instance.currentProperties.TryGetValue(noteDropdown.semisProp, out var property);
if (!property) return;
NotePropertyPrefab noteProperty = (NotePropertyPrefab)property;
NoteSample sample = noteDropdown.getNoteSample(newSampleEnum);
bool switched = false;
if ((int)newSampleEnum != lastValue || forceSwitchCheck) {
// Keep the semitones value if the note is the same, otherwise reset it
if(sample.note != noteProperty.note.sampleNote) parameterManager.entity[noteDropdown.semisProp] = 0;
switched = true;
}
noteProperty.SetNote(new EntityTypes.Note(0, sample.note, sample.octave, sample.sample, offsetToC: false), switched);
}
#endregion
}
}

View File

@ -10,30 +10,17 @@ using UnityEngine;
public class NotePropertyPrefab : NumberPropertyPrefab
{
public TMP_Text noteLabel;
public TMP_Text noteLabel, flatLabel;
private Sound previewAudioSource;
private EntityTypes.Note note;
private int offsetFromC;
public EntityTypes.Note note;
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);
SetNote((EntityTypes.Note)type);
slider.onValueChanged.AddListener(
_ =>
@ -50,7 +37,7 @@ public class NotePropertyPrefab : NumberPropertyPrefab
this.caption.text = _captionText;
}
noteLabel.text = GetNoteText(note, trueSemitones);
UpdateNoteText(trueSemitones);
PlayPreview(note, trueSemitones);
}
@ -64,9 +51,10 @@ public class NotePropertyPrefab : NumberPropertyPrefab
inputField.onEndEdit.AddListener(
_ =>
{
slider.value = Convert.ToSingle(inputField.text);
int trueSemitones = (int)slider.value + offsetFromC;
slider.value = Convert.ToSingle(inputField.text);
parameterManager.entity[propertyName] = trueSemitones;
Editor.instance.editingInputField = false;
if (slider.value != _defaultValue)
@ -78,13 +66,44 @@ public class NotePropertyPrefab : NumberPropertyPrefab
this.caption.text = _captionText;
}
noteLabel.text = GetNoteText(note, trueSemitones);
UpdateNoteText(trueSemitones);
PlayPreview(note, trueSemitones);
}
);
}
public void SetNote(EntityTypes.Note note, bool playPreview = false)
{
this.note = note;
slider.minValue = note.min;
slider.maxValue = note.max;
slider.wholeNumbers = true;
offsetFromC = 0;
if(note.offsetToC)
offsetFromC = 3 - note.sampleNote;
int lastValue = (int)slider.value;
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC;
_defaultValue = slider.value;
inputField.text = slider.value.ToString();
UpdateNoteText((int)slider.value + offsetFromC);
if((int)slider.value == lastValue && playPreview)
PlayPreview(note, (int)slider.value + offsetFromC);
}
private void UpdateNoteText(int semiTones)
{
GetNoteText(note, semiTones, out var sharp, out var flat);
noteLabel.text = sharp;
flatLabel.text = flat;
}
public void OnSelectSliderHandle()
{
PlayPreview(note, (int)slider.value + offsetFromC);
@ -92,21 +111,24 @@ public class NotePropertyPrefab : NumberPropertyPrefab
private void PlayPreview(EntityTypes.Note note, int currentSemitones)
{
if (note.sampleName.Equals("") || !PersistentDataManager.gameSettings.previewNoteSounds) return;
if (note.sampleName == null || !PersistentDataManager.gameSettings.previewNoteSounds) return;
if (previewAudioSource != null)
{
previewAudioSource.Stop(true);
previewAudioSource.KillLoop();
previewAudioSource = null;
}
float pitch = SoundByte.GetPitchFromSemiTones(currentSemitones, true);
if(pitch == 1f) pitch = 1.0001f; // man writes worst workaround ever, banned from Heaven Studio source code
previewAudioSource = SoundByte.PlayOneShotGame(note.sampleName, pitch: pitch, volume: 0.75f, forcePlay: true, ignoreConductorPause: true);
previewAudioSource.KillLoop(.5f);
}
private static readonly string[] notes = { "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" };
private static readonly string[] notesFlat = { "A", "Bb", "B", "C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab" };
private static string GetNoteText(EntityTypes.Note note, int currentSemitones)
private static string GetNoteText(EntityTypes.Note note, int currentSemitones, out string sharp, out string flat)
{
int noteIndex = (note.sampleNote + currentSemitones) % 12;
if (noteIndex < 0)
@ -122,6 +144,8 @@ public class NotePropertyPrefab : NumberPropertyPrefab
octave--;
}
return notes[noteIndex] + octave;
sharp = notes[noteIndex] + octave;
flat = notesFlat[noteIndex] + octave;
return sharp;
}
}

View File

@ -159,28 +159,6 @@ namespace HeavenStudio.Editor
}
}
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()
{
}

View File

@ -893,6 +893,7 @@ namespace HeavenStudio.Editor.Track
EntityTypes.Float floatVal => floatVal.val,
EntityTypes.Button buttonVal => buttonVal.defaultLabel,
EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal),
EntityTypes.NoteSampleDropdown noteDDVal => (int)noteDDVal.defaultValue,
_ => ep[i].parameter,
};

View File

@ -278,6 +278,10 @@ namespace HeavenStudio
JArray values = e[param.propertyName]["Values"];
e.dynamicData[param.propertyName] = new EntityTypes.DropdownObj((int)value, values.Select(x => (string)x).ToList());
}
else if (type == typeof(EntityTypes.NoteSampleDropdown))
{
e.dynamicData[param.propertyName] = (int)e[param.propertyName];
}
else if (type == typeof(EntityTypes.Resource))
e.dynamicData[param.propertyName] = (EntityTypes.Resource)e[param.propertyName];
else if (type.IsEnum)

View File

@ -0,0 +1,13 @@
public struct NoteSample
{
public int note;
public int octave;
public string sample;
public NoteSample(string sample, int note, int octave)
{
this.note = note;
this.octave = octave;
this.sample = sample;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f1a532c54bb4407bbc90c5d8f5f83eff
timeCreated: 1712160367

View File

@ -33,8 +33,21 @@ namespace HeavenStudio
public int sampleNote;
public int sampleOctave;
public string sampleName;
public bool offsetToC;
public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 0, string sampleName = "")
public Note(int val = 0, int sampleNote = 0, int sampleOctave = 4, string sampleName = null, bool offsetToC = true)
{
min = -maxSemitones;
max = maxSemitones;
this.val = val;
this.sampleNote = sampleNote;
this.sampleOctave = sampleOctave;
this.sampleName = sampleName;
this.offsetToC = offsetToC;
}
public Note(int min, int max, int val = 0, int sampleNote = 0, int sampleOctave = 4, string sampleName = null, bool offsetToC = true)
{
this.min = min;
this.val = val;
@ -42,6 +55,7 @@ namespace HeavenStudio
this.sampleNote = sampleNote;
this.sampleOctave = sampleOctave;
this.sampleName = sampleName;
this.offsetToC = offsetToC;
}
}
@ -108,6 +122,20 @@ namespace HeavenStudio
}
}
public struct NoteSampleDropdown
{
public object defaultValue;
public Func<object, NoteSample> getNoteSample;
public string semisProp;
public NoteSampleDropdown(object defaultValue, Func<object, NoteSample> getNoteSample, string semisProp)
{
this.defaultValue = defaultValue;
this.getNoteSample = getNoteSample;
this.semisProp = semisProp;
}
}
public class DropdownObj
{
public void SetValues(List<string> values)

View File

@ -111,7 +111,7 @@ namespace HeavenStudio.Util
{
foreach (Util.Sound sound in playingSounds)
{
sound.Stop();
sound.KillLoop();
}
if (destroy)
{

View File

@ -40,6 +40,8 @@ namespace HeavenStudio.Util
const double PREBAKE_TIME = 0.25;
private Coroutine fadeRoutine;
private void Start()
{
}
@ -69,6 +71,8 @@ namespace HeavenStudio.Util
return;
}
CancelFadeRoutine();
audioSource = GetComponent<AudioSource>();
cond = Conductor.instance;
double dspTime = AudioSettings.dspTime;
@ -234,12 +238,15 @@ namespace HeavenStudio.Util
audioSource.UnPause();
}
public void Stop(bool releaseToPool = false)
/// <summary>
/// Used internally to stop and reset the sound once it has been released back into the pool.
/// </summary>
/// <remarks>
/// WARNING! You should use <see cref="KillLoop">KillLoop()</see> to stop sounds early, not this!
/// </remarks>
public void Stop()
{
if(releaseToPool && audioSource.isPlaying)
{
GameManager.instance.SoundObjects.Release(this);
}
CancelFadeRoutine();
available = true;
played = false;
@ -318,21 +325,30 @@ namespace HeavenStudio.Util
#endregion
public void KillLoop(double fadeTime)
/// <summary>
/// Fades the sound out over fadeTime, then releases it back into the pool which stops it.
/// Leave fadeTime at 0 to stop the sound instantly.
/// You should use this for stopping sounds early, not <see cref="Stop"/>.
/// </summary>
public void KillLoop(double fadeTime = 0)
{
if (!gameObject.activeSelf) return;
CancelFadeRoutine();
if (fadeTime == 0)
{
GameManager.instance.SoundObjects.Release(this);
return;
}
StartCoroutine(FadeLoop(fadeTime));
fadeRoutine = StartCoroutine(FadeLoop(fadeTime));
}
double loopFadeTimer = 0f;
IEnumerator FadeLoop(double fadeTime)
{
float startingVol = audioSource.volume;
float loopFadeTimer = 0f;
while (loopFadeTimer < fadeTime)
{
@ -341,7 +357,13 @@ namespace HeavenStudio.Util
yield return null;
}
yield return null;
GameManager.instance.SoundObjects.Release(this);
}
private void CancelFadeRoutine()
{
if(fadeRoutine != null) StopCoroutine(fadeRoutine);
}
}
}