Skip to content

Commit

Permalink
small fix for preloading user setup
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieroberts committed Apr 23, 2015
1 parent 1496733 commit e513cb1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
18 changes: 12 additions & 6 deletions js/gibber/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ var GE = {

Gibber.Audio.SoundFont.path = './resources/soundfonts/'

GE.Storage.runUserSetup()

//window.spin.stop()
}
},
Expand Down Expand Up @@ -135,18 +137,22 @@ var GE = {
onload:null
}
this.save()
}else if( this.values.onload ) {
try{
eval( this.values.onload )
}catch(e) {
GE.Message.post("There was an error running your preload code:\n" + GE.Storage.values.onload )
}
}
},

save : function() {
localStorage.setObject( "gibber2", this.values );
},

runUserSetup: function() {
if( this.values.onload ) {
try{
eval( this.values.onload )
}catch(e) {
GE.Message.post("There was an error running your preload code:\n" + GE.Storage.values.onload )
}
}
}
},

Help : {
Expand Down
25 changes: 13 additions & 12 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3417,6 +3417,8 @@ var GE = {

Gibber.Audio.SoundFont.path = './resources/soundfonts/'

GE.Storage.runUserSetup()

//window.spin.stop()
}
},
Expand Down Expand Up @@ -3467,18 +3469,22 @@ var GE = {
onload:null
}
this.save()
}else if( this.values.onload ) {
try{
eval( this.values.onload )
}catch(e) {
GE.Message.post("There was an error running your preload code:\n" + GE.Storage.values.onload )
}
}
},

save : function() {
localStorage.setObject( "gibber2", this.values );
},

runUserSetup: function() {
if( this.values.onload ) {
try{
eval( this.values.onload )
}catch(e) {
GE.Message.post("There was an error running your preload code:\n" + GE.Storage.values.onload )
}
}
}
},

Help : {
Expand Down Expand Up @@ -33608,12 +33614,7 @@ module.exports = function( Gibber ) {

winsome : {
presetInit : function() {
//this.fx.add( Delay(1/4, .35), Reverb() )
this.lfo = Gibber.Audio.Oscillators.Sine( .234375 )._

this.lfo.amp = .075
this.lfo.frequency = 2

this.lfo = Gibber.Audio.Oscillators.Sine( 2, .075 )._
this.cutoff = this.lfo
this.detune2 = this.lfo
},
Expand Down

0 comments on commit e513cb1

Please sign in to comment.