Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
oidos
Commits
0e4d3293
Commit
0e4d3293
authored
Apr 04, 2017
by
Aske Simon Christensen
Browse files
Separate filter sweeps in player
parent
1acf86d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
convert/OidosConvert.py
View file @
0e4d3293
...
...
@@ -216,8 +216,8 @@ def makeParamBlock(inst, uses_panning):
return
[
int
(
modes
),
int
(
fat
),
int
(
seed
),
int
(
overtones
),
decaydiff
,
decaylow
,
harmonicity
,
sharpness
,
width
,
filterlow
,
fslopelow
,
f
ilter
high
,
fs
lopehigh
,
fsweep
,
gain
,
inst
.
maxsamples
,
attack
,
release
,
filterlow
,
filterhigh
,
fslopelow
,
f
slope
high
,
fs
weep
,
fsweep
,
gain
,
inst
.
maxsamples
,
release
,
attack
,
volume
]
+
([
pan
]
if
uses_panning
else
[])
...
...
@@ -762,7 +762,7 @@ def printMusicStats(music):
instr
=
music
.
instrument_map
[
ii
]
modes
=
instr
.
paramblock
[
0
]
fat
=
instr
.
paramblock
[
1
]
longest
=
float
(
instr
.
paramblock
[
1
5
])
/
SAMPLERATE
longest
=
float
(
instr
.
paramblock
[
1
6
])
/
SAMPLERATE
burden
=
modes
*
fat
*
len
(
instr
.
tones
)
*
longest
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
)
...
...
player/oidos.asm
View file @
0e4d3293
...
...
@@ -136,14 +136,15 @@ struc params
p_sharpness:
resd
1
p_width:
resd
1
p_filterlow:
resd
1
p_fslopelow:
resd
1
p_filterhigh:
resd
1
p_fslopelow:
resd
1
p_fslopehigh:
resd
1
p_fsweep:
resd
1
p_fsweeplow:
resd
1
p_fsweephigh:
resd
1
p_gain:
resd
1
p_maxsamples:
resd
1
p_attack:
resd
1
p_release:
resd
1
p_attack:
resd
1
p_volume:
resd
1
%ifdef USES_PANNING
p_panning:
resd
1
...
...
@@ -331,18 +332,18 @@ MakeInstrument:
; Filter value
fld
st0
fsub
dword
[
PARAMS
]
; filterlow
add
PARAMS
,
byte
4
add
PARAMS
,
byte
8
fmul
dword
[
PARAMS
]
; fslopelow
add
PARAMS
,
byte
4
fld1
faddp
st1
fstp
qword
[
ARRAY
]
add
ARRAY
,
byte
8
sub
PARAMS
,
byte
4
fsub
dword
[
PARAMS
]
; filterhigh
add
PARAMS
,
byte
4
add
PARAMS
,
byte
8
fmul
dword
[
PARAMS
]
; fslopehigh
add
PARAMS
,
byte
4
fld1
faddp
st1
fstp
qword
[
ARRAY
]
...
...
@@ -366,23 +367,18 @@ MakeInstrument:
mov
RANDOM
,
[
PARAMS
]
; modes
add
PARAMS
,
byte
4
imul
RANDOM
,
[
PARAMS
]
; fat
add
PARAMS
,
byte
p_fslopehigh
-
p_fat
cvtsi2sd
xmm1
,
RANDOM
pshufd
xmm5
,
xmm1
,
0x44
add
PARAMS
,
byte
p_fslopelow
-
p_fat
cvtsi2sd
xmm5
,
RANDOM
cvtss2sd
xmm1
,
[
PARAMS
]
; fslopehigh
add
PARAMS
,
byte
4
pshufd
xmm7
,
xmm1
,
0x44
cvtps2pd
xmm7
,
[
PARAMS
]
; fslopelow, fslopehigh
add
PARAMS
,
byte
8
cvtss2sd
xmm1
,
[
PARAMS
]
; fsweep
add
PARAMS
,
byte
4
pshufd
xmm4
,
xmm1
,
0x44
cvtps2pd
xmm4
,
[
PARAMS
]
; fsweeplow, fsweephigh
add
PARAMS
,
byte
8
cvtss2sd
xmm
1
,
[
PARAMS
]
; gain
cvtss2sd
xmm
6
,
[
PARAMS
]
; gain
add
PARAMS
,
byte
4
pshufd
xmm6
,
xmm1
,
0x44
cvtss2sd
xmm7
,
[
PARAMS
+
(
p_fslopelow
-
p_maxsamples
)]
mulpd
xmm7
,
xmm4
mov
eax
,
[
PARAMS
]
; maxsamples
...
...
@@ -423,14 +419,14 @@ MakeInstrument:
loop
.decay
; Gain
mov
ap
d
xmm1
,
xmm6
sub
p
d
xmm1
,
[
BASE
+
c_oneone
]
mul
p
d
xmm1
,
xmm4
mul
p
d
xmm1
,
xmm4
add
p
d
xmm1
,
xmm5
div
p
d
xmm1
,
xmm6
sqrt
p
d
xmm1
,
xmm1
div
p
d
xmm4
,
xmm1
mov
s
d
xmm1
,
xmm6
sub
s
d
xmm1
,
[
BASE
+
c_oneone
]
mul
s
d
xmm1
,
xmm4
mul
s
d
xmm1
,
xmm4
add
s
d
xmm1
,
xmm5
div
s
d
xmm1
,
xmm6
sqrt
s
d
xmm1
,
xmm1
div
s
d
xmm4
,
xmm1
unpcklpd
xmm4
,
xmm4
movapd
[
SAMPLE
],
xmm4
...
...
@@ -516,23 +512,20 @@ MakeChannel:
add
PARAMS
,
byte
4
; Attack/release add
cvtss2sd
xmm1
,
[
PARAMS
]
; attack
add
PARAMS
,
byte
4
pshufd
xmm7
,
xmm1
,
0x44
cvtss2sd
xmm7
,
[
PARAMS
]
; release
add
PARAMS
,
byte
4
cvtps2pd
xmm7
,
[
PARAMS
]
; release, attack
add
PARAMS
,
byte
8
; Instrument volume
cvtss2sd
xmm
1
,
[
PARAMS
]
; volume
cvtss2sd
xmm
5
,
[
PARAMS
]
; volume
add
PARAMS
,
byte
4
mulsd
xmm
1
,
xmm0
pshuf
d
xmm5
,
xmm
1
,
0x44
mulsd
xmm
5
,
xmm0
unpcklp
d
xmm5
,
xmm
5
%ifdef USES_PANNING
; Instrument panning
cvtss2sd
xmm
1
,
[
PARAMS
]
; panning
cvtss2sd
xmm
4
,
[
PARAMS
]
; panning
add
PARAMS
,
byte
4
pshufd
xmm4
,
xmm
1
,
0x4
4
unpcklpd
xmm4
,
xmm4
movapd
xmm1
,
[
BASE
+
c_oneone
]
addsubpd
xmm1
,
xmm4
mulpd
xmm5
,
xmm1
...
...
Write
Preview
Supports
Markdown
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