green_shoes 0.129.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/LICENSE +21 -0
  2. data/README.md +104 -0
  3. data/README.rdoc +23 -0
  4. data/README_old.md +132 -0
  5. data/lib/ext/bloops.rb +1 -0
  6. data/lib/ext/bloops/bloops.so +0 -0
  7. data/lib/ext/bloops/libportaudio-2.dll +0 -0
  8. data/lib/ext/bloops/songs/1901_by_Aanand_Prasad.rb +478 -0
  9. data/lib/ext/bloops/songs/bloopsaphone_theme_song_by_why.rb +31 -0
  10. data/lib/ext/bloops/songs/feepogram.rb +67 -0
  11. data/lib/ext/bloops/songs/simpsons_theme_song_by_why.rb +14 -0
  12. data/lib/ext/chipmunk.rb +34 -0
  13. data/lib/ext/chipmunk/chipmunk.so +0 -0
  14. data/lib/ext/projector.rb +1 -0
  15. data/lib/ext/projector/matrix3d.rb +73 -0
  16. data/lib/ext/projector/projector.rb +306 -0
  17. data/lib/green_shoes.rb +45 -0
  18. data/lib/shoes/anim.rb +19 -0
  19. data/lib/shoes/app.rb +591 -0
  20. data/lib/shoes/basic.rb +242 -0
  21. data/lib/shoes/colors.rb +150 -0
  22. data/lib/shoes/download.rb +26 -0
  23. data/lib/shoes/help.rb +171 -0
  24. data/lib/shoes/helper_methods.rb +308 -0
  25. data/lib/shoes/main.rb +99 -0
  26. data/lib/shoes/manual.rb +6 -0
  27. data/lib/shoes/mask.rb +29 -0
  28. data/lib/shoes/projector.rb +42 -0
  29. data/lib/shoes/ruby.rb +73 -0
  30. data/lib/shoes/slot.rb +68 -0
  31. data/lib/shoes/text.rb +44 -0
  32. data/lib/shoes/url.rb +14 -0
  33. data/lib/shoes/widget.rb +18 -0
  34. data/static/Coolvetica.ttf +0 -0
  35. data/static/Lacuna.ttf +0 -0
  36. data/static/downloading.png +0 -0
  37. data/static/gshoes-heading-icon.png +0 -0
  38. data/static/gshoes-icon.png +0 -0
  39. data/static/man-app.png +0 -0
  40. data/static/man-builds.png +0 -0
  41. data/static/man-builds1.png +0 -0
  42. data/static/man-editor-notepad.png +0 -0
  43. data/static/man-editor-osx.png +0 -0
  44. data/static/man-ele-background.png +0 -0
  45. data/static/man-ele-border.png +0 -0
  46. data/static/man-ele-button.png +0 -0
  47. data/static/man-ele-check.png +0 -0
  48. data/static/man-ele-editbox.png +0 -0
  49. data/static/man-ele-editline.png +0 -0
  50. data/static/man-ele-image.png +0 -0
  51. data/static/man-ele-listbox.png +0 -0
  52. data/static/man-ele-progress.png +0 -0
  53. data/static/man-ele-radio.png +0 -0
  54. data/static/man-ele-shape.png +0 -0
  55. data/static/man-ele-textblock.png +0 -0
  56. data/static/man-ele-video.png +0 -0
  57. data/static/man-intro-dmg.png +0 -0
  58. data/static/man-intro-exe.png +0 -0
  59. data/static/man-look-tiger.png +0 -0
  60. data/static/man-look-ubuntu.png +0 -0
  61. data/static/man-look-vista.png +0 -0
  62. data/static/man-run-osx.png +0 -0
  63. data/static/man-run-vista.png +0 -0
  64. data/static/man-run-xp.png +0 -0
  65. data/static/man-shot1.png +0 -0
  66. data/static/manual-en.txt +3523 -0
  67. data/static/manual-ja.txt +2825 -0
  68. data/static/shoes-manual-apps.png +0 -0
  69. metadata +146 -0
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2010-2011 ashbb
2
+
3
+ Except:
4
+
5
+ * hh/static/(all).png (c) 2008 why the lucky stiff
6
+ * lib/ext/projector/(all).rb (c) 2010 MIZUTANI Tociyuki
7
+ * samples/akatsukiface.png (c) 2010 MIZUTANI Tociyuki
8
+ * samples/class-book.yaml (c) 2008 why the lucky stiff
9
+ * samples/splash-hand.png (c) 2008 why the lucky stiff
10
+ * samples/loogink.png (c) 2008 Anita Kuno
11
+ * samples/cy.png (c) 2008 Anita Kuno
12
+ * static/Coolvetica.ttf (c) 1999 Ray Larabie
13
+ * static/Lacuna.ttf (c) 2003 Glashaus, designed by Peter Hoffman
14
+ * static/gshoes-icon.png (c) 2010 Zachary Scott
15
+ * static/gshoes-heading-icon.png (c) 2010 Zachary Scott
16
+
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,104 @@
1
+ Green Shoes
2
+ ===========
3
+
4
+ ![logo icon1](https://github.com/ashbb/green_shoes/raw/master/static/gshoes-heading-icon.png)
5
+ ![logo icon2](https://github.com/ashbb/green_shoes/raw/master/static/gshoes-icon.png)
6
+
7
+ This is **Green Shoes** written in Ruby. One of the colorful [Shoes](http://shoes.heroku.com/). ;-)
8
+
9
+ Fantastic logo icon was created by [Zachary Scott](https://github.com/zacharyscott). Thanks!
10
+
11
+ Now, there are 45 [samples](https://github.com/ashbb/green_shoes/tree/master/samples). Each has a [snapshot](https://github.com/ashbb/green_shoes/tree/master/snapshots).
12
+
13
+
14
+ Tiny Streaming Flash videos
15
+ ---------------------------
16
+
17
+ - [sample01](http://www.rin-shun.com/shoes/green-shoes-sample1.swf.html) : Bouncing logo
18
+ - [sample04](http://www.rin-shun.com/shoes/green-shoes-sample4.swf.html) : Text in edit_line moving at random
19
+ - [sample07](http://www.rin-shun.com/shoes/green-shoes-sample7.swf.html) : 20 buttons in flow
20
+ - [sample09](http://www.rin-shun.com/shoes/green-shoes-sample9.swf.html) : Complicated stacks and flows
21
+ - [sample11](http://www.rin-shun.com/shoes/green-shoes-sample11.swf.html) : A circle moving with mouse motion
22
+ - [sample12](http://www.rin-shun.com/shoes/green-shoes-sample12.swf.html) : Random color change
23
+ - [sample13](http://www.rin-shun.com/shoes/green-shoes-sample13.swf.html) : Mouse click and release
24
+ - [sample14-1](http://www.rin-shun.com/shoes/green-shoes-sample14-1.swf.html) : Flowers
25
+ - [sample15](http://www.rin-shun.com/shoes/green-shoes-sample15.swf.html) : Text reallocation
26
+ - [sample18](http://www.rin-shun.com/shoes/green-shoes-sample18.swf.html) : Text markup and link
27
+ - [sample19](http://www.rin-shun.com/shoes/green-shoes-sample19.swf.html) : Pong Game
28
+ - [sample20](http://www.rin-shun.com/shoes/green-shoes-sample20.swf.html) : Potacho
29
+ - [sample26](http://www.rin-shun.com/shoes/green-shoes-sample26.swf.html) : Mask
30
+ - [sample28](http://www.rin-shun.com/shoes/green-shoes-sample28.swf.html) : Snake Game
31
+ - [sample32](http://www.rin-shun.com/shoes/green-shoes-sample32.swf.html) : Chipmunk Physics
32
+ - [sample38](http://www.rin-shun.com/shoes/green-shoes-sample38.swf.html) : Rotating rect, oval and star
33
+ - [sample39](http://www.rin-shun.com/shoes/green-shoes-sample39.swf.html) : Hackety Hack opening demo
34
+ - [sample41](http://www.rin-shun.com/shoes/green-shoes-sample41.swf.html) : 3D Texture Mapping
35
+ - [sample43](http://www.rin-shun.com/shoes/green-shoes-sample43.swf.html) : Download and progress bar
36
+ - [sample44](http://www.rin-shun.com/shoes/green-shoes-sample44.swf.html) : Good clock
37
+
38
+ - [simple boids](http://www.rin-shun.com/shoes/green-shoes-a-very-simple-boids.swf.html) : A very simple boids
39
+ - [parallax scrolling](http://www.rin-shun.com/shoes/green-shoes-parallax-scrolling.swf.html) : Parallax scrolling
40
+ - [search sample](http://www.rin-shun.com/shoes/search_sample_with_green_shoes.swf.html) : Search sample
41
+
42
+ recorded with [CamStudio](http://camstudio.org/).
43
+
44
+
45
+ Mini Hackety Hack
46
+ ------------------
47
+
48
+ ![snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/mini-hh.png)
49
+
50
+ [This](http://www.rin-shun.com/shoes/green-shoes-mini-hh.swf.html) is a first try with Green Shoes. ;-)
51
+
52
+ [Hackety Hack](http://hacketyhack.heroku.com/): the little coder's starter kit
53
+
54
+
55
+ LICENSE
56
+ --------
57
+
58
+ Copyright (c) 2010-2011 ashbb
59
+
60
+ Except:
61
+
62
+ - hh/static/(all).png (c) 2008 why the lucky stiff
63
+ - lib/ext/projector/(all).rb (c) 2010 MIZUTANI Tociyuki
64
+ - samples/akatsukiface.png (c) 2010 MIZUTANI Tociyuki
65
+ - samples/class-book.yaml (c) 2008 why the lucky stiff
66
+ - samples/splash-hand.png (c) 2008 why the lucky stiff
67
+ - samples/loogink.png (c) 2008 Anita Kuno
68
+ - samples/cy.png (c) 2008 Anita Kuno
69
+ - static/Coolvetica.ttf (c) 1999 Ray Larabie
70
+ - static/Lacuna.ttf (c) 2003 Glashaus, designed by Peter Hoffman
71
+ - static/gshoes-icon.png (c) 2010 Zachary Scott
72
+ - static/gshoes-heading-icon.png (c) 2010 Zachary Scott
73
+
74
+ Permission is hereby granted, free of charge, to any person
75
+ obtaining a copy of this software and associated documentation
76
+ files (the "Software"), to deal in the Software without restriction,
77
+ including without limitation the rights to use, copy, modify, merge,
78
+ publish, distribute, sublicense, and/or sell copies of the Software,
79
+ and to permit persons to whom the Software is furnished to do so,
80
+ subject to the following conditions:
81
+
82
+ The above copyright notice and this permission notice shall be
83
+ included in all copies or substantial portions of the Software.
84
+
85
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
86
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
87
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
88
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
89
+ SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
90
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
91
+ OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
92
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
93
+ SOFTWARE.
94
+
95
+
96
+ Note
97
+ ----
98
+
99
+ - [Install Ruby/GTK2 and rcairo for Linux](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack030.md).
100
+ - [Install Ruby/GTK2 and rcairo for Windows](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack031.md).
101
+
102
+ Let's have fun with Ruby and Shoes! :-D
103
+
104
+ ashbb
@@ -0,0 +1,23 @@
1
+ = green_shoes
2
+
3
+ Green Shoes is one of colorful Shoes. It's written in pure Ruby with Ruby/GTK2.
4
+
5
+ == Write your Green Shoes app
6
+
7
+ * gem install gtk2
8
+ * gem install green_shoes
9
+ * write your app like this
10
+
11
+ # my_first_green_shoes_app.rb
12
+ require 'green_shoes'
13
+ Shoes.app do
14
+ para 'hello world!'
15
+ end
16
+
17
+ * ruby my_first_green_shoes_app.rb
18
+
19
+ == Copyright
20
+
21
+ Green Shoes was developed by ashbb.
22
+
23
+ See LICENSE for details.
@@ -0,0 +1,132 @@
1
+ Green Shoes
2
+ =========
3
+
4
+ This is *NOT* [Shoes](http://shoes.heroku.com/), but looks alike. So, named **Green Shoes**. This is written in Ruby. ;-)
5
+
6
+ Fantastic logo icon was created by [Zachary Scott](https://github.com/zacharyscott). Thanks!
7
+
8
+ sample 1
9
+ --------
10
+
11
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample1.png)
12
+
13
+ Online demo is [here](http://www.rin-shun.com/shoes/green-shoes-sample1.swf.html).
14
+
15
+ sample 2
16
+ --------
17
+
18
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample2.png)
19
+
20
+ sample 3
21
+ --------
22
+
23
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample3.png)
24
+
25
+ As like as the last sample of [_why's tutorial](https://github.com/ashbb/shoes_tutorial_walkthrough).
26
+
27
+ sample 4
28
+ --------
29
+
30
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample4.png)
31
+
32
+ edit_line with block is nice to display realtime change.
33
+ Online demo is [here](http://www.rin-shun.com/shoes/green-shoes-sample4.swf.html).
34
+
35
+ sample 5
36
+ --------
37
+
38
+ ![sample5.png](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample5.png)
39
+
40
+ Launch multi Green Shoes Apps.
41
+
42
+ sample 6
43
+ --------
44
+
45
+ Added module Types. Now Green Shoes can use both module Shoes and class Shoes as like as (Red) Shoes.
46
+
47
+ sample 7-9
48
+ ----------
49
+
50
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample8.png)
51
+
52
+ Online demo is [sample 7](http://www.rin-shun.com/shoes/green-shoes-sample7.swf.html) and [sample 9](http://www.rin-shun.com/shoes/green-shoes-sample9.swf.html).
53
+
54
+ sample 10
55
+ ----------
56
+
57
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample10.png)
58
+
59
+ First shot of background feature implementation. Para got a transparent background.
60
+
61
+ sample 11
62
+ ----------
63
+
64
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample11.png)
65
+
66
+ Online demo is [sample 11](http://www.rin-shun.com/shoes/green-shoes-sample11.swf.html). This is [the same snippet](http://shoes.heroku.com/manual/Events.html#motion{|left,top|...}) on Shoes manual.
67
+
68
+ sample 12
69
+ ----------
70
+
71
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample12.png)
72
+
73
+ Online demo is [sample 12](http://www.rin-shun.com/shoes/green-shoes-sample12.swf.html). First attempt for useful style method.
74
+
75
+ sample 13
76
+ ----------
77
+
78
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample13.png)
79
+
80
+ Online demo is [sample 13](http://www.rin-shun.com/shoes/green-shoes-sample13.swf.html). This is [the same as sample60](http://shoes-tutorial-note.heroku.com/html/00535_Scope__local_variable_and_instance_variable.html) on Shoes Tutorial Note.
81
+
82
+ sample 14
83
+ ----------
84
+
85
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample14.png)
86
+
87
+ Online demo is [sample 14](http://www.rin-shun.com/shoes/green-shoes-sample14.swf.html). This is *flowers.rb* from [shoes/shoes-contrib](https://github.com/shoes/shoes-contrib). Edited a little bit for Green Shoes. It works, but very slow. Need more improvement.
88
+
89
+ sample 15
90
+ ----------
91
+
92
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample15.png)
93
+
94
+ Online demo is [sample 15](http://www.rin-shun.com/shoes/green-shoes-sample15.swf.html). Para is synchronized with slot size and re-layouted immediately.
95
+
96
+ sample 16-17
97
+ -------------
98
+
99
+ snapshots:[sample 16](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample16.png), [sample 17](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample17.png)
100
+
101
+ Implemented the following methods: `banner, title, subtitle, tagline, caption, para, inscription, code, del, em, ins, strong, sub, sup`. And added new methods `bg` and `fg` for convenience to use Pango magic.
102
+
103
+ sample 18
104
+ ----------
105
+
106
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample18.png)
107
+
108
+ Online demo is [sample 18](http://www.rin-shun.com/shoes/green-shoes-sample18.swf.html). Implemented *link* method. Now Link text block will be changed between Link style and LinkHover style and used with all text fragments.
109
+
110
+ sample 19
111
+ ----------
112
+
113
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample19.png)
114
+
115
+ Online demo is [sample 19](http://www.rin-shun.com/shoes/green-shoes-sample19.swf.html). Pong in Green Shoes! Almost the same code as (Red) Shoes [sample58](http://shoes-tutorial-note.heroku.com/html/00704_Assignment_4_Pong_in_Shoes.html).
116
+
117
+ sample 20
118
+ ----------
119
+
120
+ [snapshot](https://github.com/ashbb/green_shoes/raw/master/snapshots/sample20.png)
121
+
122
+ Online demo is [sample 20](http://www.rin-shun.com/shoes/green-shoes-sample20.swf.html). Potacho in Green Shoes! Code is a little bit changed from (Red) Shoes [gallery5](http://shoes-tutorial-note.heroku.com/html/01110_Fancy_Gallery_1-5.html).
123
+
124
+ Note
125
+ ----
126
+
127
+ - [Install Ruby/GTK2 and rcairo for Linux](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack030.md).
128
+ - [Install Ruby/GTK2 and rcairo for Windows](https://github.com/ashbb/shoes_hack_note/tree/master/md/hack031.md).
129
+
130
+ For fun. :-D
131
+
132
+ ashbb
@@ -0,0 +1 @@
1
+ require_relative 'bloops/bloops'
Binary file
@@ -0,0 +1,478 @@
1
+ # downloaded from http://github.com/aanand/1901
2
+ require_relative 'feepogram'
3
+
4
+ bloops = Bloops.new
5
+ bloops.tempo = 320
6
+
7
+ song = Feepogram.new(bloops) do
8
+ sound :hihat, Bloops::NOISE do |s|
9
+ s.punch = 0.5
10
+ s.sustain = 0.05
11
+ s.decay = 0.1
12
+ end
13
+
14
+ sound :kick, Bloops::SINE do |s|
15
+ s.volume = 0.95
16
+ s.slide = -0.4
17
+ end
18
+
19
+ sound :short_kick, Bloops::SINE do |s|
20
+ s.volume = 0.5
21
+ s.slide = -0.4
22
+ end
23
+
24
+ sound :snare, Bloops::NOISE do |s|
25
+ s.volume = 0.9
26
+ s.sustain = 0.0
27
+ s.decay = 0.3
28
+ end
29
+
30
+ sound :cymbal, Bloops::NOISE do |s|
31
+ s.punch = 0.25
32
+ s.volume = 0.25
33
+ end
34
+
35
+ sound :bass, Bloops::SAWTOOTH do |s|
36
+ s.decay = 0.0
37
+ end
38
+
39
+ 2.times do |i|
40
+ sound "high_guitar_#{i+1}", Bloops::SINE do |s|
41
+ s.sustain = 0.05
42
+ s.decay = 0.35
43
+ end
44
+ end
45
+
46
+ 5.times do |i|
47
+ sound "guitar_#{i+1}", Bloops::SQUARE do |s|
48
+ s.punch = 0.1
49
+ s.decay = 0.0
50
+ end
51
+ end
52
+
53
+ sound :bwoo, Bloops::SQUARE do |s|
54
+ s.volume = 0.4
55
+ s.sustain = 1.0
56
+ s.decay = 0.0
57
+ end
58
+
59
+ sound :voice, Bloops::SAWTOOTH do |s|
60
+ s.punch = 0.4
61
+ s.sustain = 0.4
62
+ s.decay = 0.0
63
+ end
64
+
65
+ sound :heyyy, Bloops::SAWTOOTH do |s|
66
+ s.volume = 0.7
67
+ s.punch = 0.0
68
+ s.sustain = 0.3
69
+ s.decay = 0.0
70
+ end
71
+
72
+ # initialize octaves
73
+ def setup
74
+ @tracks[:snare] << " + "
75
+ end
76
+
77
+ def hihat_line
78
+ hihat " e6 " * 8 * 4
79
+ end
80
+
81
+ def drum_verse
82
+ kick " c 4 4 4 c 4 4 4 " * 4
83
+ snare " 4 4 c 4 4 4 c 4 " * 4
84
+ end
85
+
86
+ def high_guitar_line_1
87
+ high_guitar_1 " e5 " * 8 * 4
88
+
89
+ high_guitar_2 %{
90
+ g5 g5 g5 g5 g5 g5 g5 g5
91
+ g5 a5 a5 a5 a5 a5 a5 a5
92
+ g5 g5 g5 g5 g5 g5 g5 g5
93
+ g5 g5 g5 g5 g5 g5 g5 g5
94
+ }
95
+ end
96
+
97
+ def high_guitar_line_2
98
+ high_guitar_1 " c5 " * 8 * 4
99
+
100
+ high_guitar_2 %{
101
+ e5 e5 e5 e5 e5 e5 e5 e5
102
+ e5 g5 g5 g5 g5 g5 g5 g5
103
+ e5 e5 e5 e5 e5 e5 e5 e5
104
+ e5 e5 e5 e5 e5 e5 e5 e5
105
+ }
106
+ end
107
+
108
+ def bass_verse
109
+ bass %{
110
+ 4 4 4 f2 f2 f2 f2 f2
111
+ 4 4 4 a1 a1 a1 a1 a1
112
+ 4 4 4 c2 c2 c2 c2 c2
113
+ 4 4 4 a1 a1 a1 a1 a1
114
+ }
115
+ end
116
+
117
+ def bass_verse_with_leadout
118
+ bass %{
119
+ 4 4 4 f2 f2 f2 f2 f2
120
+ 4 4 4 a1 a1 a1 a1 a1
121
+ 4 4 4 c2 c2 c2 c2 c2
122
+ 4 4 4 c2 c2 a1 a1 a1
123
+ }
124
+ end
125
+
126
+ def bass_verse_with_chorus_leadout
127
+ bass %{
128
+ 4 4 4 f2 f2 f2 f2 f2
129
+ 4 4 4 a1 a1 a1 a1 a1
130
+ 4 4 4 c2 c2 c2 c2 c2
131
+ 4 4 4 c2 c2 c2 c2 c2
132
+ }
133
+ end
134
+
135
+ def guitar_verse
136
+ guitar_1 %{
137
+ 4 4 4 a4 a4 a4 a4 a4
138
+ 4 4 4 g4 g4 g4 g4 g4
139
+ 4 4 4 g4 g4 g4 g4 g4
140
+ 4 4 4 g4 g4 g4 g4 g4
141
+ }
142
+
143
+ guitar_2 %{
144
+ 4 4 4 f4 f4 f4 f4 f4
145
+ 4 4 4 e4 e4 e4 e4 e4
146
+ 4 4 4 e4 e4 e4 e4 e4
147
+ 4 4 4 e4 e4 e4 e4 e4
148
+ }
149
+
150
+ guitar_3 %{
151
+ 4 4 4 d4 d4 d4 d4 d4
152
+ 4 4 4 c4 c4 c4 c4 c4
153
+ 4 4 4 c4 c4 c4 c4 c4
154
+ 4 4 4 c4 c4 c4 c4 c4
155
+ }
156
+ end
157
+
158
+ def guitar_chorus_leadout
159
+ guitar_1 %{
160
+ 4 4 4 4 4 4 4 4
161
+ 4 4 4 4 4 4 4 4
162
+ 4 4 4 4 4 4 4 4
163
+ 4 4 4 g4 g4 g4 g4 g4
164
+ }
165
+
166
+ guitar_2 %{
167
+ 4 4 4 4 4 4 4 4
168
+ 4 4 4 4 4 4 4 4
169
+ 4 4 4 4 4 4 4 4
170
+ 4 4 4 e4 e4 e4 e4 e4
171
+ }
172
+
173
+ guitar_3 %{
174
+ 4 4 4 4 4 4 4 4
175
+ 4 4 4 4 4 4 4 4
176
+ 4 4 4 4 4 4 4 4
177
+ 4 4 4 c4 c4 c4 c4 c4
178
+ }
179
+ end
180
+
181
+ def guitar_chorus
182
+ guitar_1 %{
183
+ a4 8:a4 8:a4 a4 g4 g4 g4 a4 8:a4 8:a4
184
+ a4 g4 g4 g4 a4 a4 g4 g4
185
+ a4 8:a4 8:a4 a4 g4 g4 g4 a4 8:a4 8:a4
186
+ a4 g4 g4 g4 a4 a4 g4 g4
187
+ }
188
+
189
+ guitar_2 %{
190
+ f4 8:f4 8:f4 f4 e4 e4 e4 f4 8:f4 8:f4
191
+ f4 e4 e4 e4 f4 f4 e4 e4
192
+ f4 8:f4 8:f4 f4 e4 e4 e4 f4 8:f4 8:f4
193
+ f4 e4 e4 e4 f4 f4 e4 e4
194
+ }
195
+
196
+ guitar_3 %{
197
+ d4 8:d4 8:d4 d4 c4 c4 c4 d4 8:d4 8:d4
198
+ d4 c4 c4 c4 d4 d4 c4 c4
199
+ d4 8:d4 8:d4 d4 c4 c4 c4 d4 8:d4 8:d4
200
+ d4 c4 c4 c4 d4 d4 c4 c4
201
+ }
202
+ end
203
+
204
+ def voice_post_chorus
205
+ voice %{
206
+ 4 4 2:g[sustain:1.0] c[sustain:0.3] 4 2:g[sustain:1.0]
207
+ c 4 2:g[sustain:1.0] c[sustain:0.3] 4 2:g[sustain:1.0]
208
+ 2:e[sustain:1.0] 2 1
209
+ 1 1
210
+ }
211
+ end
212
+
213
+ def intro
214
+ phrase do
215
+ hihat_line
216
+ bass_verse
217
+ high_guitar_line_1
218
+ end
219
+
220
+ phrase do
221
+ hihat_line
222
+ bass_verse
223
+ high_guitar_line_2
224
+ end
225
+ end
226
+
227
+ def verse_phrase_1
228
+ drum_verse
229
+ bass_verse
230
+ guitar_verse
231
+ end
232
+
233
+ def verse_phrase_2
234
+ drum_verse
235
+ bass_verse_with_leadout
236
+ guitar_verse
237
+ end
238
+
239
+ def verse_phrase_3
240
+ hihat_line
241
+ kick " c 4 4 4 c 4 4 c " * 4
242
+ snare " 4 4 c 4 4 c 4 4 " * 4
243
+ bass_verse
244
+ high_guitar_line_1
245
+ end
246
+
247
+ def verse_phrase_4
248
+ hihat_line
249
+ kick " c 4 4 4 c 4 4 c " * 4
250
+ snare " 4 4 c 4 4 c 4 4 " * 4
251
+ bass_verse_with_chorus_leadout
252
+ guitar_chorus_leadout
253
+ high_guitar_line_2
254
+ end
255
+
256
+ def verse_instrumental
257
+ 2.times do
258
+ phrase do
259
+ verse_phrase_1
260
+ end
261
+ end
262
+ end
263
+
264
+ def verse_1
265
+ phrase do
266
+ verse_phrase_1
267
+
268
+ voice %{
269
+ 4 4 4 4 g[sustain:0.3] 4 g 4
270
+ c c g 4 g 4 c c
271
+ c g 4 4 4 4 4 4
272
+ 4 4 4 4 4 4 4 4
273
+ }
274
+ end
275
+
276
+ phrase do
277
+ verse_phrase_2
278
+
279
+ voice %{
280
+ e 4 e 4 e 4 e d
281
+ e e e 4 e e g a
282
+ e 4 4 4 4 4 4 4
283
+ 4 4 4 4 4 4 4 4
284
+ }
285
+ end
286
+ end
287
+
288
+ def verse_2
289
+ phrase do
290
+ verse_phrase_3
291
+
292
+ voice %{
293
+ e 4 e 4 e e e e
294
+ c c d 4 d d d c
295
+ e 4 e d c - g + c d
296
+ d d d d d - a a a +
297
+ }
298
+ end
299
+
300
+ phrase do
301
+ verse_phrase_4
302
+
303
+ voice %{
304
+ 4 4 e 4 e e e e
305
+ c c d 4 d d g e
306
+ e 4 4 4 4 4 4 4
307
+ 4 4 4 4 4 4 4 4
308
+ }
309
+ end
310
+ end
311
+
312
+ def chorus_phrase_1
313
+ kick " c 4 4 c 4 4 c 4 " * 4
314
+ short_kick " 4 8:c 8:c c 4 8:c 8:c c 4 c " * 4
315
+ snare %{
316
+ 4 4 4 4 4 4 c 4
317
+ 4 4 4 4 4 c 4 c
318
+ 4 4 4 4 4 4 c 4
319
+ 4 4 4 4 4 c 4 c
320
+ }
321
+
322
+ bass " c2 " * 32
323
+
324
+ guitar_chorus
325
+ end
326
+
327
+ def chorus_phrase_2
328
+ kick " c 4 4 4 " * 8
329
+ snare %{
330
+ 4 4 c 4 4 4 c 4
331
+ 4 4 c 4 4 4 c 4
332
+ 4 4 c 4 4 4 c 4
333
+ 4 4 c 4 4 c 4 c
334
+ }
335
+ cymbal " 2:c6 " * 16
336
+
337
+ bass " g2 " * 32
338
+
339
+ guitar_chorus
340
+ end
341
+
342
+ def heyyy_chorus
343
+ heyyy %{
344
+ 1 1
345
+ 1 1
346
+ 1 1
347
+ 3:g #{ " 24:f 24:f# 4:g " * 5 }
348
+ }
349
+ end
350
+
351
+ def chorus_1
352
+ phrase do
353
+ chorus_phrase_1
354
+
355
+ voice %{
356
+ 4 4 4 4 4 - g + c c
357
+ c c c c c 4 - a g
358
+ 4 4 4 4 4 4 2:g[sustain:2.0] +
359
+ 1 1
360
+ }
361
+
362
+ heyyy_chorus
363
+ end
364
+
365
+ phrase do
366
+ chorus_phrase_2
367
+
368
+ voice %{
369
+ 4 4 4 4 4 4 2:g
370
+ g[sustain:0.4] e e g g e e 4
371
+ 4 4 4 4 4 4 e d
372
+ e e e e e f e 4
373
+ }
374
+ end
375
+ end
376
+
377
+ def chorus_2
378
+ phrase do
379
+ chorus_phrase_1
380
+
381
+ voice %{
382
+ 4 4 4 4 4 - g + c c
383
+ c c c c c 4 - a + 2:e[sustain:2.0]
384
+ 4 4 4 4 4 - 2:g +
385
+ 1 1
386
+ }
387
+
388
+ heyyy_chorus
389
+ end
390
+
391
+ phrase do
392
+ chorus_phrase_2
393
+
394
+ bwoo %{
395
+ 16:c 16:c# 8:d 4:d 2:d 1:d
396
+ 1:d 1:d +
397
+ 16:c 16:c# 8:d 4:d 2:d 1:d
398
+ 1:d 1:d[sustain:0.5] -
399
+ }
400
+
401
+ voice %{
402
+ 4 4 4 4 4 4 2:g[sustain:0.4]
403
+ g[sustain:0.3] e e g g e e 4
404
+ 4 4 4 4 4 c c c
405
+ c c c[sustain:0.1] c c[sustain:0.3] 4 2:e
406
+ }
407
+ end
408
+ end
409
+
410
+ def post_chorus
411
+ phrase do
412
+ drum_verse
413
+ bass_verse
414
+ guitar_verse
415
+ voice_post_chorus
416
+ end
417
+
418
+ phrase do
419
+ drum_verse
420
+ bass_verse_with_chorus_leadout
421
+ guitar_verse
422
+ voice_post_chorus
423
+ end
424
+ end
425
+
426
+ def outro_1
427
+ phrase do
428
+ hihat_line
429
+ kick " c 4 4 c 4 4 c 4 " * 4
430
+ bass " c2 " * 32
431
+
432
+ guitar_4 %{
433
+ 3:c 3:c 3:c 3:c 3:c 3:c
434
+ c c c c c c g g
435
+ 3:c 3:c 3:c 3:c 3:c 3:c
436
+ c c c c c g g g
437
+ }
438
+ end
439
+ end
440
+
441
+ def outro_2
442
+ phrase do
443
+ drum_verse
444
+ bass " c2 " * 32
445
+ guitar_chorus
446
+
447
+ guitar_4 " 3:g " * 24
448
+
449
+ guitar_5 %{ +
450
+ c d e 2:d d c d
451
+ e 2:d d c d e d
452
+ c d e 2:d d c d
453
+ e 2:d d c d e d
454
+ }
455
+ end
456
+ end
457
+
458
+ def the_end
459
+ phrase do
460
+ bass "c2"
461
+ end
462
+ end
463
+
464
+ setup
465
+
466
+ intro
467
+ verse_instrumental
468
+ verse_1
469
+ verse_2
470
+ chorus_1
471
+ chorus_2
472
+ post_chorus
473
+ outro_1
474
+ outro_2
475
+ the_end
476
+ end
477
+
478
+ song.play