-
Notifications
You must be signed in to change notification settings - Fork 1
/
looper.html
90 lines (72 loc) · 3.29 KB
/
looper.html
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
<script type="text/javascript">
RED.nodes.registerType('looper',{
category: 'music',
color: '#a6bbcf',
defaults: {
name: {value: "looper"},
volume: {value: 100},
input: {value: "beat",
required: true},
length: {value: 4, required: true},
start: {value: "bar", required: true},
loop: {value: false, required: true}
},
inputs:1,
inputLabels: "tick,play,record,stop,reset",
outputs:1,
outputLabels: "supercollider instructions",
icon: "microphone.png",
label: function() {
return this.name || "looper";
}
});
</script>
<script type="text/x-red" data-template-name="looper">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-input">Input event</label>
<input type="text" id="node-input-input" placeholder="e.g. beat">
</div>
<div class="form-row">
<label for="node-input-volume"> Volume</label>
<input type="number" min="0" max="200" id="node-input-volume" placeholder="0-200" style="width:7em">
</div>
<div class="form-row">
<label for="node-input-length">Length of loop (count of input event)</label>
<input type="number" id="node-input-length" placeholder="e.g. 4">
</div>
<div class="form-row">
<label for="node-input-start">Start event</label>
<input type="text" id="node-input-start" placeholder="e.g. bar">
</div>
<div class="form-row">
<label for="node-input-loop">Loop</label>
<input type="checkbox" id="node-input-loop">
</div>
</script>
<script type="text/x-red" data-help-name="looper">
<p>Samples and replays (loops) sounds.</p>
<h3>Inputs</h3>
<dl class='message-properties'>
<dt>payload <span class='property-type'>(string)</span></dt>
<dd><code>msg.payload</code> is used to control the looper with <code>start</code>, <code>stop</code>, or <code>record</code>. If the payload is <code>tick</code> then the <code>start</code> property of the message is used to control the recording or playing, to align it with the beat.</dd>
</dl>
<h3>Outputs</h3>
<p>The looper outputs SuperCollider instructions, which should be sent via an <code>osc</code> node.</p>
<h3>Configuration</h3>
<dl class='message-properties'>
<dt><span class='optional'>Name</span> <span class='property-type'>(string)</span></dt>
<dd>The label for the node.</dd>
<dt><span class='optional'>Input event</span> <span class='property-type'>(string)</span></dt>
<dd>Counting this event will control how long the looper records and plays back for. Defaults to <i>beat</i>.</dd>
<dt><span class='optional'>Length of loop</span> <span class='property-type'>(string)</span></dt>
<dd>The number of input events the loop lasts for.</dd>
<dt><span class='optional'>Start event</span> <span class='property-type'>(string)</span></dt>
<dd>The looper will wait until this event (included in <code>msg.start</code>) to start the recording/playing. By default this is <code>bar</code>, but could be e.g. <code>section</code></dd>
<dt><span class='optional'>Loop</span> <span class='property-type'>(boolean)</span></dt>
<dd>If selected, playback will restart as soon as it is finished. Will also start playing back as soon as recording is finished.</dd>
</dl>
</script>