Skip to content

Commit

Permalink
sfzreader changes in path opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sonoro1234 committed Jun 15, 2019
1 parent d7cb5a1 commit b3c2f0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua2SC/lua/sc/sfzreader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,16 @@ function M.read(fpath,options)
local function getopcodes(v)
local r = {}
--opcodes that allow spaces
local k,va = v:match("(sample)=([^\n]+)")
local k,va = v:match("(sample)=([^\n\r]+)")
if k then
va = va:gsub("([^%s]+=[^%s]+)","") --clean other opcodes
va = va:gsub("\\","/")
r[k]=va
end
local k,va = v:match("(default_path)=([^\n]+)")
local k,va = v:match("(default_path)=([^\n\r]+)")
if k then
va = va:gsub("([^%s]+=[^%s]+)","") --clean other opcodes
va = va:gsub("\\","/")
r[k]=va
end
--others
Expand Down

0 comments on commit b3c2f0c

Please sign in to comment.