diff --git a/.gitignore b/.gitignore index ffbb134e9..3c871d583 100644 --- a/.gitignore +++ b/.gitignore @@ -78,8 +78,9 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa.meta /[Aa]ssets/[Ss]treamingAssets/aa/* -# Backup +# Ignore backups *.blend1 +*.blend1.meta # Auto-gen Assets/YargInput.cs @@ -88,4 +89,4 @@ Assets/YargInput.cs # Rider # .idea/ Packages/com.thenathannator.hidrogen/ -Packages/com.thenathannator.plasticband/ +Packages/com.thenathannator.plasticband/ \ No newline at end of file diff --git a/Assets/Art/Materials/PlayMode/Note_Tap.mat b/Assets/Art/Materials/PlayMode/Note_Tap.mat index 06257e9ad..86f882874 100644 --- a/Assets/Art/Materials/PlayMode/Note_Tap.mat +++ b/Assets/Art/Materials/PlayMode/Note_Tap.mat @@ -20,7 +20,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Note_Metal + m_Name: Note_Tap m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_ValidKeywords: [] m_InvalidKeywords: [] diff --git a/Assets/Art/Meshes/Notes.blend1.meta b/Assets/Art/Meshes/Notes.blend1.meta deleted file mode 100644 index 9a2608fa0..000000000 --- a/Assets/Art/Meshes/Notes.blend1.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4af19413ad21b3d4f85c8869c00bb0d6 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/RealGuitarNote.prefab b/Assets/Prefabs/RealGuitarNote.prefab index c5c03debb..373c278c9 100644 --- a/Assets/Prefabs/RealGuitarNote.prefab +++ b/Assets/Prefabs/RealGuitarNote.prefab @@ -26,7 +26,7 @@ RectTransform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 396386252373935444} m_LocalRotation: {x: 0.56322813, y: -0, z: -0, w: 0.8263015} - m_LocalPosition: {x: 0, y: 0, z: 0.03} + m_LocalPosition: {x: 0, y: 0, z: 0.015} m_LocalScale: {x: 0.17877747, y: 0.19130976, z: 0.17877747} m_ConstrainProportionsScale: 0 m_Children: [] @@ -35,8 +35,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 68.559, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0.107} - m_SizeDelta: {x: 1.5, y: 1.3} + m_AnchoredPosition: {x: 0, y: 0.166} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &3746261134333683177 MeshRenderer: @@ -100,7 +100,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 0 + m_text: 1 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: bd78233bc3a8ea940a15e0d7ce6a701a, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 9d454ccc7950ea045924c7d2411604a8, type: 2} @@ -127,12 +127,12 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 15 - m_fontSizeBase: 15 + m_fontSize: 12.5 + m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -229,6 +229,7 @@ MonoBehaviour: meshRendererMiddleIndices: 0200000002000000 noteGroup: {fileID: 1397812567785855241} hopoGroup: {fileID: 1294466957868725440} + tapGroup: {fileID: 0} fullGroup: {fileID: 5879953073027725293} fretNumber: {fileID: 5134052872940096443} lineRenderer: {fileID: 5864461325193466425} diff --git a/Assets/Prefabs/RealGuitarTrack.prefab b/Assets/Prefabs/RealGuitarTrack.prefab index cf83687fa..cccab6de6 100644 --- a/Assets/Prefabs/RealGuitarTrack.prefab +++ b/Assets/Prefabs/RealGuitarTrack.prefab @@ -9834,7 +9834,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0.5, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &2143939448389825635 MeshRenderer: @@ -9928,9 +9928,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -49050,7 +49050,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: -0.1666667, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &2644446649672142872 MeshRenderer: @@ -49144,9 +49144,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -88298,7 +88298,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: -0.8333333, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &7895565979112695365 MeshRenderer: @@ -88392,9 +88392,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -88470,7 +88470,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: -0.5, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &2444183623338863627 MeshRenderer: @@ -88564,9 +88564,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -161641,7 +161641,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0.1666667, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &6118850895532487502 MeshRenderer: @@ -161735,9 +161735,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 @@ -205604,7 +205604,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0.8333333, y: 0.1} - m_SizeDelta: {x: 1.3, y: 1.3} + m_SizeDelta: {x: 1.5, y: 1.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!23 &4082768599485258066 MeshRenderer: @@ -205698,9 +205698,9 @@ MonoBehaviour: m_fontSize: 13 m_fontSizeBase: 13 m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 8 - m_fontSizeMax: 10 + m_enableAutoSizing: 1 + m_fontSizeMin: 12 + m_fontSizeMax: 22 m_fontStyle: 1 m_HorizontalAlignment: 2 m_VerticalAlignment: 1024 diff --git a/Assets/Script/Audio/Bass/BassStemChannel.cs b/Assets/Script/Audio/Bass/BassStemChannel.cs index 99c1a81ef..cd40aca44 100644 --- a/Assets/Script/Audio/Bass/BassStemChannel.cs +++ b/Assets/Script/Audio/Bass/BassStemChannel.cs @@ -3,18 +3,17 @@ using ManagedBass; using ManagedBass.DirectX8; using ManagedBass.Fx; -using UnityEngine; namespace YARG { public class BassStemChannel : IStemChannel { - + private const EffectType REVERB_TYPE = EffectType.DXReverb; - + public SongStem Stem { get; } public double LengthD { get; private set; } - + public double Volume { get; private set; } - + public int StreamHandle { get; private set; } private readonly string _path; @@ -26,7 +25,7 @@ public class BassStemChannel : IStemChannel { private readonly DSPProcedure _dspGain; private double _lastStemVolume; - + private bool _disposed; public BassStemChannel(IAudioManager manager, string path, SongStem stem) { @@ -39,10 +38,10 @@ public BassStemChannel(IAudioManager manager, string path, SongStem stem) { _lastStemVolume = _manager.GetVolumeSetting(Stem); _effects = new Dictionary(); _dspHandles = new Dictionary(); - + _dspGain += GainDSP; } - + ~BassStemChannel() { Dispose(false); } @@ -52,10 +51,10 @@ public int Load(bool isSpeedUp, float speed) { if (StreamHandle != 0) { return 0; } - + int streamHandle = Bass.CreateStream(_path, 0, 0, BassFlags.Prescan | BassFlags.Decode | BassFlags.AsyncFile); if (streamHandle == 0) { - return (int)Bass.LastError; + return (int) Bass.LastError; } const BassFlags flags = BassFlags.SampleOverrideLowestVolume | BassFlags.Decode | BassFlags.FxFreeSource; @@ -78,7 +77,7 @@ public int Load(bool isSpeedUp, float speed) { } LengthD = GetLengthInSeconds(); - + return 0; } @@ -88,24 +87,21 @@ public void SetVolume(double newVolume) { } double volumeSetting = _manager.GetVolumeSetting(Stem); - + double oldBassVol = _lastStemVolume * Volume; double newBassVol = volumeSetting * newVolume; - + // Values are the same, no need to change if (Math.Abs(oldBassVol - newBassVol) < double.Epsilon) { - Debug.Log($"{Stem} values same"); return; } - - Debug.Log($"Updated {Stem} volume to {newVolume}"); - + Volume = newVolume; _lastStemVolume = volumeSetting; - + Bass.ChannelSetAttribute(StreamHandle, ChannelAttribute.Volume, newBassVol); } - + public void SetReverb(bool reverb) { if (reverb) { // Reverb already applied @@ -131,7 +127,7 @@ public void SetReverb(bool reverb) { _dspHandles.Remove(DSPType.Gain); } } - + public double GetPosition() { return Bass.ChannelBytes2Seconds(StreamHandle, Bass.ChannelGetPosition(StreamHandle)); } @@ -140,44 +136,44 @@ public double GetLengthInSeconds() { if (StreamHandle == 0) { return 0; } - + long length = Bass.ChannelGetLength(StreamHandle); - + if (length == -1) { return (double) Bass.LastError; } - + double seconds = Bass.ChannelBytes2Seconds(StreamHandle, length); - + if (seconds < 0) { return (double) Bass.LastError; } - + return seconds; } - + public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } - + private void Dispose(bool disposing) { if (!_disposed) { // Free managed resources here if (disposing) { - + } - + // Free unmanaged resources here if (StreamHandle != 0) { Bass.StreamFree(StreamHandle); StreamHandle = 0; } - + _disposed = true; } } - + private int AddReverbToChannel() { // Set reverb FX int reverbHandle = Bass.ChannelSetFX(StreamHandle, REVERB_TYPE, 0); @@ -202,7 +198,7 @@ private int AddReverbToChannel() { return !Bass.FXSetParameters(reverbHandle, reverbParams) ? 0 : reverbHandle; } - + private static unsafe void GainDSP(int handle, int channel, IntPtr buffer, int length, IntPtr user) { var bufferPtr = (float*) buffer; int samples = length / 4; diff --git a/Assets/YargInput.inputactions b/Assets/YargInput.inputactions index 8f540eb39..6947f8054 100644 --- a/Assets/YargInput.inputactions +++ b/Assets/YargInput.inputactions @@ -582,211 +582,6 @@ "isPartOfComposite": false } ] - }, - { - "name": "5Fret", - "id": "2a30253e-0d4e-47e1-bccb-37dc81437965", - "actions": [ - { - "name": "Green", - "type": "Button", - "id": "3c5f3c94-0a26-4923-86a1-dac973d57c59", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Red", - "type": "Button", - "id": "0bbad460-1765-4b00-95b4-534e3ae7d093", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Yellow", - "type": "Button", - "id": "cf4d6e07-3842-4e95-8608-93fb7bef8b03", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Blue", - "type": "Button", - "id": "e2e38e04-31dd-4138-922f-8ae7584f9a3b", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Orange", - "type": "Button", - "id": "394ac85d-9d94-40f2-90ba-ee64b8cab7ca", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Strum", - "type": "Button", - "id": "b6d22dfd-1585-4d89-9776-ab9b9b6955a6", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "", - "id": "7fa14adf-70cb-46b7-8f4c-e6b3a9d96e23", - "path": "/q", - "interactions": "", - "processors": "", - "groups": "", - "action": "Green", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "48f668c5-31bb-4060-b41f-a9d4721c066c", - "path": "/greenFret", - "interactions": "", - "processors": "", - "groups": "", - "action": "Green", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "5f377753-3968-44ab-b4e9-531deb842e90", - "path": "/w", - "interactions": "", - "processors": "", - "groups": "", - "action": "Red", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a4aac011-43f9-4b00-ab8b-376014c39501", - "path": "/redFret", - "interactions": "", - "processors": "", - "groups": "", - "action": "Red", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "eab1d521-bcbf-4255-a7f2-241c5ce2bf26", - "path": "/e", - "interactions": "", - "processors": "", - "groups": "", - "action": "Yellow", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "075cc472-8aaa-4e84-9b9a-1157baaa5553", - "path": "/yellowFret", - "interactions": "", - "processors": "", - "groups": "", - "action": "Yellow", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "deff946c-d032-4e62-bff9-e5a0eae89a6d", - "path": "/r", - "interactions": "", - "processors": "", - "groups": "", - "action": "Blue", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "dbcf7093-29f9-43ad-a5bb-244f47da4acc", - "path": "/blueFret", - "interactions": "", - "processors": "", - "groups": "", - "action": "Blue", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f3d8fd2a-af90-4f2e-b913-bc9c515335a4", - "path": "/t", - "interactions": "", - "processors": "", - "groups": "", - "action": "Orange", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a73b04eb-2230-41b6-b18d-73fb1c043c5b", - "path": "/orangeFret", - "interactions": "", - "processors": "", - "groups": "", - "action": "Orange", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "5ef1a5f6-4189-426a-8ecb-2b77af52a7a3", - "path": "/space", - "interactions": "", - "processors": "", - "groups": "", - "action": "Strum", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "9925af05-ac41-4d42-be63-eee389da4c28", - "path": "/strumUp", - "interactions": "", - "processors": "", - "groups": "", - "action": "Strum", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "669fbe93-597e-4261-82dc-deeedb2e3c88", - "path": "/strumDown", - "interactions": "", - "processors": "", - "groups": "", - "action": "Strum", - "isComposite": false, - "isPartOfComposite": false - } - ] } ], "controlSchemes": []