Skip to content

Commit 3b2e712

Browse files
ekspertskristianhasselknippe
authored andcommittedFeb 28, 2017
adding PlaySound example (fuse-open#49)
* adding PlaySound example * changed sound samples, included CC license information
1 parent 506236f commit 3b2e712

12 files changed

+66
-0
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ These samples are supplied directly from the feature teams of Fuse and we welcom
4343
</tr>
4444
<tr>
4545
<td><a href="Samples/UIStructure/PageTabs">Page tabs</a></td>
46+
<td><a href="Samples/PlaySound">PlaySound</a></td>
4647
</tr>
4748
</table>
4849

‎Samples/PlaySound/MainView.ux

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<App Background="#000">
2+
<iOS.StatusBarConfig Style="Light" />
3+
4+
<WhileWindowLandscape>
5+
<Change thePad.RowCount="2" />
6+
<Change thePad.ColumnCount="4" />
7+
</WhileWindowLandscape>
8+
9+
<Panel ux:Class="SoundPad">
10+
<string ux:Property="Label" />
11+
<FileSource ux:Property="Sample" />
12+
<Text Value="{ReadProperty Label}" Alignment="Center" FontSize="16" Color="#111" />
13+
<Circle ux:Name="ledIndicator" Alignment="TopLeft" Width="10" Height="10" Color="#555" Margin="10">
14+
<Stroke Width="1" Color="#111" />
15+
<Circle ux:Name="glow" Width="120%" Height="120" Color="#0099FF" Visibility="Collapsed">
16+
<Blur />
17+
</Circle>
18+
</Circle>
19+
<Rectangle Color="#333" CornerRadius="10">
20+
<Stroke Width="1" Color="#111" />
21+
<Shadow Color="#555" Angle="115" />
22+
</Rectangle>
23+
<Pressed>
24+
<PlaySound File="{ReadProperty Sample}" />
25+
<Scale Factor="0.98" Duration="0.04" DurationBack="0.08" />
26+
<Change ledIndicator.Color="#0099FF" Delay="0" DelayBack="0.12" />
27+
<Change glow.Visibility="Visible" Delay="0" DelayBack="0.12" />
28+
</Pressed>
29+
</Panel>
30+
31+
<DockPanel>
32+
<StatusBarBackground Dock="Top" />
33+
<BottomBarBackground IncludesKeyboard="false" Dock="Bottom" />
34+
<Panel Dock="Top" Height="56">
35+
<Text Alignment="Center" Value="FuseDrums" Color="#0099FF" FontSize="24" />
36+
<Rectangle Alignment="Bottom" Height="1" Color="#555" />
37+
</Panel>
38+
39+
<Grid ux:Name="thePad" RowCount="4" ColumnCount="2" CellSpacing="8" Margin="8">
40+
<SoundPad Label="Kick 1" Sample="Sounds/Kick1.wav" />
41+
<SoundPad Label="Kick 2" Sample="Sounds/Kick2.wav" />
42+
<SoundPad Label="Snare 1" Sample="Sounds/Snare1.wav" />
43+
<SoundPad Label="Snare 2" Sample="Sounds/Snare2.wav" />
44+
<SoundPad Label="Snare 3" Sample="Sounds/Snare3.wav" />
45+
<SoundPad Label="Perc 1" Sample="Sounds/Perc1.wav" />
46+
<SoundPad Label="Perc 2" Sample="Sounds/Perc2.wav" />
47+
<SoundPad Label="Perc 3" Sample="Sounds/Perc3.wav" />
48+
</Grid>
49+
50+
</DockPanel>
51+
</App>

‎Samples/PlaySound/PlaySound.unoproj

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"RootNamespace":"",
3+
"Packages": [
4+
"Fuse",
5+
"FuseJS",
6+
"Fuse.Audio"
7+
],
8+
"Includes": [
9+
"*",
10+
"Sounds/*.wav:Bundle"
11+
]
12+
}

‎Samples/PlaySound/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The sounds used in this example are taken from [Analog Kit Lite by fugwhump](http://ccmixter.org/files/fugwhump/17527)
2+
and are licensed under [Creative Commons Attribution (3.0)](http://creativecommons.org/licenses/by/3.0/) license.

‎Samples/PlaySound/Sounds/Kick1.wav

162 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Kick2.wav

93.1 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Perc1.wav

63.7 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Perc2.wav

63.7 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Perc3.wav

83.3 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Snare1.wav

49 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Snare2.wav

49 KB
Binary file not shown.

‎Samples/PlaySound/Sounds/Snare3.wav

49 KB
Binary file not shown.

0 commit comments

Comments
 (0)