Method: PM::PatchMaster#load

Defined in:
lib/patchmaster/patchmaster.rb

#load(file) ⇒ Object

Loads file. Does its best to restore the current song list, song, and patch after loading.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/patchmaster/patchmaster.rb', line 54

def load(file)
  restart = running?
  stop

  @cursor.mark
  init_data
  DSL.new(@no_midi).load(file)
  @cursor.restore

  if restart
    start(false)
  elsif @cursor.patch
    @cursor.patch.start
  end
rescue => ex
  raise("error loading #{file}: #{ex}\n" + caller.join("\n"))
end