minor optimisations
This commit is contained in:
@ -100,9 +100,6 @@ export const installEditor = (app: Editor) => {
|
||||
editorSetup,
|
||||
toposTheme,
|
||||
app.chosenLanguage.of(javascript()),
|
||||
EditorView.updateListener.of((v: ViewUpdate) => {
|
||||
v;
|
||||
}),
|
||||
];
|
||||
app.dynamicPlugins = new Compartment();
|
||||
app.state = EditorState.create({
|
||||
|
||||
@ -135,10 +135,8 @@ export const registerOnKeyDown = (app: Editor) => {
|
||||
if (event.keyCode === keycode) {
|
||||
event.preventDefault();
|
||||
if (event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
app.api.script(keycode - 111);
|
||||
} else {
|
||||
event.preventDefault();
|
||||
app.changeModeFromInterface("local");
|
||||
app.changeToLocalBuffer(index);
|
||||
hideDocumentation();
|
||||
|
||||
@ -22,8 +22,10 @@ export class TransportNode extends AudioWorkletNode {
|
||||
this.app.clock.tick
|
||||
);
|
||||
this.app.clock.time_position = futureTimeStamp;
|
||||
if (futureTimeStamp.pulse % this.app.clock.ppqn == 0) {
|
||||
this.timeviewer.innerHTML = `${zeroPad(futureTimeStamp.bar, 2)}:${futureTimeStamp.beat + 1
|
||||
}:${zeroPad(futureTimeStamp.pulse, 2)} / ${this.app.clock.bpm}`;
|
||||
} / ${this.app.clock.bpm}`;
|
||||
}
|
||||
if (this.app.exampleIsPlaying) {
|
||||
tryEvaluate(this.app, this.app.example_buffer);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user