Skip to content

Commit 9ded110

Browse files
committed
Adds music and two different mixers
1 parent 84c3562 commit 9ded110

File tree

10 files changed

+184
-85
lines changed

10 files changed

+184
-85
lines changed

Assets/MusicMixer.mixer

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!241 &24100000
4+
AudioMixerController:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_Name: MusicMixer
10+
m_OutputGroup: {fileID: 0}
11+
m_MasterGroup: {fileID: 24300002}
12+
m_Snapshots:
13+
- {fileID: 24500006}
14+
m_StartSnapshot: {fileID: 24500006}
15+
m_SuspendThreshold: -80
16+
m_EnableSuspend: 1
17+
m_UpdateMode: 0
18+
m_ExposedParameters: []
19+
m_AudioMixerGroupViews:
20+
- guids:
21+
- a5c318b8981244adcb074e1073daf651
22+
name: View
23+
m_CurrentViewIndex: 0
24+
m_TargetSnapshot: {fileID: 24500006}
25+
--- !u!243 &24300002
26+
AudioMixerGroupController:
27+
m_ObjectHideFlags: 0
28+
m_CorrespondingSourceObject: {fileID: 0}
29+
m_PrefabInstance: {fileID: 0}
30+
m_PrefabAsset: {fileID: 0}
31+
m_Name: Master
32+
m_AudioMixer: {fileID: 24100000}
33+
m_GroupID: a5c318b8981244adcb074e1073daf651
34+
m_Children: []
35+
m_Volume: 2657a89d435804fa59caf76206dd0417
36+
m_Pitch: 83d4fa43e295b44f89970847a94ea60b
37+
m_Send: 00000000000000000000000000000000
38+
m_Effects:
39+
- {fileID: 24400004}
40+
m_UserColorIndex: 0
41+
m_Mute: 0
42+
m_Solo: 0
43+
m_BypassEffects: 0
44+
--- !u!244 &24400004
45+
AudioMixerEffectController:
46+
m_ObjectHideFlags: 3
47+
m_CorrespondingSourceObject: {fileID: 0}
48+
m_PrefabInstance: {fileID: 0}
49+
m_PrefabAsset: {fileID: 0}
50+
m_Name:
51+
m_EffectID: a5b3fba50c1c641f0bcdefe2f332740a
52+
m_EffectName: Attenuation
53+
m_MixLevel: dbbb4119b5731447a828cb690ea2fa52
54+
m_Parameters: []
55+
m_SendTarget: {fileID: 0}
56+
m_EnableWetMix: 0
57+
m_Bypass: 0
58+
--- !u!245 &24500006
59+
AudioMixerSnapshotController:
60+
m_ObjectHideFlags: 0
61+
m_CorrespondingSourceObject: {fileID: 0}
62+
m_PrefabInstance: {fileID: 0}
63+
m_PrefabAsset: {fileID: 0}
64+
m_Name: Snapshot
65+
m_AudioMixer: {fileID: 24100000}
66+
m_SnapshotID: a29767dbfa8e042259352a6972b82c73
67+
m_FloatValues: {}
68+
m_TransitionOverrides: {}

Assets/MusicMixer.mixer.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/_Project/Scenes/tally-viz.unity

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ MonoBehaviour:
15881588
m_Name:
15891589
m_EditorClassIdentifier:
15901590
chosenHost: 1
1591-
chosenEndpoint: 5
1591+
chosenEndpoint: 6
15921592
path:
15931593
--- !u!114 &481131869
15941594
MonoBehaviour:
@@ -1861,7 +1861,9 @@ MonoBehaviour:
18611861
feedIndex: 0
18621862
timeDiff: 0
18631863
timeDiffScaled: 0
1864-
timeDiffScalar: 0.1
1864+
timeDiffScalar: 0.29
1865+
minTimeDiff: 1
1866+
maxTimeDiff: 10
18651867
feedText: {fileID: 1617634874}
18661868
scrollRect: {fileID: 890586782}
18671869
--- !u!4 &586953496 stripped

Assets/_Project/Scripts/Core/DebugManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public static string GetSymbol (string name)
4949
{
5050
string symbol;
5151
symbolDictionary.TryGetValue (name, out symbol);
52-
return symbol.ToString ();
52+
if (symbol != null)
53+
return symbol.ToString ();
54+
return "";
5355
}
5456

5557

Assets/_Project/Scripts/Data/DataManager.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public enum EndpointType {
4747
rangePlusStreamOneDay,
4848
rangePlusStream12Hour,
4949
rangePlusStream6Hour,
50+
rangePlusStream3Hour,
5051
rangePlusStream1Hour,
5152
rangePlusStreamFiveMinute
5253
}
@@ -57,6 +58,7 @@ public enum EndpointType {
5758
"feed/range/plusStream/1/day", // 1 day
5859
"feed/range/plusStream/12/hour", // 6 hour
5960
"feed/range/plusStream/6/hour", // 6 hour
61+
"feed/range/plusStream/3/hour", // 1 hour
6062
"feed/range/plusStream/1/hour", // 1 hour
6163
"feed/range/plusStream/5/minute" // 5 minutes
6264
};
@@ -73,7 +75,7 @@ public enum EndpointType {
7375
// the number of events
7476
public static int dataCount;
7577
// the current data as string
76-
public static string current;
78+
public static string currentEventStr;
7779
// as list
7880
public static IList<FeedData> feeds = new List<FeedData> ();
7981

@@ -282,8 +284,8 @@ public static IEnumerator GetRequest (string uri)
282284

283285
// FOR DEBUGGING - MAY OR MAY NOT HAVE A GARBAGE COLLECTION ISSUE
284286

285-
//// reset current
286-
//current = "";
287+
//// reset currentEventStr
288+
//currentEventStr = "";
287289

288290
//foreach (var feed in feeds) {
289291

@@ -299,7 +301,7 @@ public static IEnumerator GetRequest (string uri)
299301
// ""
300302
// ;
301303

302-
// current += line + "<br>";
304+
// currentEventStr += line + "<br>";
303305

304306
// //Debug.Log(line);
305307
//}

Assets/_Project/Scripts/Data/TimelineManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ protected TimelineManager () { }
2525
public float timeDiffScalar = 0.01f; // timeDiff * scalar = how much faster time is replayed
2626

2727

28+
// min and max allowed between events
29+
public float minTimeDiff = 1;
30+
public float maxTimeDiff = 10;
31+
32+
33+
2834
// UI
2935

3036
public TMP_Text feedText;

Assets/_Project/Scripts/Sound/AudioManager.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ void Awake ()
2929
// default to main mixergroup if not set
3030
s.source.outputAudioMixerGroup = s.mixerGroup ? s.mixerGroup : mixerGroup;
3131
}
32+
33+
34+
}
35+
36+
private void Start ()
37+
{
38+
Play ("music");
3239
}
3340

3441
public void Play (string sound)
@@ -47,4 +54,6 @@ public void Play (string sound)
4754
s.source.PlayOneShot (s.source.clip);
4855
}
4956

57+
//AudioManager.Instance.Play("music");
58+
5059
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:188f018063e0b1a7787298aa5afa5bc5f3e20dff951376dbc1440d215f5a7436
3-
size 2891
2+
oid sha256:8d3e2f161a8a14e7e7d79765cb0aa712668716e75236e2b7dedbe947e3027ca3
3+
size 2880

0 commit comments

Comments
 (0)