Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
oidos
Commits
ff8435ae
Commit
ff8435ae
authored
Apr 10, 2017
by
Aske Simon Christensen
Browse files
Print approximate total computation time
parent
3c156fcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
convert/OidosConvert.py
View file @
ff8435ae
...
...
@@ -770,6 +770,8 @@ def makeMusic(xsong):
def
printMusicStats
(
music
):
print
"Music length: %d ticks at %0.2f ticks per minute"
%
(
music
.
length
,
60.0
/
music
.
ticklength
)
total_burden
=
0
ii
=
None
for
ti
,
tn
in
enumerate
(
music
.
track_order
):
if
music
.
n_reverb_tracks
>
0
and
ti
==
0
:
...
...
@@ -788,6 +790,7 @@ def printMusicStats(music):
fat
=
instr
.
paramblock
[
1
]
longest
=
float
(
instr
.
paramblock
[
16
])
/
SAMPLERATE
burden
=
modes
*
fat
*
len
(
instr
.
tones
)
*
longest
total_burden
+=
burden
print
instr
.
title
print
" Burden: modes x fat x tones x longest = %d x %d x %d x %.3f = %.f"
%
(
modes
,
fat
,
len
(
instr
.
tones
),
longest
,
burden
)
tones
=
""
...
...
@@ -816,6 +819,9 @@ def printMusicStats(music):
tnotes
+=
" %s/%02X(%d)"
%
(
notename
(
t
),
v
,
num_notes
)
print
" Notes: "
+
tnotes
seconds
=
int
(
round
(
total_burden
/
5000
))
print
print
"Total burden: %.f (approximately %dm%02ds on a fast CPU)"
%
(
total_burden
,
seconds
/
60
,
seconds
%
60
)
def
writefile
(
filename
,
s
):
f
=
open
(
filename
,
"wb"
)
...
...
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