git.s-ol.nu isomorphic-kb-explorer / 43c7ca9
add blink function s-ol 4 months ago
1 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
140140 this.props.midiin.onmidimessage = this.onmessage;
141141 }
142142
143 blink = (note) => {
144 if (this.keyboardRef.current) {
145 const { current } = this.keyboardRef;
146 current.onmessage({ cmd: NOTE_ON, note });
147 setTimeout(() => current.onmessage({ cmd: NOTE_OFF, note }), 250);
148 }
149 }
150
143151 onmessage = (e) => {
144152 const message = parse(e);
145153
182190
183191 <Keyboard
184192 ref={this.keyboardRef}
185 w={10}
193 w={12}
186194 h={4}
187195 send={this.send}
188196 layout={layout}