summaryrefslogtreecommitdiff
path: root/jni/ruby/sample/trick2013/mame/entry.rb
blob: 8abfc2be4034de017dee926d92a093d11f8fced6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
                  eval$C=%q(at_exit{
                  open("/dev/dsp","wb"){|g|h=[0]*80
                  $><<"\s"*18+"eval$C=%q(#$C);S=%:"
                  (S<<m=58).lines{|l|s=[128]*n=20E2
                  t=0;           h.map!{|v|d=?!==l[
                  t]?1                         :(l[
                  t]==                         ?#)?
                  0*v=                         6:03
                  (v<1                         ?[]:
                  0..n                         -1).
                  each                         {|z|
                  s[z]                         +=2*
          M.sin(($*[0]                         ||1)
        .to_f*M.sin(y=                 40*(z+m)*2**
        (t/12E0)/463)+               y)*(v-z*d/n)};
        t+=1;v-d};m+=                n;g.flush<<(s.
          pack"C*");                 puts(l)}}};M=
                                       Math);S=%:

                 Jesu, Joy of Man's Desiring
                    Johann Sebastian Bach

          #
          |                       #
          |                         #
                      #      #    #   #
                      |      |    |      #
                      |      |   #     #
                   #           #  #    #
                   |           |  |        #
                   |           |    #    #
              #                   #   #  #
              |                   |   |       #
              |                   | #        #
                   #           #      #       #
                   |           |      |  #
                   |           |  #   #
                   #      #    #  #
                   |      |    |    #
                   |      |  #        #
            #           #      #       #
            |           |      |         #
            |           |        #         #
              #              #    #      #
              |              |    |    #
              |              |        #
               #           #   #    #
               |           |   |      #
               |          #|      #
                 #      #  |     #
                 |      |  |      #
                 |         | #      #
                     #  #    #      #
                     |  |        #  |
                     |  |         # #
                 #               #  #  #
                 |               |  | #
                 |               |  #
                      #      #    #   #
                      |      |    #   |
                      |          #  # |
                   #  #           #   #
                   |  |           |      #
                   |  |          #     #
               #               #  #    #
               |               |  |        #
               |               |    #    #
              #                   #   #  #
              |                   |   |       #
              |                   | #        #
                   #           #      #       #
                   |           |      |  #
                   |           |  #   #
                 #        #    #  #
                 |        |    |    #
                 |        |       #   #
               #           #   #    #
               |           |        |    #
               |           |     #     #
                #              #  #   #
                |              |  | #
                |              #  #
                 #      #    #
                 |      |    |    #
                 |         # |   #
          #               #  #    #
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    |
          |               |  |    :