Skip to content

Commit

Permalink
move globaltempo to main assets in unity
Browse files Browse the repository at this point in the history
  • Loading branch information
anokta committed Feb 19, 2024
1 parent 3485061 commit 3c23d33
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 27 deletions.
14 changes: 14 additions & 0 deletions platforms/unity/Assets/BarelyMusician/Scripts/GlobalTempo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using UnityEngine;

namespace Barely {
[DisallowMultipleComponent]
public class GlobalTempo : MonoBehaviour {
[Tooltip("Sets the global tempo in beats per minute.")]
[Range(30.0f, 960.0f)]
public double Bpm = 120.0;

private void Update() {
Musician.Tempo = Bpm;
}
}
} // namespace Barely
5 changes: 3 additions & 2 deletions platforms/unity/Assets/Examples/Scenes/ArpeggiatorDemo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2924acef9d3214e9203ba5ca1f8f38, type: 3}
m_Name:
m_EditorClassIdentifier:
tempo: 150
Bpm: 135
--- !u!850595691 &748775628
LightingSettings:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -442,9 +442,11 @@ MonoBehaviour:
m_EditorClassIdentifier:
instrument: {fileID: 1737834380}
arpeggiator: {fileID: 1737834384}
repeater: {fileID: 0}
rootPitch: 0
octaveOffset: 0
noteIntensity: 1
repeaterNoteLength: 1
--- !u!114 &1737834380
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -612,6 +614,5 @@ MonoBehaviour:
m_EditorClassIdentifier:
ProcessOrder: 0
GateRatio: 0.5
Instrument: {fileID: 1737834380}
Rate: 2
Style: 0
3 changes: 1 addition & 2 deletions platforms/unity/Assets/Examples/Scenes/PerformerDemo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ MonoBehaviour:
performer: {fileID: 2014543008}
text: {fileID: 84924158}
cutoffLfoAmplitude: 2000
freq: 0
scale: 00000000020000000400000007000000090000000b000000
--- !u!114 &2014543010
MonoBehaviour:
Expand All @@ -604,7 +603,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2924acef9d3214e9203ba5ca1f8f38, type: 3}
m_Name:
m_EditorClassIdentifier:
tempo: 118
Bpm: 115
--- !u!114 &2014543011
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion platforms/unity/Assets/Examples/Scenes/RepeaterDemo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2924acef9d3214e9203ba5ca1f8f38, type: 3}
m_Name:
m_EditorClassIdentifier:
tempo: 150
Bpm: 110
--- !u!850595691 &748775628
LightingSettings:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions platforms/unity/Assets/Examples/Scenes/SequencerDemo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2924acef9d3214e9203ba5ca1f8f38, type: 3}
m_Name:
m_EditorClassIdentifier:
tempo: 118
Bpm: 121
--- !u!114 &675413002
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -546,6 +546,7 @@ MonoBehaviour:
isLoggingToConsole: 0
isTicking: 0
playOnAwake: 1
isAuto: 1
OnBeatEvent:
m_PersistentCalls:
m_Calls:
Expand Down Expand Up @@ -1546,7 +1547,6 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
_processOrder: 0
CutoffFrequency: 800
--- !u!114 &2110623104
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
20 changes: 0 additions & 20 deletions platforms/unity/Assets/Examples/Scripts/GlobalTempo.cs

This file was deleted.

0 comments on commit 3c23d33

Please sign in to comment.