File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+ < head >
4+ < title > Wave example</ title >
5+ </ head >
6+ < body >
7+ < button id ="bPiano "> Piano left</ button >
8+ < button id ="bGuitar "> Guitar itched</ button >
9+ < button id ="bXylo "> Xylophone slow</ button >
10+ < button id ="bAll "> All in one</ button >
11+
12+ < script src ="../lib/wave.js "> </ script >
13+ < script >
14+ function piano ( ) {
15+ wave ( ':piano:zxcvbn' ) . balance ( - 1 ) . play ( )
16+ }
17+ function guitar ( ) {
18+ wave ( ':guitar:zxcvbn' ) . itch ( 0.5 ) . play ( )
19+ }
20+ function xylo ( ) {
21+ wave ( ':xylophone:zxcvbn' ) . pace ( 100 ) . play ( )
22+ }
23+ function all ( ) {
24+ wave ( `
25+ :pace 400: :itch 0: :balance 0:
26+
27+ :piano: :balance -1: zxcvbn
28+
29+ :guitar: :balance 0: :itch 0.5: zxcvbn
30+
31+ :xylophone: :itch 0: :pace 100: zxcvbn
32+ ` ) . play ( )
33+ }
34+ document . querySelector ( '#bPiano' ) . addEventListener ( "click" , piano )
35+ document . querySelector ( '#bGuitar' ) . addEventListener ( "click" , guitar )
36+ document . querySelector ( '#bXylo' ) . addEventListener ( "click" , xylo )
37+ document . querySelector ( '#bAll' ) . addEventListener ( "click" , all )
38+ </ script >
39+ </ body >
40+ </ html >
Original file line number Diff line number Diff line change @@ -1239,4 +1239,4 @@ return edide.global.wave = (str) => {
12391239 return obj
12401240}
12411241return this ;
1242- } ) . call ( { } , edide ) ;
1242+ } ) . call ( { } , edide ) ;
You can’t perform that action at this time.
0 commit comments