This commit is contained in:
2024-06-04 21:06:35 +03:00
parent 878e57b057
commit 342f91c6ca
11 changed files with 547 additions and 267 deletions

View File

@ -6,7 +6,7 @@ PROJECT_INFO_FILE=prod.nfo
PROJECT_SCREENSHOT=
# Currently active config file name
ACTIVE_CONFIG=base.config
ACTIVE_CONFIG=minified.config
# ------- GUI options/preferences --------
# Automatically rebuild DLLs when things have changed?

View File

@ -1,6 +1,6 @@
%define SU_LENGTH_IN_SAMPLES 1550944
%define SU_LENGTH_IN_SAMPLES 2703680
%define SU_SAMPLE_RATE 44100
%define SU_BPM 116.
%define SU_BPM 137.
;-------------------------------------------------------------------------------
; unit struct
@ -61,7 +61,7 @@ endstruc
section .synth_object bss align=256
su_synth_obj:
resb su_synthworkspace.size
resb 20*su_delayline_wrk.size
resb 40*su_delayline_wrk.size
;-------------------------------------------------------------------------------
@ -76,7 +76,7 @@ global _su_render_song@4
_su_render_song@4:
pushad ; Stack: edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
xor eax, eax
push 16 ; Stack: VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 20752 ; Stack: VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 1 ; Stack: RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push eax ; Stack: GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
su_render_rowloop: ; loop through every row in the song
@ -85,8 +85,8 @@ su_render_rowloop: ; loop through every row in the song
xor eax, eax ; ecx is the current sample within row
su_render_sampleloop: ; loop through every sample in the row
push eax ; Stack: Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 8 ; Stack: PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr ; does the next voice reuse the current opcodes?
push 8 ; Stack: VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 4572 ; Stack: PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr ; does the next voice reuse the current opcodes?
push 17 ; Stack: VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
mov edx, dword su_synth_obj ; edx points to the synth object
mov ebx, dword su_patch_opcodes ; COM points to vm code
mov esi, dword su_patch_operands ; VAL points to unit params
@ -114,11 +114,11 @@ su_render_sampleloop: ; loop through every sample in the row
pop eax ; eax = Sample, Stack: Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
inc dword [esp + 4] ; increment global time, used by delays
inc eax
cmp eax, 5702
cmp eax, 4828
jl su_render_sampleloop
pop eax ; eax = Row, Stack: GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr ; Stack: pushad ptr
inc eax
cmp eax, 272
cmp eax, 560
jl su_render_rowloop
; rewind the stack the entropy of multiple pop eax is probably lower than add
pop eax ; eax = GlobalTick, Stack: RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
@ -183,9 +183,9 @@ su_update_voices_skipreset:
su_update_voices_nexttrack:
pop ebx ; ebx=first voice of next instrument, Stack: ptrnrow
pop edx ; edx=patrnrow
add esi, 17
add esi, 35
inc ebp
cmp ebp,su_synth_obj + 6
cmp ebp,su_synth_obj + 12
jl su_update_voices_trackloop
ret
@ -254,6 +254,16 @@ su_op_advance_finish:
popad ; Popped: eax, ecx = DelayWorkSpace, edx = Synth, ebx = OpcodeStream, esp, ebp = Voice, esi = OperandStream, edi. Stack: retaddr_su_run_vm, VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
ret
;-------------------------------------------------------------------------------
; ADD opcode: add the two top most signals on the stack
;-------------------------------------------------------------------------------
; Mono: a b -> a+b b
;-------------------------------------------------------------------------------
section .su_op_add code align=1
su_op_add:
fadd st1
ret
;-------------------------------------------------------------------------------
; ADDP opcode: add the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
; Mono: a b -> a+b
@ -264,6 +274,22 @@ su_op_addp:
faddp st1, st0
ret
;-------------------------------------------------------------------------------
; LOADNOTE opcode: load the current note, scaled to [-1,1]
;-------------------------------------------------------------------------------
; Mono: (empty) -> n, where n is the note
;-------------------------------------------------------------------------------
section .su_op_loadnote code align=1
su_op_loadnote:
fild dword [edx-su_voice.inputs+su_voice.note]
fmul dword [FCONST_0_00781250] ; s=n/128.0
fsub dword [FCONST_0_500000] ; s-.5
fadd st0, st0 ; 2*s-1
ret
;-------------------------------------------------------------------------------
; MULP opcode: multiply the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
@ -425,47 +451,6 @@ su_op_delay_loop:
fst dword [ecx+su_delayline_wrk.dcout] ; o'=s+c*o-i
ret
;-------------------------------------------------------------------------------
; COMPRES opcode: push compressor gain to stack
;-------------------------------------------------------------------------------
; Mono: push g on stack, where g is a suitable gain for the signal
; you can either MULP to compress the signal or SEND it to a GAIN
; somewhere else for compressor side-chaining.
; Stereo: push g g on stack, where g is calculated using l^2 + r^2
;-------------------------------------------------------------------------------
section .su_op_compressor code align=1
su_op_compressor:
fld st0 ; x x
fmul st0, st0 ; x^2 x
fld dword [ebp] ; l x^2 x
fucomi st0, st1
setnb al ; if (st0 >= st1) al = 1; else al = 0;
fsubp st1, st0 ; x^2-l x
call su_nonlinear_map ; c x^2-l x, c is either attack or release parameter mapped in a nonlinear way
fmulp st1, st0 ; c*(x^2-l) x
fadd dword [ebp] ; l+c*(x^2-l) x // we could've kept level in the stack and save a few bytes, but su_env_map uses 3 stack (c + 2 temp), so the stack was getting quite big.
; TODO: make this denormalization optional, if the user wants to save some space
fadd dword [FCONST_0_500000] ; add and sub small offset to prevent denormalization. WARNING: this is highly important, as the damp filters might denormalize and give 100x CPU penalty
fsub dword [FCONST_0_500000] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch
fst dword [ebp] ; l'=l+c*(x^2-l), l' x
fld dword [edx + 12] ; t l' x
fmul st0, st0 ; t*t l' x
fxch ; l' t*t x
fucomi st0, st1 ; if l' < t*t
fcmovb st0, st1 ; l'=t*t
fdivp st1, st0 ; t*t/l' x
fld dword [edx + 16] ; r t*t/l' x
fmul dword [FCONST_0_500000] ; p=r/2 t*t/l' x
fxch ; t*t/l' p x
fyl2x ; p*log2(t*t/l') x
call su_power ; 2^(p*log2(t*t/l')) x
; Equal to:
; (t*t/l')^p x
; if ratio is at minimum => p=0 => 1 x
; if ratio is at maximum => p=0.5 => t/x => t/x*x=t
fdiv dword [edx + 8]; this used to be pregain but that ran into problems with getting back up to 0 dB so postgain should be better at that
ret
;-------------------------------------------------------------------------------
@ -665,6 +650,7 @@ su_op_oscillat_normalized:
test al, byte 0x80
jz short su_op_oscillat_not_sample
fst dword [ebp] ; for samples, we store the phase without mod(p,1)
fadd dword [edx + 8]
call su_oscillat_sample
jmp su_op_oscillat_shaping ; skip the rest to avoid color phase normalization and colorloading
su_op_oscillat_not_sample:
@ -674,6 +660,12 @@ su_op_oscillat_not_sample:
fprem ; we actually computed mod(p+1,1) instead of mod(p,1) as the fprem takes mod
fstp st1 ; towards zero
fst dword [ebp] ; store back the updated phase
fadd dword [edx + 8]
fld1 ; this is a bit stupid, but we need to take mod(x,1) again after phase modulations
fadd st1, st0 ; as the actual oscillator functions expect x in [0,1]
fxch
fprem
fstp st1
fld dword [edx + 12] ; // c p
; every oscillator test included if needed
test al, byte 0x40
@ -921,7 +913,8 @@ su_vm_jumptable:
dd su_op_send
dd su_op_distort
dd su_op_delay
dd su_op_compressor
dd su_op_add
dd su_op_loadnote
dd su_op_in
dd su_op_out
@ -941,7 +934,8 @@ su_vm_transformcounts:
db 1
db 1
db 4
db 5
db 0
db 0
db 0
db 1
@ -956,25 +950,90 @@ su_patterns:
db 48,1,1,1,48,1,1,1,48,1,1,1,48,1,48,1
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,58,1,1,1,1,1,1,1,58,1,1,1
db 0,0,0,0,72,1,1,1,1,1,1,1,72,1,1,1
db 1,1,1,1,72,1,1,1,1,1,1,1,72,1,1,1
db 74,1,0,0,74,1,77,70,1,0,70,1,0,70,1,0
db 74,1,0,0,74,1,77,70,1,0,70,1,0,0,72,1
db 74,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 60,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,53,1,1,1,53,1,1,1,53,1,1,1,53,1
db 0,38,50,38,0,38,50,38,0,38,50,38,0,38,50,50
db 0,46,58,46,0,46,58,46,0,46,58,46,0,46,58,58
db 0,48,60,48,0,48,60,48,0,48,60,48,0,48,60,60
db 0,41,53,41,0,41,53,41,0,41,53,41,0,41,53,53
db 0,48,60,48,0,48,60,48,0,48,60,55,0,53,52,53
db 59,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,53,1,1,1,53,1,1,1,53,1,1,1,53,53
db 1,1,53,1,1,1,53,1,1,1,53,1,1,1,53,53
db 1,1,53,1,1,1,53,1,1,1,53,1,1,1,53,1
db 1,1,53,1,1,1,53,1,1,1,53,1,1,1,53,52
db 0,0,0,0,0,0,0,0,57,57,57,57,54,54,54,54
db 0,0,0,0,0,0,0,0,0,0,57,57,1,52,52,1
db 50,0,0,50,0,50,50,1,50,1,0,50,0,50,0,50
db 0,0,0,50,0,50,50,1,50,1,0,50,0,50,50,50
db 0,46,46,46,0,46,46,1,46,1,0,46,0,46,46,46
db 0,0,46,46,0,46,46,1,46,1,0,46,0,46,46,46
db 0,0,0,48,0,48,48,1,48,1,0,48,0,48,48,48
db 41,1,0,41,0,41,41,1,41,1,0,41,0,41,41,41
db 0,46,74,74,0,46,72,1,74,1,0,74,0,74,74,74
db 76,76,76,76,0,48,70,1,76,1,0,48,0,48,48,79
db 0,0,50,50,0,50,50,1,50,1,0,50,0,50,50,50
db 48,1,0,48,0,48,48,1,48,1,0,48,0,48,48,48
db 74,0,0,74,0,74,72,1,74,1,0,74,0,74,0,72
db 0,0,0,74,0,74,72,1,74,1,0,74,0,74,74,72
db 0,74,74,74,0,74,72,1,74,1,0,74,0,74,74,72
db 0,0,74,74,0,74,72,1,74,1,0,74,0,74,74,76
db 0,0,0,76,0,76,76,1,76,1,0,76,0,76,76,76
db 77,1,0,77,0,77,77,1,77,1,0,77,0,77,77,67
db 0,74,70,46,0,74,69,1,70,1,0,70,0,70,70,70
db 72,72,72,48,0,72,74,1,72,1,0,76,0,76,74,48
db 0,0,74,74,0,74,72,1,74,1,0,74,0,74,74,72
db 76,1,0,76,0,76,76,1,76,1,0,76,0,76,76,76
db 77,0,0,77,0,77,76,1,77,1,0,77,0,77,0,76
db 0,0,0,77,0,77,76,1,77,1,0,77,0,77,77,76
db 0,77,77,77,0,77,76,1,77,1,0,77,0,77,77,76
db 0,0,77,77,0,77,76,1,77,1,0,77,0,77,77,79
db 0,0,0,79,0,79,79,1,79,1,0,79,0,79,79,79
db 81,1,0,81,0,81,81,1,81,1,0,81,0,81,81,72
db 0,70,46,70,0,70,46,1,46,1,0,46,0,46,46,46
db 48,48,48,72,0,76,48,1,48,1,0,72,0,72,77,76
db 0,0,77,77,0,77,76,1,77,1,0,77,0,77,77,76
db 79,1,0,79,0,79,79,1,79,1,0,79,0,79,79,79
db 0,0,0,0,0,0,0,0,77,0,0,0,64,0,0,0
db 62,0,0,0,0,0,69,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,0
db 62,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,64,0,0,0,65,0,0,0
db 79,0,0,0,0,0,0,0,0,0,0,0,0,0,81,0
db 0,0,0,0,0,0,0,0,0,0,60,0,0,0,0,0
db 74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 65,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
db 79,1,1,1,1,1,1,1,0,0,0,0,0,0,84,0
db 0,0,0,0,0,0,0,0,70,0,0,0,69,0,0,0
db 74,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,65,0,0,0,76,0,0,0
db 74,0,0,0,0,0,81,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,81,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,76,0,0,0,77,0,0,0
db 67,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0
db 0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0
db 62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 77,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
db 67,1,1,1,1,1,1,1,0,0,0,0,0,0,72,0
db 0,0,0,0,0,0,0,0,82,0,0,0,81,0,0,0
;-------------------------------------------------------------------------------
; Tracks
;-------------------------------------------------------------------------------
section .su_tracks data align=1
su_tracks:
db 0,0,0,0,1,2,1,2,1,2,1,2,1,2,1,2,3
db 0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,3
db 0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,3
db 6,7,6,7,6,7,6,7,6,7,6,7,6,7,6,7,8
db 0,0,0,0,9,3,3,3,9,3,3,3,3,3,3,3,3
db 0,0,0,0,10,11,10,10,10,10,10,10,10,10,10,10,3
db 0,0,0,0,0,0,0,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,3,3
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3
db 5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,3,3,3
db 0,0,0,0,0,0,0,0,7,7,8,8,9,10,8,9,7,7,8,8,9,10,8,11,7,7,8,8,9,10,8,9,0,0,0
db 0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0
db 13,14,14,14,14,14,14,14,14,14,14,15,15,14,15,15,16,15,15,15,16,15,15,15,16,15,15,15,16,15,15,15,3,3,3
db 0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 19,20,21,22,23,24,25,26,19,27,21,22,28,24,25,26,19,27,21,22,28,24,25,26,19,27,21,22,28,24,25,26,0,0,0
db 29,30,31,32,33,34,35,36,29,37,31,32,38,34,35,36,29,37,31,32,38,34,35,36,29,37,31,32,38,34,35,36,0,0,0
db 39,40,41,42,43,44,45,46,39,47,41,42,48,44,45,46,39,47,41,42,48,44,45,46,39,47,41,42,48,44,45,46,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,50,51,52,53,54,55,56,49,50,51,57,53,58,59,60,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,62,63,60,64,65,66,67,61,62,63,68,64,69,70,52,0,0,0,0
;-------------------------------------------------------------------------------
; Sample offsets
;-------------------------------------------------------------------------------
@ -992,13 +1051,19 @@ su_sample_offsets:
dd 367477
dw 1343
dw 1
dd 1543725
dw 831
dw 104
dd 557335
dw 2374
dw 821
;-------------------------------------------------------------------------------
; Delay times
;-------------------------------------------------------------------------------
section .su_delay_times data align=1
su_delay_times:
dw 1395,350,1744,1744,1116,1188,1276,1356,1422,1492,1556,1618,1140,1212,1300,1380,1446,1516,1580,1642
dw 1395,350,1744,1744,69,12550,24402,21265,32419,1116,1188,1276,1356,1422,1492,1556,1618,1140,1212,1300,1380,1446,1516,1580,1642
;-------------------------------------------------------------------------------
@ -1006,14 +1071,14 @@ su_delay_times:
;-------------------------------------------------------------------------------
section .su_patch_opcodes data align=1
su_patch_opcodes:
db 2,4,6,2,8,10,10,6,12,10,10,10,10,14,17,2,2,6,18,0,2,4,20,6,2,8,6,10,10,12,14,17,2,18,2,18,0,2,22,8,6,2,22,8,6,12,2,4,6,12,10,20,14,17,0,2,4,4,12,6,10,10,20,2,8,6,10,12,24,6,20,14,17,2,18,0,3,3,7,5,7,15,17,0,3,5,7,11,11,15,17,0,27,23,29,0
db 2,4,6,2,8,10,10,6,12,10,10,14,17,2,18,0,2,4,20,6,2,8,6,10,10,12,14,17,2,18,2,18,0,2,22,8,6,2,22,8,6,12,2,4,6,12,10,20,14,17,0,2,18,18,2,4,4,6,4,12,6,10,10,14,17,0,3,3,7,5,7,15,17,0,3,5,7,11,11,15,17,0,2,4,6,14,17,2,18,0,2,4,4,12,8,12,6,2,4,4,12,8,12,6,22,15,11,11,17,0,2,2,6,4,24,4,12,4,12,6,10,10,14,23,17,26,18,0,29,23,31,0
;-------------------------------------------------------------------------------
; The parameters / inputs to each opcode
;-------------------------------------------------------------------------------
section .su_patch_operands data align=1
su_patch_operands:
db 18,65,0,0,60,94,57,0,128,63,79,66,0,43,0,0,128,67,81,87,35,68,100,62,64,9,75,68,53,128,80,10,85,16,10,49,16,64,57,0,62,128,0,0,128,39,61,34,0,128,0,40,0,0,76,0,0,96,86,116,0,0,114,37,130,95,0,68,0,0,83,3,107,57,67,68,128,78,64,71,84,10,47,54,0,0,128,19,136,0,54,68,70,0,128,26,255,255,0,53,0,0,128,64,128,0,0,0,3,97,0,0,54,0,0,128,64,6,0,0,2,3,79,128,0,62,0,0,42,64,64,0,1,64,125,128,39,76,68,114,70,50,12,46,74,36,39,77,40,48,0,84,50,128,35,71,64,0,64,64,64,16,3,128,64,94,128,64,83,32,53,0,0,64,52,59,91,102,72,37,65,87,47,102,59,64,98,23,0,72,47,45,76,128,104,0,8,90,0,0,128,21,78,0,85,64,77,64,0,2,64,111,128,73,49,78,50,60,0,0,128,82,64,0,3,64,127,128,78,128,76,109,128,64,57,84,0,2,40,128,120,42,4,15,128
db 0,70,0,0,76,88,69,0,128,63,79,66,0,43,0,0,128,43,79,84,82,68,100,62,64,12,69,68,12,48,16,64,50,0,62,76,0,0,128,46,40,0,0,76,0,0,96,86,116,0,0,114,37,130,95,0,68,0,0,83,3,107,57,67,68,128,78,64,64,42,26,47,54,0,0,128,19,136,0,54,68,70,0,128,26,255,255,0,53,0,0,128,64,128,0,0,0,3,97,0,0,54,0,0,128,64,6,0,0,2,3,79,128,0,62,0,0,42,64,64,0,1,64,125,128,39,76,68,114,60,39,19,39,73,62,74,128,94,176,0,47,91,0,42,65,86,71,83,88,66,91,49,100,89,34,64,74,64,42,70,17,17,64,78,13,128,88,128,66,22,46,68,10,116,16,64,40,0,8,90,0,0,128,21,78,0,85,64,77,54,0,2,87,111,128,64,128,97,50,60,0,0,128,82,64,0,3,64,127,128,78,128,76,109,128,64,67,128,11,1,74,0,0,64,64,67,0,4,64,99,129,64,89,43,1,78,36,74,64,83,40,0,40,0,63,51,54,64,94,0,128,64,128,35,76,28,52,128,64,102,35,114,67,20,0,48,64,64,64,46,78,128,64,128,35,76,99,54,128,64,128,35,128,80,128,0,0,0,4,1,65,122,128,72,103,128,64,20,6,40,102,47,78,68,0,84,25,84,127,76,52,128,91,48,128,67,88,73,0,57,37,56,35,55,64,0,5,58,128,129,30,128,80,53,128,24,61,69,103,84,12,5,3,27,14,82,200,0,2,61,113,122,97,9,15,128
;-------------------------------------------------------------------------------
; Constants

View File

@ -3,14 +3,14 @@
#define SU_RENDER_H
#define SU_CHANNEL_COUNT 2
#define SU_LENGTH_IN_SAMPLES 1550944
#define SU_LENGTH_IN_SAMPLES 2703680
#define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
#define SU_SAMPLE_RATE 44100
#define SU_BPM 116
#define SU_BPM 137
#define SU_ROWS_PER_BEAT 4
#define SU_ROWS_PER_PATTERN 16
#define SU_LENGTH_IN_PATTERNS 17
#define SU_LENGTH_IN_PATTERNS 35
#define SU_LENGTH_IN_ROWS (SU_LENGTH_IN_PATTERNS*SU_PATTERN_SIZE)
#define SU_SAMPLES_PER_ROW (SU_SAMPLE_RATE*60/(SU_BPM*SU_ROWS_PER_BEAT))

View File

@ -3,14 +3,14 @@
%define PLAYER_INC
%define SU_CHANNEL_COUNT 2
%define SU_LENGTH_IN_SAMPLES 1550944
%define SU_LENGTH_IN_SAMPLES 2703680
%define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
%define SU_SAMPLE_RATE 44100
%define SU_BPM 116
%define SU_BPM 137
%define SU_ROWS_PER_BEAT 4
%define SU_ROWS_PER_PATTERN 16
%define SU_LENGTH_IN_PATTERNS 17
%define SU_LENGTH_IN_PATTERNS 35
%define SU_LENGTH_IN_ROWS (SU_LENGTH_IN_PATTERNS*SU_PATTERN_SIZE)
%define SU_SAMPLES_PER_ROW (SU_SAMPLE_RATE*60/(SU_BPM*SU_ROWS_PER_BEAT))
%define SU_SAMPLE_SIZE 2

View File

@ -1,27 +1,45 @@
bpm: 116
bpm: 137
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [-1, -1, -1, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, -1]
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, -1, -1, -1]
patterns: [[48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1], [48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 48, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1]
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 58, 1, 1, 1, 1, 1, 1, 1, 58, 1, 1, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1]
order: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 72, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2]
patterns: [[74, 1, 0, 1, 74, 1, 77, 70, 1, 0, 70, 1, 0, 70, 1, 0], [74, 1, 0, 1, 74, 1, 77, 70, 1, 0, 70, 1, 0, 1, 72, 1], [74, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 2, 3, 4, 2, 3, 1, 1, 2, 2, 3, 4, 2, 5, 1, 1, 2, 2, 3, 4, 2, 3, 6, -1, -1]
patterns: [[1, 38, 50, 38, 0, 38, 50, 38, 0, 38, 50, 38, 0, 38, 50, 50], [0, 38, 50, 38, 0, 38, 50, 38, 0, 38, 50, 38, 0, 38, 50, 50], [0, 46, 58, 46, 0, 46, 58, 46, 0, 46, 58, 46, 0, 46, 58, 58], [0, 48, 60, 48, 0, 48, 60, 48, 0, 48, 60, 48, 0, 48, 60, 60], [0, 41, 53, 41, 0, 41, 53, 41, 0, 41, 53, 41, 0, 41, 53, 53], [0, 48, 60, 48, 0, 48, 60, 48, 0, 48, 60, 55, 0, 53, 52, 53], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[59, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1]
patterns: [[1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1], [1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 53]]
order: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, -1, -1, -1]
patterns: [[1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 53], [1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1], [1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 1, 1, 1, 53, 52]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 57, 57, 57, 54, 54, 54, 54], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 57, 1, 52, 52, 1]]
- numvoices: 2
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, -1, -1]
patterns: [[50, 0, 1, 50, 0, 50, 50, 1, 50, 1, 0, 50, 0, 50, 0, 50], [0, 1, 1, 50, 0, 50, 50, 1, 50, 1, 0, 50, 0, 50, 50, 50], [0, 46, 46, 46, 0, 46, 46, 1, 46, 1, 0, 46, 0, 46, 46, 46], [0, 1, 46, 46, 0, 46, 46, 1, 46, 1, 0, 46, 0, 46, 46, 46], [0, 1, 1, 48, 0, 48, 48, 1, 48, 1, 0, 48, 0, 48, 48, 48], [41, 1, 0, 41, 0, 41, 41, 1, 41, 1, 0, 41, 0, 41, 41, 41], [0, 46, 74, 74, 0, 46, 72, 1, 74, 1, 0, 74, 0, 74, 74, 74], [76, 76, 76, 76, 0, 48, 70, 1, 76, 1, 0, 48, 0, 48, 48, 79], [0, 1, 50, 50, 0, 50, 50, 1, 50, 1, 0, 50, 0, 50, 50, 50], [48, 1, 0, 48, 0, 48, 48, 1, 48, 1, 0, 48, 0, 48, 48, 48], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, -1, -1]
patterns: [[74, 0, 1, 74, 0, 74, 72, 1, 74, 1, 0, 74, 0, 74, 0, 72], [0, 1, 1, 74, 0, 74, 72, 1, 74, 1, 0, 74, 0, 74, 74, 72], [0, 74, 74, 74, 0, 74, 72, 1, 74, 1, 0, 74, 0, 74, 74, 72], [0, 1, 74, 74, 0, 74, 72, 1, 74, 1, 0, 74, 0, 74, 74, 76], [0, 1, 1, 76, 0, 76, 76, 1, 76, 1, 0, 76, 0, 76, 76, 76], [77, 1, 0, 77, 0, 77, 77, 1, 77, 1, 0, 77, 0, 77, 77, 67], [0, 74, 70, 46, 0, 74, 69, 1, 70, 1, 0, 70, 0, 70, 70, 70], [72, 72, 72, 48, 0, 72, 74, 1, 72, 1, 0, 76, 0, 76, 74, 48], [0, 1, 74, 74, 0, 74, 72, 1, 74, 1, 0, 74, 0, 74, 74, 72], [76, 1, 0, 76, 0, 76, 76, 1, 76, 1, 0, 76, 0, 76, 76, 76], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, -1, -1]
patterns: [[77, 0, 1, 77, 0, 77, 76, 1, 77, 1, 0, 77, 0, 77, 0, 76], [0, 1, 1, 77, 0, 77, 76, 1, 77, 1, 0, 77, 0, 77, 77, 76], [0, 77, 77, 77, 0, 77, 76, 1, 77, 1, 0, 77, 0, 77, 77, 76], [0, 1, 77, 77, 0, 77, 76, 1, 77, 1, 0, 77, 0, 77, 77, 79], [0, 1, 1, 79, 0, 79, 79, 1, 79, 1, 0, 79, 0, 79, 79, 79], [81, 1, 0, 81, 0, 81, 81, 1, 81, 1, 0, 81, 0, 81, 81, 72], [0, 70, 46, 70, 0, 70, 46, 1, 46, 1, 0, 46, 0, 46, 46, 46], [48, 48, 48, 72, 0, 76, 48, 1, 48, 1, 0, 72, 0, 72, 77, 76], [0, 1, 77, 77, 0, 77, 76, 1, 77, 1, 0, 77, 0, 77, 77, 76], [79, 1, 0, 79, 0, 79, 79, 1, 79, 1, 0, 79, 0, 79, 79, 79], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 8, 4, 9, 10, 11, -1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 77, 0, 1, 1, 64, 0, 1, 1], [62, 0, 1, 1, 1, 1, 69, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 69, 0, 1, 1, 1, 1, 1, 1], [62, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 64, 0, 1, 1, 65, 0, 1, 1], [79, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 60, 0, 1, 1, 1, 1], [74, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [65, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [79, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 84, 0], [1, 1, 1, 1, 1, 1, 1, 1, 70, 0, 1, 1, 69, 0, 1, 1], [74, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 8, 4, 9, 10, 11, -1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 65, 0, 1, 1, 76, 0, 1, 1], [74, 0, 1, 1, 1, 1, 81, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 81, 0, 1, 1, 1, 1, 1, 1], [74, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 76, 0, 1, 1, 77, 0, 1, 1], [67, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 0, 1, 1, 1, 1], [62, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [77, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [67, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 72, 0], [1, 1, 1, 1, 1, 1, 1, 1, 82, 0, 1, 1, 81, 0, 1, 1], [62, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 16
length: 17
length: 35
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
@ -29,10 +47,10 @@ patch:
units:
- type: envelope
id: 105
parameters: {attack: 18, channel: 2, decay: 65, gain: 60, release: 0, stereo: 0, sustain: 0}
parameters: {attack: 0, channel: 2, decay: 70, gain: 76, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 106
parameters: {color: 128, detune: 57, gain: 79, lfo: 0, phase: 0, shape: 63, stereo: 0, transpose: 94, type: 0, unison: 2}
parameters: {color: 128, detune: 69, gain: 79, lfo: 0, phase: 0, shape: 63, stereo: 0, transpose: 88, type: 0, unison: 2}
- type: mulp
id: 126
parameters: {stereo: 0}
@ -41,10 +59,10 @@ patch:
parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 81, shape: 67, stereo: 0}
parameters: {gain: 79, shape: 43, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 35, stereo: 0}
parameters: {bandpass: 0, frequency: 84, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 82, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 62, stereo: 0}
@ -56,34 +74,22 @@ patch:
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 9, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 75, stereo: 0}
- type: filter
id: 13
parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
parameters: {bandpass: 0, frequency: 12, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 69, stereo: 0}
- type: filter
id: 14
parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 85, stereo: 0}
- type: filter
id: 15
parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 49, stereo: 0}
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 48, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 57, stereo: 1}
parameters: {auxgain: 0, outgain: 50, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 62, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: envelope
id: 120
parameters: {attack: 39, decay: 61, gain: 128, release: 0, stereo: 0, sustain: 34}
- type: mulp
id: 121
parameters: {stereo: 0}
parameters: {attack: 62, decay: 76, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
parameters: {amount: 46, port: 0, sendpop: 1, target: 106}
- name: snare edm 2 (sample)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
@ -111,9 +117,9 @@ patch:
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 71, stereo: 0}
parameters: {panning: 64, stereo: 0}
- type: outaux
parameters: {auxgain: 10, outgain: 84, stereo: 1}
parameters: {auxgain: 26, outgain: 42, stereo: 1}
- type: envelope
parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
@ -173,73 +179,53 @@ patch:
parameters: {drive: 114, stereo: 0}
- type: pan
id: 174
parameters: {panning: 70, stereo: 0}
parameters: {panning: 60, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 12, outgain: 50, stereo: 1}
- name: House Bass Organ
parameters: {auxgain: 19, outgain: 39, stereo: 1}
- name: basss v3
numvoices: 1
units:
- type: envelope
id: 207
parameters: {attack: 46, decay: 74, gain: 77, release: 39, stereo: 0, sustain: 36}
- type: oscillator
id: 208
parameters: {color: 84, detune: 48, gain: 128, phase: 0, shape: 50, stereo: 0, transpose: 40, type: 1, unison: 3}
- type: oscillator
id: 213
parameters: {color: 64, detune: 64, gain: 64, phase: 0, shape: 64, stereo: 0, transpose: 71, type: 2, unison: 0}
- type: addp
id: 214
parameters: {stereo: 0}
- type: mulp
id: 209
parameters: {stereo: 0}
- type: filter
id: 218
parameters: {bandpass: 0, frequency: 3, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 219
parameters: {bandpass: 0, frequency: 94, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: distort
id: 215
parameters: {drive: 83, stereo: 0}
id: 1
parameters: {attack: 39, decay: 73, gain: 128, release: 74, stereo: 0, sustain: 62}
- type: send
id: 200
parameters: {amount: 94, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 47, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 221
parameters: {attack: 32, decay: 53, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 222
parameters: {gain: 59, shape: 52, stereo: 0}
id: 21
parameters: {attack: 42, decay: 65, gain: 83, release: 71, stereo: 0, sustain: 86}
- type: oscillator
id: 400
parameters: {color: 49, detune: 66, gain: 89, lfo: 0, phase: 91, shape: 100, stereo: 0, transpose: 88, type: 1, unison: 2}
- type: oscillator
id: 6
parameters: {color: 42, detune: 74, gain: 17, lfo: 0, phase: 64, shape: 70, stereo: 0, transpose: 64, type: 2, unison: 1}
- type: mulp
id: 223
parameters: {stereo: 0}
- type: oscillator
id: 401
parameters: {color: 128, detune: 78, gain: 128, phase: 13, shape: 88, stereo: 0, transpose: 64, type: 0, unison: 2}
- type: addp
id: 20
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 225
parameters: {bandpass: 0, frequency: 91, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 102, stereo: 0}
- type: addp
id: 224
parameters: {stereo: 0}
- type: compressor
id: 229
parameters: {attack: 37, invgain: 87, ratio: 102, release: 65, stereo: 0, threshold: 47}
- type: mulp
id: 230
parameters: {stereo: 0}
- type: distort
id: 228
parameters: {drive: 59, stereo: 0}
id: 170
parameters: {bandpass: 0, frequency: 22, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 46, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 116, stereo: 0}
- type: pan
id: 211
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 212
parameters: {auxgain: 23, outgain: 98, stereo: 1}
- type: envelope
id: 220
parameters: {attack: 0, decay: 72, gain: 76, release: 45, stereo: 0, sustain: 47}
- type: send
id: 217
parameters: {amount: 128, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0}
id: 19
parameters: {auxgain: 0, outgain: 40, stereo: 1}
- name: Crash909
numvoices: 2
units:
@ -254,16 +240,16 @@ patch:
parameters: {stereo: 1}
- type: oscillator
id: 2
parameters: {color: 64, detune: 64, gain: 111, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 64, stereo: 1, transpose: 77, type: 4, unison: 0}
parameters: {color: 64, detune: 54, gain: 111, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 87, stereo: 1, transpose: 77, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 1}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 73, pregain: 40, stereo: 1}
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 78, outgain: 49, panning: 64, stereo: 1}
parameters: {auxgain: 97, outgain: 128, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
@ -282,10 +268,154 @@ patch:
parameters: {bandpass: 0, frequency: 109, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: pan
id: 7
parameters: {panning: 57, stereo: 1}
parameters: {panning: 67, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 84, stereo: 1}
parameters: {auxgain: 11, outgain: 128, stereo: 1}
- name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 66, detune: 67, gain: 99, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 64, stereo: 0, transpose: 64, type: 4, unison: 1}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 43, outgain: 89, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 83, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}
- name: Super Pluck
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 40, decay: 0, gain: 54, release: 51, stereo: 0, sustain: 63}
- type: oscillator
id: 2
parameters: {color: 128, detune: 94, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 10
parameters: {color: 128, detune: 28, gain: 102, lfo: 0, phase: 52, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 11
parameters: {stereo: 0}
- type: noise
id: 23
parameters: {gain: 67, shape: 114, stereo: 0}
- type: addp
id: 24
parameters: {stereo: 0}
- type: mulp
id: 17
parameters: {stereo: 0}
- id: 18
parameters: {}
- type: envelope
id: 12
parameters: {attack: 20, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 13
parameters: {color: 128, detune: 46, gain: 128, phase: 78, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 14
parameters: {color: 128, detune: 99, gain: 128, lfo: 0, phase: 54, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 28
parameters: {stereo: 0}
- type: noise
id: 27
parameters: {gain: 80, shape: 128, stereo: 0}
- type: addp
id: 15
parameters: {stereo: 0}
- type: mulp
id: 26
parameters: {stereo: 0}
- type: delay
parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0}
varargs: [69]
- type: pan
parameters: {panning: 65, stereo: 1}
- type: filter
id: 19
parameters: {bandpass: 0, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 103, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 6, outgain: 20, stereo: 1}
- name: Happy lead
comment: |-
Generic pluck generator
Use oscillator type, color and shape to alter the sound properties
numvoices: 4
units:
- type: envelope
id: 163
parameters: {attack: 40, decay: 102, gain: 68, release: 78, stereo: 0, sustain: 47}
- type: envelope
id: 215
parameters: {attack: 0, decay: 84, gain: 127, release: 84, stereo: 0, sustain: 25}
- type: mulp
id: 216
parameters: {stereo: 0}
- type: oscillator
id: 164
parameters: {color: 91, detune: 52, gain: 128, lfo: 0, phase: 128, shape: 48, stereo: 0, transpose: 76, type: 0, unison: 3}
- type: add
id: 214
parameters: {stereo: 0}
- type: oscillator
id: 165
parameters: {color: 57, detune: 73, gain: 56, lfo: 0, phase: 0, shape: 37, stereo: 0, transpose: 88, type: 1, unison: 3}
- type: addp
id: 166
parameters: {stereo: 0}
- type: oscillator
id: 1002
parameters: {color: 61, detune: 64, gain: 128, looplength: 821, loopstart: 2374, phase: 0, samplestart: 557335, shape: 58, stereo: 0, transpose: 55, type: 4, unison: 1}
- parameters: {}
disabled: true
- type: addp
id: 1003
parameters: {stereo: 0}
- type: mulp
id: 167
parameters: {stereo: 0}
- type: filter
id: 217
parameters: {bandpass: 0, frequency: 30, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 218
parameters: {bandpass: 0, frequency: 53, highpass: 1, lowpass: 0, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 168
parameters: {panning: 61, stereo: 0}
- type: delay
id: 169
parameters: {damp: 12, dry: 103, feedback: 84, notetracking: 0, pregain: 69, stereo: 1}
varargs: [12550, 24402, 21265, 32419]
- type: outaux
id: 172
parameters: {auxgain: 14, outgain: 27, stereo: 1}
- type: loadnote
id: 219
parameters: {stereo: 0}
- type: send
id: 220
parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0}
- name: Global
numvoices: 1
units:
@ -294,7 +424,7 @@ patch:
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 42, dry: 128, feedback: 120, notetracking: 0, pregain: 40, stereo: 1}
parameters: {damp: 97, dry: 113, feedback: 122, notetracking: 0, pregain: 61, stereo: 1}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618, 1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: out
id: 9

View File

@ -43,11 +43,11 @@ USE_WIDECHAR_TEXTS=1
########### Time base ###########
USE_TIME_DIVIDER_IN_X86_CODE=1
TIME_DIVIDER=91241.383
TIME_DIVIDER=77255.477
TIME_BASE=bars
AUDIO_DELAY=2048
PROD_END_TIME=1552992
PROD_END_TIME=2705728
########### Final product ###########
@ -61,9 +61,9 @@ QUOTE=\"
CRINKLER_ORDERTRIES=4000
AUDIO_BUFFER_ALLOCATED_LENGTH=1552992
AUDIO_BUFFER_ALLOCATED_LENGTH=2705728
AUDIO_SAMPLING_RATE=44100
LOOP_END=5.0
LOOP_START=3.0
LOOP_ENABLED=0
TIME_DIVIDER_INT=91241
TIME_DIVIDER_INT=77255

Binary file not shown.

BIN
music/4k_trance.xrns Normal file

Binary file not shown.

25
music/DiscoTom.yml Normal file
View File

@ -0,0 +1,25 @@
name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 66, detune: 64, gain: 99, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 64, stereo: 0, transpose: 64, type: 4}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 74, outgain: 128, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}

60
music/SuperSaw.yml Normal file
View File

@ -0,0 +1,60 @@
name: Super Pluck
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 0, gain: 54, release: 51, stereo: 0, sustain: 63}
- type: oscillator
id: 2
parameters: {color: 128, detune: 94, gain: 128, phase: 0, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 10
parameters: {color: 128, detune: 28, gain: 102, lfo: 0, phase: 52, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 11
parameters: {stereo: 0}
- type: noise
id: 23
parameters: {gain: 67, shape: 114, stereo: 0}
- type: addp
id: 24
parameters: {stereo: 0}
- type: mulp
id: 17
parameters: {stereo: 0}
- id: 18
parameters: {}
- type: envelope
id: 12
parameters: {attack: 20, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 13
parameters: {color: 128, detune: 46, gain: 128, phase: 78, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 14
parameters: {color: 128, detune: 99, gain: 128, lfo: 0, phase: 54, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 28
parameters: {stereo: 0}
- type: noise
id: 27
parameters: {gain: 80, shape: 128, stereo: 0}
- type: addp
id: 15
parameters: {stereo: 0}
- type: mulp
id: 26
parameters: {stereo: 0}
- type: delay
parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0}
varargs: [69]
- type: pan
parameters: {panning: 65, stereo: 1}
- type: filter
id: 19
parameters: {bandpass: 0, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 103, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 0, outgain: 33, stereo: 1}

View File

@ -10,12 +10,18 @@ const char *__temp_cleaned_shader_glsl =
"uniform vec2 v;"
"uniform float f;"
"uniform sampler2D m,k;struct Ray{vec3 rd;vec3 dir;};"
"vec2 s()"
"{"
"vec2 r=2.*((gl_FragCoord.xy+vec2(0)*.5)/v.xy-.5);"
"r.x*=v.x/v.y;"
"return r;"
"}"
"mat2 n()"
"{"
"vec2 v=vec2(1.3);"
"return mat2(1./v.x,0.,0.,1./v.y);"
"}"
"const float i=2.*acos(-1.),s=sqrt(5.)*.5+.5;"
"const float i=2.*acos(-1.),c=sqrt(5.)*.5+.5;"
"float n(vec3 v,vec2 x)"
"{"
"vec3 f=abs(v);"
@ -26,29 +32,29 @@ const char *__temp_cleaned_shader_glsl =
"float f=acos(-1.)/2.;"
"v=cos(f)*v+sin(f)*vec2(v.y,-v.x);"
"}"
"float x(float v,float f)"
"float s(float v,float f)"
"{"
"return min(-.1,max(v,f))+length(max(vec2(.1+v,.1+f),vec2(0)));"
"}"
"float t(vec2 v,float f)"
"{"
"return fract(tan(distance(v*s,v)*f)*v.x);"
"return fract(tan(distance(v*c,v)*f)*v.x);"
"}"
"mat2 t(float v)"
"mat2 s(float v)"
"{"
"float f=sin(v),x=cos(v);"
"return mat2(x,-f,f,x);"
"}"
"float n(vec3 v,float f,float i)"
"float n(vec3 v,float f,float x)"
"{"
"vec3 r=v;"
"r.xz*=t(i);"
"r.yz*=t(i);"
"r.xz*=s(x);"
"r.yz*=s(x);"
"n(r.yz);"
"float m=n(r,vec2(.5+f,.1)),y=n(r,vec2(.2+f,.1));"
"return x(m,-y);"
"float i=n(r,vec2(.5+f,.1)),y=n(r,vec2(.2+f,.1));"
"return s(i,-y);"
"}"
"vec2 x(vec3 v)"
"vec2 t(vec3 v)"
"{"
"float x=0.,r=1e10;"
"vec3 i=v;"
@ -62,15 +68,15 @@ const char *__temp_cleaned_shader_glsl =
"}"
"return vec2(r,x);"
"}"
"vec3 t(vec3 v,vec3 f,inout vec3 i)"
"vec3 s(vec3 v,vec3 f,inout vec3 x)"
"{"
"float r=0.,m=0.,y=0.;"
"for(int e=0;e<150;e++)"
"float r=0.,i=0.,y=0.;"
"for(int m=0;m<150;m++)"
"{"
"i=v+f*r;"
"vec2 n=x(i);"
"x=v+f*r;"
"vec2 n=t(x);"
"r+=n.x;"
"m=n.y;"
"i=n.y;"
"if(r>80.)"
"break;"
"if(n.x<abs(.001*r))"
@ -81,17 +87,17 @@ const char *__temp_cleaned_shader_glsl =
"}"
"if(r>80.)"
"r=-1.;"
"return vec3(r,m,y);"
"return vec3(r,i,y);"
"}"
"vec3 x(vec3 v,vec3 f,vec3 i)"
"vec3 t(vec3 v,vec3 f,vec3 x)"
"{"
"float r=0.,m=0.,y=0.;"
"for(int e=0;e<50;e++)"
"float r=0.,i=0.,y=0.;"
"for(int m=0;m<50;m++)"
"{"
"i=v+f*r;"
"vec2 n=x(i);"
"x=v+f*r;"
"vec2 n=t(x);"
"r+=n.x;"
"m=n.y;"
"i=n.y;"
"if(r>40.)"
"break;"
"if(n.x<abs(.001*r))"
@ -102,77 +108,77 @@ const char *__temp_cleaned_shader_glsl =
"}"
"if(r>40.)"
"r=-1.;"
"return vec3(r,m,y);"
"return vec3(r,i,y);"
"}"
"float e(vec3 v,vec3 f)"
"float x(vec3 v,vec3 x)"
"{"
"float r=1.,m=.01;"
"float r=1.,f=.01;"
"for(int i=0;i<40;i++)"
"{"
"if(m>30.)"
"if(f>30.)"
"break;"
"float y=x(v+m*f).x;"
"r=min(r,y/(18.*m));"
"m+=clamp(y,.005,.5);"
"if(r<-1.||m>30.)"
"float m=t(v+f*x).x;"
"r=min(r,m/(18.*f));"
"f+=clamp(m,.005,.5);"
"if(r<-1.||f>30.)"
"break;"
"}"
"r=max(r,-1.);"
"return.25*(1.+r)*(1.+r)*(2.-r);"
"}"
"vec3 e(vec3 v)"
"vec3 x(vec3 v)"
"{"
"vec2 f=vec2(.001,0);"
"vec3 r=vec3(x(v+f.xyy).x-x(v-f.xyy).x,x(v+f.yxy).x-x(v-f.yxy).x,x(v+f.yyx).x-x(v-f.yyx).x);"
"vec3 r=vec3(t(v+f.xyy).x-t(v-f.xyy).x,t(v+f.yxy).x-t(v-f.yxy).x,t(v+f.yyx).x-t(v-f.yyx).x);"
"return normalize(r);"
"}"
"vec3 p(vec3 v,vec3 f)"
"vec3 e(vec3 v,vec3 f)"
"{"
"vec3 r=vec3(.5454);"
"return r+(1.-r)*pow(clamp(1.-dot(v,f),0.,1.),5.);"
"vec3 x=vec3(.5454);"
"return x+(1.-x)*pow(clamp(1.-dot(v,f),0.,1.),5.);"
"}"
"vec3 e(vec3 v,vec3 f,float r,vec3 i,vec3 x,vec3 y,float m)"
"vec3 e(vec3 v,vec3 f,float r,vec3 m,vec3 i,vec3 y,float k)"
"{"
"vec3 n=normalize(i),d=vec3(max(0.,dot(n,reflect(x,y)))),s=p(normalize(n-x),n)*m;"
"float k=e(i+y*.01,v);"
"d=pow(d,vec3(r))*m;"
"return f*mix(vec3(1)*vec3(max(0.,dot(n,y))),d,s)*k;"
"vec3 n=normalize(m),c=vec3(max(0.,dot(n,reflect(i,y)))),d=e(normalize(n-i),n)*k;"
"float s=x(m+y*.01,v);"
"c=pow(c,vec3(r))*k;"
"return f*mix(vec3(1)*vec3(max(0.,dot(n,y))),c,d)*s;"
"}"
"float r(vec3 v,vec3 f)"
"float p(vec3 v,vec3 f)"
"{"
"float r=0.,m=1.;"
"for(int i=0;i<8;i++)"
"float r=0.,i=1.;"
"for(int x=0;x<8;x++)"
"{"
"float y=.01+.02*float(i*i),d=x(v+f*y).x;"
"r+=(y-d)*m;"
"m*=.85;"
"float m=.01+.02*float(x*x),y=t(v+f*m).x;"
"r+=(m-y)*i;"
"i*=.85;"
"}"
"return 1.-clamp(.6*r,0.,1.);"
"}"
"vec3 e(vec3 v,vec3 f,vec3 m,float i)"
"vec3 e(vec3 v,vec3 f,vec3 r,float m)"
"{"
"float y=1.,x=r(v,f);"
"float i=1.,y=p(v,f);"
"vec3 n=vec3(.1529);"
"if(i==0.)"
"n=vec3(.2863,.1059,.2431),y=1.5;"
"else if(i==1.)"
"n=vec3(.3294,.0941,.6),y=.6;"
"else if(i==2.)"
"n=vec3(.5804,.9647,1),y=1.;"
"else if(i==3.)"
"n=vec3(0),y=1e2;"
"else if(i==4.)"
"n=vec3(.9961,1,.9922),y=.3;"
"vec3 d=vec3(0);"
"d+=e(vec3(0,-40,-1),vec3(.56,.44,.18)*2.,y,v,m,f,x);"
"d+=e(vec3(-20,4,10),vec3(.04,.2,.71)*2.,y,v,m,f,x);"
"vec3 s=vec3(0,4,2);"
"float c=e(v+f*.01,s);"
"d+=vec3(.6627,.7098,.8863)*clamp(dot(f,s),0.,1.)*c*x;"
"d+=vec3(.1333,.1333,.1216)*clamp(dot(f,normalize(s*vec3(-1,0,-1))),0.,1.)*x;"
"return n*max(vec3(0),d);"
"if(m==0.)"
"n=vec3(.2863,.1059,.2431),i=1.5;"
"else if(m==1.)"
"n=vec3(.3294,.0941,.6),i=.6;"
"else if(m==2.)"
"n=vec3(.5804,.9647,1),i=1.;"
"else if(m==3.)"
"n=vec3(0),i=1e2;"
"else if(m==4.)"
"n=vec3(.9961,1,.9922),i=.3;"
"vec3 c=vec3(0);"
"c+=e(vec3(0,-40,-1),vec3(.56,.44,.18)*2.,i,v,r,f,y);"
"c+=e(vec3(-20,4,10),vec3(.04,.2,.71)*2.,i,v,r,f,y);"
"vec3 d=vec3(0,4,2);"
"float s=x(v+f*.01,d);"
"c+=vec3(.6627,.7098,.8863)*clamp(dot(f,d),0.,1.)*s*y;"
"c+=vec3(.1333,.1333,.1216)*clamp(dot(f,normalize(d*vec3(-1,0,-1))),0.,1.)*y;"
"return n*max(vec3(0),c);"
"}"
"vec3 p(vec3 f)"
"vec3 e(vec3 f)"
"{"
"vec2 r=gl_FragCoord.xy/v.xy;"
"f=mix(f,f*smoothstep(.8,.4,length(r-vec2(.5))),.9);"
@ -180,48 +186,42 @@ const char *__temp_cleaned_shader_glsl =
"f*=vec3(1);"
"return pow(f,vec3(1./2.2));"
"}"
"vec3 e(vec2 f,vec3 v,vec3 i)"
"vec3 e(vec2 f,vec3 v,vec3 x)"
"{"
"vec3 r=normalize(i-v),y=cross(vec3(0,1,0),r);"
"vec3 r=normalize(x-v),y=cross(vec3(0,1,0),r);"
"return normalize(v+r+f.x*y+f.y*cross(r,y)-v);"
"}"
"vec3 p(vec2 v,vec3 f,vec3 i)"
"vec3 p(vec2 v,vec3 f,vec3 x)"
"{"
"vec3 r=normalize(i-f),y=normalize(cross(vec3(0,1,0),r)),m=normalize(cross(r,y));"
"vec2 n=vec2(t(gl_FragCoord.xy,.13),t(gl_FragCoord.xy,.4));"
"return normalize(v.x*y+v.y*m+1.7*r+sqrt(n.x)*(y*sin(n.y*6.283)+m*cos(n.y*6.283))*.25*1.7/150.2);"
"vec3 r=normalize(x-f),y=normalize(cross(vec3(0,1,0),r)),i=normalize(cross(r,y));"
"vec2 m=vec2(t(gl_FragCoord.xy,.13),t(gl_FragCoord.xy,.4));"
"return normalize(v.x*y+v.y*i+1.7*r+sqrt(m.x)*(y*sin(m.y*6.283)+i*cos(m.y*6.283))*.25*1.7/150.2);"
"}"
"vec3 r(vec2 v)"
"vec3 p(vec2 v)"
"{"
"bool r=!true;"
"vec3 f=vec3(0,5,-3),y=vec3(0),m;"
"m=r?"
"vec3 f=vec3(0,5,-3),y=vec3(0),i;"
"i=r?"
"p(v,f,y):"
"e(v,f,y);"
"vec3 i=vec3(.051,.0667,.1529),n=vec3(0),d=t(f,m,n),s=m;"
"vec3 m=vec3(.051,.0667,.1529),n=vec3(0),d=s(f,i,n),c=i;"
"if(d.z>0.)"
"{"
"vec3 k=e(n);"
"i=e(n,k,m,d.y);"
"i=i*exp(-d.x*.04)+mix(i,mix(vec3(.3686,.2431,.4392),vec3(.4,.7294,.9216),pow(max(dot(s,vec3(0,.3,-1)),0.),8.)),1.-exp(-d.x*.04))*(1.-exp(-d.x*.04));"
"m=normalize(reflect(m,k));"
"vec3 c=n+m*.01,g=x(c,m,n);"
"if(g.z>0.)"
"n=c+m*g.x,k=e(n),i+=.1*e(n,k,m,g.y);"
"vec3 k=x(n);"
"m=e(n,k,i,d.y);"
"m=m*exp(-d.x*.04)+mix(m,mix(vec3(.3686,.2431,.4392),vec3(.4,.7294,.9216),pow(max(dot(c,vec3(0,.3,-1)),0.),8.)),1.-exp(-d.x*.04))*(1.-exp(-d.x*.04));"
"i=normalize(reflect(i,k));"
"vec3 g=n+i*.01,a=t(g,i,n);"
"if(a.z>0.)"
"n=g+i*a.x,k=x(n),m+=.1*e(n,k,i,a.y);"
"}"
"return i;"
"}"
"vec2 e()"
"{"
"vec2 r=2.*((gl_FragCoord.xy+vec2(0)*.5)/v.xy-.5);"
"r.x*=v.x/v.y;"
"return r;"
"return m;"
"}"
"void main()"
"{"
"vec3 v=vec3(0);"
"v+=r(e());"
"v=p(v);"
"v+=p(s());"
"v=e(v);"
"gl_FragColor=vec4(v,1);"
"}";