Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
ButtonPusher
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Button Pusher
ButtonPusher
Commits
bb48d3ba
Commit
bb48d3ba
authored
Aug 24, 2017
by
16서원빈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed panel width issue importing without BPM
parent
d76fc6c8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
24 deletions
+71
-24
ButtonPusherEditor.exe
ButtonPusherEditor.exe
+0
-0
Form1.cs
Form1.cs
+71
-24
No files found.
ButtonPusherEditor.exe
View file @
bb48d3ba
No preview for this file type
Form1.cs
View file @
bb48d3ba
...
...
@@ -492,7 +492,10 @@ namespace ButtonPusherEditor
||
nt
==
Note
.
LMOReset
||
nt
==
Note
.
SMOReset
)
continue
;
if
((
key
&
nt
&
~(
Note
)
0
b1111
)
!=
0
)
{
body
+=
nt
.
ToString
();
break
;
}
}
}
}
...
...
@@ -536,9 +539,9 @@ namespace ButtonPusherEditor
float
outBPM
;
if
(
float
.
TryParse
(
value
,
out
outBPM
))
bpm
=
outBPM
;
else
if
(
bpm
==
0
)
bpm
=
120
;
BPM
.
Text
=
outBPM
.
ToString
();
BPM
.
Text
=
bpm
.
ToString
();
break
;
case
"#PLAYLEVEL"
:
int
outLevel
;
...
...
@@ -556,7 +559,8 @@ namespace ButtonPusherEditor
{
ResetMeasures
();
Tuple
<
int
,
int
>
tempLongStart
=
null
;
Tuple
<
int
,
int
>
tempLongBtnStart
=
null
;
Tuple
<
int
,
int
>
tempLongMtnStart
=
null
;
using
(
StreamReader
reader
=
new
StreamReader
(
new
BufferedStream
(
file
.
OpenRead
())))
...
...
@@ -591,46 +595,89 @@ namespace ButtonPusherEditor
for
(
int
i
=
0
;
i
<
seq
;
i
++)
{
string
key
=
value
.
Substring
(
i
*
2
,
2
);
Note
type
=
Note
.
SBT
;
bool
isMotion
=
false
;
if
(
key
==
"00"
)
continue
;
else
if
(
channel
==
"SMO"
||
channel
==
"LMO"
)
{
isMotion
=
true
;
foreach
(
Note
nt
in
Enum
.
GetValues
(
typeof
(
Note
)))
{
if
(
nt
<
(
Note
)
0
b1111
||
nt
==
Note
.
LMOReset
||
nt
==
Note
.
SMOReset
)
continue
;
if
(
nt
.
ToString
()
==
key
)
{
type
=
nt
;
break
;
}
}
}
int
beat
=
i
*
npm
/
seq
;
if
(
channel
==
"SMO"
)
{
measures
[
measure
][
beat
]
|=
Note
.
SMO
;
}
else
if
(
channel
[
0
]
==
'S'
)
if
(
channel
[
0
]
==
'S'
)
{
measures
[
measure
][
beat
]
|=
Note
.
SBT
;
measures
[
measure
][
beat
]
|=
type
;
}
else
if
(
channel
[
0
]
==
'L'
)
{
if
(
tempLong
Start
==
null
)
if
(
isMotion
&&
tempLongBtn
Start
==
null
)
{
tempLongStart
=
new
Tuple
<
int
,
int
>(
measure
,
beat
);
tempLong
Btn
Start
=
new
Tuple
<
int
,
int
>(
measure
,
beat
);
continue
;
}
else
if
(!
isMotion
&&
tempLongMtnStart
==
null
)
{
tempLongMtnStart
=
new
Tuple
<
int
,
int
>(
measure
,
beat
);
continue
;
}
else
if
(
isMotion
&&
tempLongBtnStart
!=
null
)
{
if
(
measure
==
tempLongBtnStart
.
Item1
)
{
for
(
int
b
=
tempLongBtnStart
.
Item2
;
b
<
beat
;
b
++)
measures
[
measure
][
b
]
|=
type
;
}
else
{
for
(
int
b
=
tempLongBtnStart
.
Item2
;
b
<
npm
;
b
++)
measures
[
tempLongBtnStart
.
Item1
][
b
]
|=
type
;
for
(
int
m
=
tempLongBtnStart
.
Item1
+
1
;
m
<
measure
;
m
++)
{
for
(
int
b
=
0
;
b
<
npm
;
b
++)
measures
[
m
][
b
]
|=
type
;
}
for
(
int
b
=
0
;
b
<
beat
;
b
++)
measures
[
measure
][
b
]
|=
type
;
}
if
(
measure
==
tempLongStart
.
Item1
)
tempLongBtnStart
=
null
;
}
else
if
(!
isMotion
&&
tempLongMtnStart
!=
null
)
{
for
(
int
b
=
tempLongStart
.
Item2
;
b
<
beat
;
b
++)
measures
[
measure
][
b
]
|=
Note
.
SBT
;
if
(
measure
==
tempLongMtnStart
.
Item1
)
{
for
(
int
b
=
tempLongMtnStart
.
Item2
;
b
<
beat
;
b
++)
measures
[
measure
][
b
]
|=
type
;
}
else
{
for
(
int
b
=
tempLong
Start
.
Item2
;
b
<
npm
;
b
++)
measures
[
tempLongStart
.
Item1
][
b
]
|=
Note
.
SBT
;
for
(
int
m
=
tempLong
Start
.
Item1
+
1
;
m
<
measure
;
m
++)
for
(
int
b
=
tempLongMtn
Start
.
Item2
;
b
<
npm
;
b
++)
measures
[
tempLongMtnStart
.
Item1
][
b
]
|=
type
;
for
(
int
m
=
tempLongMtn
Start
.
Item1
+
1
;
m
<
measure
;
m
++)
{
for
(
int
b
=
0
;
b
<
npm
;
b
++)
measures
[
m
][
b
]
|=
Note
.
SBT
;
measures
[
m
][
b
]
|=
type
;
}
for
(
int
b
=
0
;
b
<
beat
;
b
++)
measures
[
measure
][
b
]
|=
Note
.
SBT
;
measures
[
measure
][
b
]
|=
type
;
}
tempLongStart
=
null
;
tempLongMtnStart
=
null
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment