atome 0.5.7.5.9 → 0.5.7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/atome.gemspec +1 -1
- data/lib/atome/version.rb +1 -1
- data/vendor/assets/application/examples/timeline.rb +132 -0
- data/vendor/assets/src/index.html +1 -1
- data/vendor/assets/src/index_opal.html +1 -1
- data/vendor/assets/src/index_server.html +1 -1
- data/vendor/assets/src/index_server_wasm.html +1 -1
- data/vendor/assets/src/index_wasm.html +1 -1
- data/vendor/assets/src/js/atome/atome.js +9 -1
- data/vendor/assets/src/js/third_parties/a_pianoroll.js +1676 -0
- data/vendor/assets/src/medias/images/waveform.png +0 -0
- metadata +5 -17
- data/vendor/assets/src/js/third_parties/webaudio-pianoroll.min.js +0 -66
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8683810a4229f46f83fedc0082abec705c40c50027448eaa55221e23cf998eac
|
4
|
+
data.tar.gz: cde9cfeb19af83e907f31e335089101d054eb915879a80f1d874e120c854f7aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bc5ea1c48dbf71230ad96cd03b5ce5809e1888c1ffd6b6f401bc1aac1bb52b6a41af02fcffaadbd6dfece40b5c2b7f3e1c791bbd2b441c46e00c0c5ab95ddfc
|
7
|
+
data.tar.gz: fd3d2c4b09628c14d56541f9691ea328dee9e99437dcc3be2eec05c035f3c6719524ada714c66307f9edb0b1c821ff6972fd4bbf13570c65251bb5893d139aec
|
data/atome.gemspec
CHANGED
@@ -76,7 +76,7 @@ Gem::Specification.new do |spec|
|
|
76
76
|
spec.add_runtime_dependency 'rake', '~> 13.0'
|
77
77
|
spec.add_runtime_dependency 'roda', '~> 3.5'
|
78
78
|
spec.add_runtime_dependency 'rqrcode', '~> 2.2.0'
|
79
|
-
spec.add_runtime_dependency 'ruby2js', '~> 5.0'
|
79
|
+
# spec.add_runtime_dependency 'ruby2js', '~> 5.0'
|
80
80
|
spec.add_runtime_dependency 'rufus-scheduler', '~> 3.8'
|
81
81
|
spec.add_runtime_dependency 'securerandom', '~> 0.2'
|
82
82
|
spec.add_runtime_dependency 'sequel', '~> 5.5'
|
data/lib/atome/version.rb
CHANGED
@@ -0,0 +1,132 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new(molecule: :roller) do |params={}|
|
4
|
+
roller_id=params[:id] ||= identity_generator
|
5
|
+
p=box({id: roller_id, width: 900, height: 333, color: :orange})
|
6
|
+
JS.eval("aRoll('#{roller_id}_roller','#{roller_id}', #{p.width}, #{p.height})")
|
7
|
+
|
8
|
+
end
|
9
|
+
new({molecule: :button}) do |params|
|
10
|
+
but=box({smooth: 6, shadow: {alpha: 0.3}})
|
11
|
+
but.shadow({alpha: 0.3, left: -3, top: -3, blur: 3, invert: true})
|
12
|
+
case
|
13
|
+
when params.key?(:touch)
|
14
|
+
but.touch(true) do
|
15
|
+
alert :to_finish
|
16
|
+
# send(params[:touch])
|
17
|
+
end
|
18
|
+
else
|
19
|
+
end
|
20
|
+
but.text({data: params[:label]})
|
21
|
+
end
|
22
|
+
# JS.eval <<~JS
|
23
|
+
# var actx, osc, gain;
|
24
|
+
#
|
25
|
+
# function init_audio() {
|
26
|
+
# timebase = 16;
|
27
|
+
# actx = new AudioContext();
|
28
|
+
# osc = actx.createOscillator();
|
29
|
+
# gain = actx.createGain();
|
30
|
+
# gain.gain.value = 0;
|
31
|
+
# osc.type = "sawtooth";
|
32
|
+
# osc.start();
|
33
|
+
# osc.connect(gain).connect(actx.destination);
|
34
|
+
# }
|
35
|
+
#
|
36
|
+
#
|
37
|
+
# function Callback(ev) {
|
38
|
+
# const currentTime = actx.currentTime;
|
39
|
+
# const startTime = currentTime + (ev.t - performance.now() / 1000);
|
40
|
+
# const endTime = currentTime + (ev.g - performance.now() / 1000);
|
41
|
+
# osc.detune.setValueAtTime((ev.n - 69) * 100, startTime);
|
42
|
+
# gain.gain.setTargetAtTime(0.5, startTime, 0.005);
|
43
|
+
# gain.gain.setTargetAtTime(0, endTime, 0.1);
|
44
|
+
# }
|
45
|
+
#
|
46
|
+
# function play() {
|
47
|
+
# gain.connect(actx.destination);
|
48
|
+
# actx.resume().then(() => {
|
49
|
+
# console.log('Audio context resumed');
|
50
|
+
# });
|
51
|
+
# document.getElementById("proll").play(Callback);
|
52
|
+
# }
|
53
|
+
#
|
54
|
+
# function stop() {
|
55
|
+
# gain.disconnect();
|
56
|
+
# actx.suspend().then(() => {
|
57
|
+
# console.log('Audio context suspended');
|
58
|
+
# });
|
59
|
+
# document.getElementById('proll').stop()
|
60
|
+
# }
|
61
|
+
# JS
|
62
|
+
|
63
|
+
|
64
|
+
# <script>
|
65
|
+
# var actx, osc, gain;
|
66
|
+
#
|
67
|
+
# function init_audio() {
|
68
|
+
# timebase = 16;
|
69
|
+
# actx = new AudioContext();
|
70
|
+
# osc = actx.createOscillator();
|
71
|
+
# gain = actx.createGain();
|
72
|
+
# gain.gain.value = 0;
|
73
|
+
# osc.type = "sawtooth";
|
74
|
+
# osc.start();
|
75
|
+
# osc.connect(gain).connect(actx.destination);
|
76
|
+
# }
|
77
|
+
#
|
78
|
+
#
|
79
|
+
# function Callback(ev) {
|
80
|
+
# const currentTime = actx.currentTime;
|
81
|
+
# const startTime = currentTime + (ev.t - performance.now() / 1000);
|
82
|
+
# const endTime = currentTime + (ev.g - performance.now() / 1000);
|
83
|
+
# osc.detune.setValueAtTime((ev.n - 69) * 100, startTime);
|
84
|
+
# gain.gain.setTargetAtTime(0.5, startTime, 0.005);
|
85
|
+
# gain.gain.setTargetAtTime(0, endTime, 0.1);
|
86
|
+
# }
|
87
|
+
#
|
88
|
+
# function play() {
|
89
|
+
# gain.connect(actx.destination);
|
90
|
+
# actx.resume().then(() => {
|
91
|
+
# console.log('Audio context resumed');
|
92
|
+
# });
|
93
|
+
# document.getElementById("proll").play(Callback);
|
94
|
+
# }
|
95
|
+
#
|
96
|
+
# function stop() {
|
97
|
+
# gain.disconnect();
|
98
|
+
# actx.suspend().then(() => {
|
99
|
+
# console.log('Audio context suspended');
|
100
|
+
# });
|
101
|
+
# document.getElementById('proll').stop()
|
102
|
+
# }
|
103
|
+
# </script>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
def play(id)
|
109
|
+
JS.eval("document.getElementById('#{id}').play(pianorollCallback);")
|
110
|
+
end
|
111
|
+
roller({id: :roller})
|
112
|
+
button({touch: "play", label: :play})
|
113
|
+
|
114
|
+
|
115
|
+
# <button onclick="setTempo('proll')">set tempo</button>
|
116
|
+
# <button onclick="play()">Play</button>
|
117
|
+
# <button onclick="stop()">Stop</button>
|
118
|
+
# <button onclick="changeEditMode('proll','dragmono')">Drag Mono</button>
|
119
|
+
# <button onclick="changeEditMode('proll','dragpoly')">Drag Poly</button>
|
120
|
+
# <button onclick="AddNote('proll')">Add Note</button>
|
121
|
+
# <button onclick="setMarkStart('proll')">set start marker</button>
|
122
|
+
# <button onclick="setMarkEnd('proll')">set end marker</button>
|
123
|
+
# <button onclick="playHead('proll')">Move play head</button>
|
124
|
+
# <button onclick="menu('proll')">menu</button>
|
125
|
+
# <button onclick="editing('proll')">edit/select</button>
|
126
|
+
# <button onclick="group('proll')">group</button>
|
127
|
+
# <button onclick="notes('proll')">notes list</button>
|
128
|
+
# <button onclick="selectAll('proll')">select all</button>
|
129
|
+
# <button onclick="deSelectAll('proll')">de-select all</button>
|
130
|
+
# <button onclick="deleteSelectedNotes('proll')">delete selection</button>
|
131
|
+
# <button onclick="marker('proll')">marker</button>
|
132
|
+
# <button onclick="removeMarker('proll')">remove marker</button>
|
@@ -20,7 +20,6 @@
|
|
20
20
|
<script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
|
21
21
|
<script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
|
22
22
|
<script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
|
23
|
-
<script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
|
24
23
|
<script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
|
25
24
|
<script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
|
26
25
|
<script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
|
@@ -32,6 +31,7 @@
|
|
32
31
|
<script src="js/atome/utilities/importmap.js" type="text/javascript"></script>
|
33
32
|
<script defer type="module" src="js/atome/utilities/three_module.js"></script>
|
34
33
|
<script type="text/javascript" src="js/third_parties/toastui-calendar.min.js" defer></script>
|
34
|
+
<script type="text/javascript" src="js/third_parties/a_pianoroll.js" defer></script>
|
35
35
|
<title>atome</title>
|
36
36
|
</head>
|
37
37
|
<body id='user_view' class='atome'>
|
@@ -20,7 +20,6 @@
|
|
20
20
|
<script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
|
21
21
|
<script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
|
22
22
|
<script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
|
23
|
-
<script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
|
24
23
|
<script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
|
25
24
|
<script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
|
26
25
|
<script defer src="js/third_parties/fabric.min.js" type="text/javascript"></script>
|
@@ -38,6 +37,7 @@
|
|
38
37
|
<script src="js/atome/utilities/importmap.js" type="text/javascript"></script>
|
39
38
|
<script defer type="module" src="js/atome/utilities/three_module.js"></script>
|
40
39
|
<script type="text/javascript" src="js/third_parties/toastui-calendar.min.js" defer></script>
|
40
|
+
<script type="text/javascript" src="js/third_parties/a_pianoroll.js" defer></script>
|
41
41
|
<title>atome</title>
|
42
42
|
</head>
|
43
43
|
<body id='user_view' class='atome'>
|
@@ -19,7 +19,6 @@
|
|
19
19
|
<script defer src="js/third_parties/sortable.min.js" type="text/javascript"></script>
|
20
20
|
<script defer src="js/third_parties/wad.min.js" type="text/javascript"></script>
|
21
21
|
<script defer src="js/third_parties/wavesurfer.min.js" type="text/javascript"></script>
|
22
|
-
<script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
|
23
22
|
<script defer src="js/third_parties/sha256.min.js" type="text/javascript"></script>
|
24
23
|
<script defer src="js/third_parties/ping.min.js" type="text/javascript"></script>
|
25
24
|
<script defer src="js/third_parties/fabric.min.js" type="text/javascript"></script>
|
@@ -37,6 +36,7 @@
|
|
37
36
|
<script src="js/atome/utilities/importmap.js" type="text/javascript"></script>
|
38
37
|
<script defer type="module" src="js/atome/utilities/three_module.js"></script>
|
39
38
|
<script type="text/javascript" src="js/third_parties/toastui-calendar.min.js" defer></script>
|
39
|
+
<script type="text/javascript" src="js/third_parties/a_pianoroll.js" defer></script>
|
40
40
|
<title>atome</title>
|
41
41
|
</head>
|
42
42
|
<body id='user_view' class='atome'>
|
@@ -21,7 +21,6 @@
|
|
21
21
|
<script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
|
22
22
|
<script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
|
23
23
|
<script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
|
24
|
-
<script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
|
25
24
|
<script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
|
26
25
|
<script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
|
27
26
|
<script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
|
@@ -33,6 +32,7 @@
|
|
33
32
|
<script src="js/atome/utilities/importmap.js" type="text/javascript"></script>
|
34
33
|
<script defer type="module" src="js/atome/utilities/three_module.js"></script>
|
35
34
|
<script type="text/javascript" src="js/third_parties/toastui-calendar.min.js" defer></script>
|
35
|
+
<script type="text/javascript" src="js/third_parties/a_pianoroll.js" defer></script>
|
36
36
|
<title>atome</title>
|
37
37
|
</head>
|
38
38
|
<body id='user_view' class='atome'>
|
@@ -20,7 +20,6 @@
|
|
20
20
|
<script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
|
21
21
|
<script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
|
22
22
|
<script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
|
23
|
-
<script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
|
24
23
|
<script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
|
25
24
|
<script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
|
26
25
|
<script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
|
@@ -32,6 +31,7 @@
|
|
32
31
|
<script src="js/atome/utilities/importmap.js" type="text/javascript"></script>
|
33
32
|
<script defer type="module" src="js/atome/utilities/three_module.js"></script>
|
34
33
|
<script type="text/javascript" src="js/third_parties/toastui-calendar.min.js" defer></script>
|
34
|
+
<script type="text/javascript" src="js/third_parties/a_pianoroll.js" defer></script>
|
35
35
|
<title>atome</title>
|
36
36
|
</head>
|
37
37
|
<body id='user_view' class='atome'>
|
@@ -522,7 +522,15 @@ function isDescendant(parentId, childId) {
|
|
522
522
|
return false;
|
523
523
|
|
524
524
|
}
|
525
|
-
|
525
|
+
function pianorollCallback(ev) {
|
526
|
+
console.log(ev);
|
527
|
+
// const currentTime = actx.currentTime;
|
528
|
+
// const startTime = currentTime + (ev.t - performance.now() / 1000);
|
529
|
+
// const endTime = currentTime + (ev.g - performance.now() / 1000);
|
530
|
+
// osc.detune.setValueAtTime((ev.n - 69) * 100, startTime);
|
531
|
+
// gain.gain.setTargetAtTime(0.5, startTime, 0.005);
|
532
|
+
// gain.gain.setTargetAtTime(0, endTime, 0.1);
|
533
|
+
}
|
526
534
|
// alert(isDescendant('intuition', 'the_test_box'));
|
527
535
|
// alert(isDescendant('view', 'the_test_box'));
|
528
536
|
|