Skip to content

Commit 8ec726f

Browse files
committed
spruced up loadFile
yes
1 parent de4f71b commit 8ec726f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
1.0.2
3+
-- Cursor will now move to the sequence's first note after loadFile.
4+
-- Put a roundNum onto post-loadFile BPM values.
5+
26
1.0.1
37
-- Changed cursor images from GIF to PNG.
48
-- Added a canary mechanism to reject false savepaths.

funcs/file-funcs.lua

+9-1
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,17 @@ return {
139139
end
140140

141141
-- Set global BPM and TPQ to latest BPM/TPQ values
142-
data.bpm = bpm
142+
data.bpm = roundNum(bpm, 0)
143143
data.tpq = tpq
144144

145+
-- Move to the first note in the first loaded sequence
146+
data.tp = 1
147+
data.np = data.bounds.np[2]
148+
local checkpoint = getNotes(data.active, data.tp, data.tp, data.np, data.np)
149+
if #checkpoint == 0 then
150+
moveTickPointerByNote(1)
151+
end
152+
145153
print("loadFile: loaded MIDI file \"" .. data.hotseats[data.activeseat] .. "\"!")
146154

147155
end,

0 commit comments

Comments
 (0)