-
+
@@ -4565,6 +4565,15 @@
return time
},
+ runSoon( evt ) {
+
+ try{
+ evt.func()
+ }catch(e) {
+ console.log( 'annotiation error:', e.toString() )
+ }
+ },
+
run( timestamp, dt ) {
let nextEvent = this.queue.peek()
//if( nextEvent === undefined ) return
@@ -4574,12 +4583,13 @@
// remove event
this.queue.pop()
- try{
- nextEvent.func()
- }catch( e ) {
- console.log( e )
- Gibber.Environment.error( 'annotation error:', e.toString() )
- }
+ setTimeout( ()=> this.runSoon( nextEvent ) )
+ //try{
+ // nextEvent.func()
+ //}catch( e ) {
+ // console.log( e )
+ // Gibber.Environment.error( 'annotation error:', e.toString() )
+ //}
// call recursively
this.run( timestamp )
@@ -9214,7 +9224,7 @@
Gibber.Gen.lastConnected.push( seq.timings )
}
- return obj[ methodName ]
+ return seq
}
obj[ methodName ].seq.delay = v => obj[ methodName ][ lastId ].delay( v )
@@ -9918,9 +9928,9 @@
const lastMIDIInput = localStorage.getItem('midi.input'),
lastMIDIOutput = localStorage.getItem('midi.output')
- if( lastMIDIInput !== null && lastMIDIInput !== undefined ) {
- this.selectInputByName( lastMIDIInput )
- }
+ //if( lastMIDIInput !== null && lastMIDIInput !== undefined ) {
+ // this.selectInputByName( lastMIDIInput )
+ //}
if( lastMIDIOutput !== null && lastMIDIOutput !== undefined ) {
this.selectOutputByName( lastMIDIOutput )
}
@@ -9932,23 +9942,23 @@
},
createInputAndOutputLists( midiAccess ) {
- let optin = document.createElement( 'option' )
- optin.text = 'none'
+ //let optin = document.createElement( 'option' )
+ //optin.text = 'none'
let optout = document.createElement( 'option' )
optout.text = 'none'
- MIDI.midiInputList.add( optin )
+ //MIDI.midiInputList.add( optin )
MIDI.midiOutputList.add( optout )
- MIDI.midiInputList.onchange = MIDI.selectInputViaGUI
+ //MIDI.midiInputList.onchange = MIDI.selectInputViaGUI
MIDI.midiOutputList.onchange = MIDI.selectOutputViaGUI
- const inputs = midiAccess.inputs
- for( let input of inputs.values() ) {
- const opt = document.createElement( 'option' )
- opt.text = input.name
- opt.input = input
- MIDI.midiInputList.add( opt )
- }
+ //const inputs = midiAccess.inputs
+ //for( let input of inputs.values() ) {
+ // const opt = document.createElement( 'option' )
+ // opt.text = input.name
+ // opt.input = input
+ // MIDI.midiInputList.add( opt )
+ //}
const outputs = midiAccess.outputs
for( let output of outputs.values() ) {
diff --git a/index_template.html b/index_template.html
index fcf02f1..9237399 100644
--- a/index_template.html
+++ b/index_template.html
@@ -28,7 +28,7 @@
-
+
diff --git a/js/animationScheduler.js b/js/animationScheduler.js
index 1c543bb..01da059 100644
--- a/js/animationScheduler.js
+++ b/js/animationScheduler.js
@@ -24,6 +24,15 @@ let Scheduler = {
return time
},
+ runSoon( evt ) {
+
+ try{
+ evt.func()
+ }catch(e) {
+ console.log( 'annotiation error:', e.toString() )
+ }
+ },
+
run( timestamp, dt ) {
let nextEvent = this.queue.peek()
//if( nextEvent === undefined ) return
@@ -33,12 +42,13 @@ let Scheduler = {
// remove event
this.queue.pop()
- try{
- nextEvent.func()
- }catch( e ) {
- console.log( e )
- Gibber.Environment.error( 'annotation error:', e.toString() )
- }
+ setTimeout( ()=> this.runSoon( nextEvent ) )
+ //try{
+ // nextEvent.func()
+ //}catch( e ) {
+ // console.log( e )
+ // Gibber.Environment.error( 'annotation error:', e.toString() )
+ //}
// call recursively
this.run( timestamp )
diff --git a/js/gibber.js b/js/gibber.js
index 6b89199..0ff6a4d 100644
--- a/js/gibber.js
+++ b/js/gibber.js
@@ -216,7 +216,7 @@ let Gibber = {
Gibber.Gen.lastConnected.push( seq.timings )
}
- return obj[ methodName ]
+ return seq
}
obj[ methodName ].seq.delay = v => obj[ methodName ][ lastId ].delay( v )
diff --git a/js/midi.js b/js/midi.js
index 7eb662a..ed81c1a 100644
--- a/js/midi.js
+++ b/js/midi.js
@@ -45,9 +45,9 @@ const MIDI = {
const lastMIDIInput = localStorage.getItem('midi.input'),
lastMIDIOutput = localStorage.getItem('midi.output')
- if( lastMIDIInput !== null && lastMIDIInput !== undefined ) {
- this.selectInputByName( lastMIDIInput )
- }
+ //if( lastMIDIInput !== null && lastMIDIInput !== undefined ) {
+ // this.selectInputByName( lastMIDIInput )
+ //}
if( lastMIDIOutput !== null && lastMIDIOutput !== undefined ) {
this.selectOutputByName( lastMIDIOutput )
}
@@ -59,23 +59,23 @@ const MIDI = {
},
createInputAndOutputLists( midiAccess ) {
- let optin = document.createElement( 'option' )
- optin.text = 'none'
+ //let optin = document.createElement( 'option' )
+ //optin.text = 'none'
let optout = document.createElement( 'option' )
optout.text = 'none'
- MIDI.midiInputList.add( optin )
+ //MIDI.midiInputList.add( optin )
MIDI.midiOutputList.add( optout )
- MIDI.midiInputList.onchange = MIDI.selectInputViaGUI
+ //MIDI.midiInputList.onchange = MIDI.selectInputViaGUI
MIDI.midiOutputList.onchange = MIDI.selectOutputViaGUI
- const inputs = midiAccess.inputs
- for( let input of inputs.values() ) {
- const opt = document.createElement( 'option' )
- opt.text = input.name
- opt.input = input
- MIDI.midiInputList.add( opt )
- }
+ //const inputs = midiAccess.inputs
+ //for( let input of inputs.values() ) {
+ // const opt = document.createElement( 'option' )
+ // opt.text = input.name
+ // opt.input = input
+ // MIDI.midiInputList.add( opt )
+ //}
const outputs = midiAccess.outputs
for( let output of outputs.values() ) {