sample testailuja

This commit is contained in:
2024-06-04 17:07:01 +03:00
parent 1c6b4cdc7e
commit 878e57b057
16 changed files with 1346 additions and 599 deletions

View File

@ -1,6 +1,6 @@
%define SU_LENGTH_IN_SAMPLES 3335488
%define SU_LENGTH_IN_SAMPLES 1550944
%define SU_SAMPLE_RATE 44100
%define SU_BPM 165.
%define SU_BPM 116.
;-------------------------------------------------------------------------------
; unit struct
@ -61,7 +61,7 @@ endstruc
section .synth_object bss align=256
su_synth_obj:
resb su_synthworkspace.size
resb 34*su_delayline_wrk.size
resb 20*su_delayline_wrk.size
;-------------------------------------------------------------------------------
@ -76,23 +76,26 @@ 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 1 ; Stack: RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push eax ; Stack: GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 16 ; 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
push eax ; Stack: Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push eax ; Stack: Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
call su_update_voices ; update instruments for the new row
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, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
push 7 ; Stack: VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
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
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
mov ecx, dword su_synth_obj + su_synthworkspace.size - su_delayline_wrk.filtstate
lea ebp, [edx + su_synthworkspace.voices] ; WRK points to the first voice
call su_run_vm ; run through the VM code
pop eax ; eax = VoicesRemain, Stack: Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
mov esi, [esp + 52] ; esi points to the output buffer
pop eax ; eax = VoicesRemain, Stack: PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pop eax ; eax = PolyphonyBitmask, Stack: Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
mov esi, [esp + 56] ; esi points to the output buffer
mov edi, dword su_synth_obj+su_synthworkspace.left
mov ecx, 2
output_sound16bit_loop: ; loop over two channels, left & right
@ -107,19 +110,20 @@ su_render_sampleloop: ; loop through every sample in the row
stosd
add esi,2
loop output_sound16bit_loop
mov [esp + 52], esi ; save esi back to stack ; *ptr++ = left, *ptr++ = right
pop eax ; eax = Sample, Stack: Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
mov [esp + 56], esi ; save esi back to stack ; *ptr++ = left, *ptr++ = right
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, 4009
cmp eax, 5702
jl su_render_sampleloop
pop eax ; eax = Row, Stack: GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr ; Stack: pushad ptr
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, 832
cmp eax, 272
jl su_render_rowloop
; rewind the stack the entropy of multiple pop eax is probably lower than add
pop eax ; eax = GlobalTick, Stack: RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pop eax ; eax = RandSeed, Stack: edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pop eax ; eax = GlobalTick, Stack: RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pop eax ; eax = RandSeed, Stack: VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pop eax ; eax = VoiceTrackBitmask, Stack: edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
popad ; Popped: eax, ecx, edx, ebx, esp, ebp, esi, edi. Stack: retaddr_su_render_song, OutputBufPtr
ret 4
@ -131,35 +135,58 @@ su_render_sampleloop: ; loop through every sample in the row
;-------------------------------------------------------------------------------
section .su_update_voices code align=1
su_update_voices:
; The simple implementation: each track triggers always the same voice
; The more complicated implementation: one track can trigger multiple voices
xor edx, edx
xor ebx, ebx
mov bl, 16 ; rows per pattern
div ebx ; eax = current pattern, edx = current row in pattern
lea esi, [su_tracks+eax]; esi points to the pattern data for current track
mov edi, dword su_synth_obj+su_synthworkspace.voices
mov bl, 6 ; MAX_TRACKS is always <= 32 so this is ok
mov ebx, 16 ; we could do xor ebx,ebx; mov bl,PATTERN_SIZE, but that would limit patternsize to 256...
div ebx ; eax = current pattern, edx = current row in pattern
lea esi, [su_tracks+eax] ; esi points to the pattern data for current track
xor eax, eax ; eax is the first voice of next track
xor ebx, ebx ; ebx is the first voice of current track
mov ebp, dword su_synth_obj ; ebp points to the current_voiceno array
su_update_voices_trackloop:
movzx eax, byte [esi] ; eax = current pattern
imul eax, 16 ; multiply by rows per pattern, eax = offset to current pattern data
movzx eax, byte [su_patterns + eax + edx] ; ecx = note
cmp al, 1 ; anything but hold causes action
imul eax, 16 ; eax = offset to current pattern data
movzx eax,byte [su_patterns + eax + edx] ; eax = note
push edx ; Stack: ptrnrow
xor edx, edx ; edx=0
mov ecx, ebx ; ecx=first voice of the track to be done
su_calculate_voices_loop: ; do {
bt dword [esp + 16 + 4],ecx ; test voicetrack_bitmask// notice that the incs don't set carry
inc edx ; edx++ // edx=numvoices
inc ecx ; ecx++ // ecx=the first voice of next track
jc su_calculate_voices_loop ; } while bit ecx-1 of bitmask is on
push ecx ; Stack: next_instr ptrnrow
cmp al, 1 ; anything but hold causes action
je short su_update_voices_nexttrack
mov dword [edi+su_voice.sustain], eax ; set the voice currently active to release
jb su_update_voices_nexttrack ; if cl < HLD (no new note triggered) goto nexttrack
su_update_voices_retrigger:
mov cl, byte [ebp]
mov edi, ecx
add edi, ebx
shl edi, 12 ; each unit = 64 bytes and there are 1<<MAX_UNITS_SHIFT units + small header
and dword [su_synth_obj + su_synthworkspace.voices + su_voice.sustain + edi], 0 ; set the voice currently active to release; notice that it could increment any number of times
cmp al, 1 ; if cl < HLD (no new note triggered)
jl su_update_voices_nexttrack ; goto nexttrack
inc ecx ; curvoice++
cmp ecx, edx ; if (curvoice >= num_voices)
jl su_update_voices_skipreset
xor ecx,ecx ; curvoice = 0
su_update_voices_skipreset:
mov byte [ebp],cl
add ecx, ebx
shl ecx, 12 ; each unit = 64 bytes and there are 1<<6 units + small header
lea edi,[su_synth_obj + su_synthworkspace.voices + ecx]
stosd ; save note
stosd ; save sustain
mov ecx, (su_voice.size - su_voice.inputs)/4 ; could be xor ecx, ecx; mov ch,...>>8, but will it actually be smaller after compression?
stosd ; save release
mov ecx, (su_voice.size - su_voice.inputs)/4
xor eax, eax
rep stosd ; clear the workspace of the new voice, retriggering oscillators
jmp short su_update_voices_skipadd
su_update_voices_nexttrack:
add edi, su_voice.size
su_update_voices_skipadd:
add esi, 52
dec ebx
jnz short su_update_voices_trackloop
pop ebx ; ebx=first voice of next instrument, Stack: ptrnrow
pop edx ; edx=patrnrow
add esi, 17
inc ebp
cmp ebp,su_synth_obj + 6
jl su_update_voices_trackloop
ret
;-------------------------------------------------------------------------------
@ -178,7 +205,7 @@ su_update_voices_skipadd:
;-------------------------------------------------------------------------------
section .su_run_vm code align=1
su_run_vm:
pushad ; Stack: edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pushad ; Stack: edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
su_run_vm_loop: ; loop until all voices done
movzx edi, byte [ebx] ; edi = command byte
inc ebx ; move to next instruction
@ -209,12 +236,22 @@ su_transform_operands_out:
call [su_vm_jumptable-4+edi*4] ; call the function corresponding to the instruction
jmp su_run_vm_loop
su_run_vm_advance:
mov ebp, dword [esp + 8] ; load pointer to voice to register
add ebp, su_voice.size ; shift it to point to following voice
mov dword [esp + 8], ebp ; save back to stack
dec dword [esp + 36] ; voices--
jne su_run_vm_loop ; if there's more voices to process, goto vm_loop
popad ; Popped: eax, ecx = DelayWorkSpace, edx = Synth, ebx = OpcodeStream, esp, ebp = Voice, esi = OperandStream, edi. Stack: retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
mov ebp, [esp + 8] ; WRK points to start of current voice
add ebp, su_voice.size ; move to next voice
mov [esp + 8], ebp ; update the pointer in the stack to point to the new voice
mov ecx, [esp + 36] ; ecx = how many voices remain to process
dec ecx ; decrement number of voices to process
bt dword [esp + 40], ecx ; if voice bit of su_polyphonism not set
jnc su_op_advance_next_instrument ; goto next_instrument
mov esi, [esp + 4] ; if it was set, then repeat the opcodes for the current voice
mov ebx, [esp + 16]
su_op_advance_next_instrument:
mov [esp + 4], esi ; save current VAL as a checkpoint
mov [esp + 16], ebx ; save current COM as a checkpoint
su_op_advance_finish:
mov [esp + 36], ecx
jne su_run_vm_loop ; ZF was set by dec ecx
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
;-------------------------------------------------------------------------------
; ADDP opcode: add the two top most signals on the stack and pop
@ -224,11 +261,6 @@ su_run_vm_advance:
;-------------------------------------------------------------------------------
section .su_op_addp code align=1
su_op_addp:
jnc su_op_addp_mono
faddp st2, st0
faddp st2, st0
ret
su_op_addp_mono:
faddp st1, st0
ret
@ -248,44 +280,6 @@ su_op_mulp_mono:
fmulp st1
ret
;-------------------------------------------------------------------------------
; XCH opcode: exchange the signals on the stack
;-------------------------------------------------------------------------------
; Mono: a b -> b a
; stereo: a b c d -> c d a b
;-------------------------------------------------------------------------------
section .su_op_xch code align=1
su_op_xch:
fxch st0, st1
ret
;-------------------------------------------------------------------------------
; HOLD opcode: sample and hold the signal, reducing sample rate
;-------------------------------------------------------------------------------
; Mono version: holds the signal at a rate defined by the freq parameter
; Stereo version: holds both channels
;-------------------------------------------------------------------------------
section .su_op_hold code align=1
su_op_hold:
fld dword [edx] ; f x
fmul st0, st0 ; f^2 x
fchs ; -f^2 x
fadd dword [ebp] ; p-f^2 x
fst dword [ebp] ; p <- p-f^2
fldz ; 0 p x
fucomip st1 ; p x
fstp dword [esp-4] ; t=p, x
jc short su_op_hold_holding ; if (0 < p) goto holding
fld1 ; 1 x
fadd dword [esp-4] ; 1+t x
fstp dword [ebp] ; x
fst dword [ebp+4] ; save holded value
ret ; x
su_op_hold_holding:
fstp st0 ;
fld dword [ebp+4] ; x
ret
;-------------------------------------------------------------------------------
; FILTER opcode: perform low/high/band-pass/notch etc. filtering on the signal
@ -316,10 +310,6 @@ su_op_filter:
jz short su_op_filter_skiplowpass
fadd dword [ebp]
su_op_filter_skiplowpass:
test al, byte 0x20
jz short su_op_filter_skipbandpass
fadd dword [ebp+8]
su_op_filter_skipbandpass:
test al, byte 0x10
jz short su_op_filter_skiphighpass
fadd dword [ebp+4]
@ -343,12 +333,14 @@ su_op_filter_skipneghighpass:
;-------------------------------------------------------------------------------
section .su_op_pan code align=1
su_op_pan:
fld dword [edx] ; p s
fmul st1 ; p*s s
fsub st1, st0 ; p*s s-p*s
; Equal to
; s*p s*(1-p)
fxch ; s*(1-p) s*p SHOULD PROBABLY DELETE, WHY BOTHER
jc su_op_pan_do ; this time, if this is mono op...
fld st0 ; ...we duplicate the mono into stereo first
su_op_pan_do:
fld dword [edx] ; p l r
fld1 ; 1 p l r
fsub st1 ; 1-p p l r
fmulp st2 ; p (1-p)*l r
fmulp st2 ; (1-p)*l p*r
ret
;-------------------------------------------------------------------------------
@ -363,10 +355,10 @@ su_op_pan:
section .su_op_delay code align=1
su_op_delay:
lodsw ; al = delay index, ah = delay count
pushad ; Stack: edi, DelayVal, ebp, esp, DelayCom, edx, ecx, eax, retaddr_su_op_delay, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pushad ; Stack: edi, DelayVal, ebp, esp, DelayCom, edx, ecx, eax, retaddr_su_op_delay, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
movzx ebx, al
lea ebx,[su_delay_times + ebx*2] ; BX now points to the right position within delay time table
movzx esi, word [esp + 84] ; notice that we load word, so we wrap at 65536
movzx esi, word [esp + 88] ; notice that we load word, so we wrap at 65536
mov ecx, dword [esp + 60] ; ebp is now the separate delay workspace, as they require a lot more space
jnc su_op_delay_mono
push eax ; save _ah (delay count)
@ -377,7 +369,7 @@ su_op_delay:
su_op_delay_mono: ; flow into mono delay
call su_op_delay_do ; when stereo delay is not enabled, we could inline this to save 5 bytes, but I expect stereo delay to be farely popular so maybe not worth the hassle
mov dword [esp + 60],ecx ; move delay workspace pointer back to stack.
popad ; Popped: eax, ecx, edx, ebx = DelayCom, esp, ebp, esi = DelayVal, edi. Stack: retaddr_su_op_delay, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
popad ; Popped: eax, ecx, edx, ebx = DelayCom, esp, ebp, esi = DelayVal, edi. Stack: retaddr_su_op_delay, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, 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
;-------------------------------------------------------------------------------
@ -445,10 +437,6 @@ section .su_op_compressor code align=1
su_op_compressor:
fld st0 ; x x
fmul st0, st0 ; x^2 x
fld st2 ; r x^2 l r
fst st3 ; y x^2 l r
fmul st0, st0 ; y^2 x^2 l r
faddp st1, st0 ; y^2+x^2 l r
fld dword [ebp] ; l x^2 x
fucomi st0, st1
setnb al ; if (st0 >= st1) al = 1; else al = 0;
@ -477,7 +465,6 @@ su_op_compressor:
; 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
fld st0 ; and return the computed gain two times, ready for MULP STEREO
ret
@ -528,12 +515,6 @@ section .su_op_send code align=1
su_op_send:
lodsw
mov ecx, [esp + 12] ; load pointer to voice
pushf ; uh ugly: we save the flags just for the stereo carry bit. Doing the .CX loading later crashed the synth for stereo sends as loading the synth address from stack was f'd up by the "call su_op_send_mono"
test ah, 0x80
jz su_op_send_skipglobal
mov ecx, [esp + 24 + 4]
su_op_send_skipglobal:
popf
test al, 0x8 ; if the SEND_POP bit is not set
jnz su_op_send_skippush
fld st0 ; duplicate the signal on stack: s s
@ -615,7 +596,7 @@ su_op_envelope_leave2:
;-------------------------------------------------------------------------------
section .su_op_noise code align=1
su_op_noise:
lea ecx,[esp + 56]
lea ecx,[esp + 60]
imul eax, [ecx],16007
mov [ecx],eax
fild dword [ecx]
@ -646,7 +627,7 @@ su_op_oscillator:
fchs ; -d r, negate the detune for second round
su_op_oscillat_mono:
pushad ; Stack: edi, esi, OscWRK, esp, ebx, edx, ecx, , retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
pushad ; Stack: edi, esi, OscWRK, esp, ebx, edx, ecx, , retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
fldz ; 0 d
fxch ; d a=0, "accumulated signal"
su_op_oscillat_unison_loop:
@ -668,39 +649,31 @@ su_op_oscillat_unison_loop:
jmp short su_op_oscillat_unison_loop
su_op_oscillat_unison_out:
popad ; Popped: eax = , ecx, edx, ebx, esp, ebp = OscWRK, esi, edi. Stack: retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, Sample, Row, GlobalTick, RandSeed, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr
popad ; Popped: eax = , ecx, edx, ebx, esp, ebp = OscWRK, esi, edi. Stack: retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, 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
su_op_oscillat_single:
fld dword [edx]
fsub dword [FCONST_0_500000]
fdiv dword [FCONST_0_00781250]
faddp st1
test al, byte 0x08
jnz su_op_oscillat_skipnote
fiadd dword [edx-su_voice.inputs+su_voice.note] ; // st0 is note, st1 is t+d offset
su_op_oscillat_skipnote:
fmul dword [ICONST_1034594986]
call su_power
test al, byte 0x08
jz short su_op_oscillat_normalize_note
fmul dword [FCONST_3_80000em05] ; // st0 is now frequency for lfo
jmp short su_op_oscillat_normalized
su_op_oscillat_normalize_note:
fmul dword [FCONST_9_269614em05] ; // st0 is now frequency
su_op_oscillat_normalized:
fadd dword [ebp]
test al, byte 0x80
jz short su_op_oscillat_not_sample
fst dword [ebp] ; for samples, we store the phase without mod(p,1)
call su_oscillat_sample
jmp su_op_oscillat_shaping ; skip the rest to avoid color phase normalization and colorloading
su_op_oscillat_not_sample:
fld1 ; we need to take mod(p,1) so the frequency does not drift as the float
fadd st1, st0 ; make no mistake: without this, there is audible drifts in oscillator pitch
fxch ; as the actual period changes once the phase becomes too big
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
@ -711,6 +684,10 @@ su_op_oscillat_notsine:
jz short su_op_oscillat_not_trisaw
call su_oscillat_trisaw
su_op_oscillat_not_trisaw:
test al, byte 0x10
jz short su_op_oscillat_not_pulse
call su_oscillat_pulse
su_op_oscillat_not_pulse:
su_op_oscillat_shaping:
; finally, shape the oscillator and apply gain
fld dword [edx + 16]
@ -719,6 +696,17 @@ su_op_oscillat_gain:
fmul dword [edx + 20]
ret
section .su_oscillat_pulse code align=1
su_oscillat_pulse:
fucomi st1 ; // c p
fld1
jnc short su_oscillat_pulse_up ; // +1 c p
fchs ; // -1 c p
su_oscillat_pulse_up:
fstp st1 ; // +-1 p
fstp st1 ; // +-1
ret
section .su_oscillat_trisaw code align=1
su_oscillat_trisaw:
fucomi st1 ; // c p
@ -748,6 +736,30 @@ su_oscillat_sine_do:
fsin ; // sin(2*pi*p)
ret
section .su_oscillat_sample code align=1
su_oscillat_sample:
pushad ; Stack: SampleDi, esi, ebp, esp, SampleBx, SampleDx, SampleCx, SampleAx, retaddr_su_oscillat_sample, retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, retaddr_su_run_vm, VoicesRemain, PolyphonyBitmask, Sample, Row, GlobalTick, RandSeed, VoiceTrackBitmask, edi, esi, ebp, esp, ebx, edx, ecx, eax, retaddr_su_render_song, OutputBufPtr ; edx must be saved, eax & ecx if this is stereo osc
push eax
mov al, byte [esi-4] ; reuse "color" as the sample number
lea edi, [su_sample_offsets + eax*8]; edi points now to the sample table entry
fmul dword [FCONST_84_28075] ; p*r
fistp dword [esp]
pop edx ; edx is now the sample number
movzx ebx, word [edi + 4] ; ecx = loopstart
sub edx, ebx ; if sample number < loop start
jl su_oscillat_sample_not_looping ; then we're not looping yet
mov eax, edx ; eax = sample number
movzx ecx, word [edi + 6] ; edi is now the loop length
xor edx, edx ; div wants edx to be empty
div ecx ; edx is now the remainder
su_oscillat_sample_not_looping:
add edx, ebx ; sampleno += loopstart
add edx, dword [edi]
fild word [su_sample_table + edx*2]
fdiv dword [FCONST_32767_0]
popad ; Popped: eax = SampleAx, ecx = SampleCx, edx = SampleDx, ebx = SampleBx, esp, ebp, esi, edi = SampleDi. Stack: retaddr_su_oscillat_sample, retaddr_su_op_oscillator, edi, OperandStream, Voice, esp, OpcodeStream, Synth, DelayWorkSpace, eax, 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
;-------------------------------------------------------------------------------
; IN opcode: inputs and clears a global port
;-------------------------------------------------------------------------------
@ -766,6 +778,37 @@ su_op_in:
ret
section .su_load_gmdls code align=1
global _su_load_gmdls@0
_su_load_gmdls@0:
mov eax, su_sample_table
; these are the arguments for ReadFile
push 0 ; NULL
push eax ; &bytes_read, reusing sample table again; it does not matter that the first four bytes are trashed
push 3440660 ; number of bytes to read
push eax ; here we actually pass the sample table to readfile
; these are for OpenFile
push 0 ; OF_READ
push eax ; &ofstruct, blatantly reuse the sample table
push su_gmdls_path1 ; path
call dword [__imp__OpenFile@12]; eax = OpenFile(path,&ofstruct,OF_READ)
push eax ; handle to file
call dword [__imp__ReadFile@20] ; Readfile(handle,&su_sample_table,SAMPLE_TABLE_SIZE,&bytes_read,NULL)
ret
extern __imp__OpenFile@12 ; requires windows
extern __imp__ReadFile@20
; requires windows
section .su_gmdls_path1 data align=1
su_gmdls_path1:
db 'drivers/gm.dls',0
section .susamtable bss align=256
su_sample_table:
resb 3440660 ; size of gmdls.
;-------------------------------------------------------------------------------
; su_nonlinear_map function: returns 2^(-24*x) of parameter number _AX
@ -813,7 +856,7 @@ su_power:
; best way to do this
;-------------------------------------------------------------------------------
section .su_op_distort code align=1
su_op_distort:call su_effects_stereohelper
su_op_distort:
fld dword [edx]
su_waveshaper:
@ -869,17 +912,15 @@ section .su_vm_jumptable data align=1
su_vm_jumptable:
dd su_op_envelope
dd su_op_oscillator
dd su_op_distort
dd su_op_hold
dd su_op_mulp
dd su_op_noise
dd su_op_filter
dd su_op_addp
dd su_op_pan
dd su_op_delay
dd su_op_xch
dd su_op_outaux
dd su_op_send
dd su_op_distort
dd su_op_delay
dd su_op_compressor
dd su_op_in
dd su_op_out
@ -891,17 +932,15 @@ section .su_vm_transformcounts data align=1
su_vm_transformcounts:
db 5
db 6
db 1
db 1
db 0
db 2
db 2
db 0
db 1
db 2
db 1
db 1
db 4
db 0
db 2
db 1
db 5
db 0
db 1
@ -913,55 +952,53 @@ su_vm_transformcounts:
section .su_patterns data align=1
su_patterns:
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,57,1,1,1,57,1,1,1
db 1,1,1,1,57,1,1,1,1,1,1,1,57,1,1,1
db 1,1,1,1,57,1,1,1,1,1,1,57,57,1,1,1
db 1,1,1,1,57,57,57,57,1,1,1,1,57,1,1,1
db 1,1,1,1,57,1,1,1,57,57,1,1,57,1,1,1
db 48,1,1,1,48,1,1,1,48,1,1,1,48,1,1,1
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,1,1,1,1,1,1,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,46,1,1,1,46,1
db 46,1,1,1,1,1,1,1,1,1,46,1,1,1,1,1
db 46,1,1,1,1,1,1,1,46,1,46,1,1,1,1,1
db 46,1,1,1,1,1,1,1,46,46,46,46,1,1,1,1
db 46,1,1,1,1,1,1,1,1,1,46,46,1,1,1,1
db 48,1,48,1,1,1,48,1,48,1,48,1,1,1,48,1
db 50,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 48,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 46,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,1,1,48,1,50,1,53,1
db 43,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,43,1,45,1,46,1,48,1
db 1,1,1,1,1,1,1,1,1,1,1,1,48,1,50,1
db 52,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 45,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
db 62,0,64,0,65,0,69,0,65,0,64,0,62,0,64,0
db 65,0,72,0,65,0,64,0,62,0,64,0,65,0,71,0
db 65,0,69,0,65,0,64,0,62,0,64,0,65,0,72,0
db 50,0,50,1,50,0,50,1,50,0,50,1,50,0,50,1
db 48,0,48,1,48,0,48,1,48,0,48,1,48,0,48,1
db 46,0,46,1,46,0,46,1,46,0,46,1,46,0,46,1
db 43,0,43,1,43,0,43,1,43,0,43,1,43,0,43,1
db 43,0,43,1,43,0,43,1,43,0,43,1,43,0,43,0
db 1,1,1,1,58,1,1,1,1,1,1,1,58,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 1,1,53,1,1,1,53,1,1,1,53,1,1,1,53,53
;-------------------------------------------------------------------------------
; Tracks
;-------------------------------------------------------------------------------
section .su_tracks data align=1
su_tracks:
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,2,2,2,4,2,2,2,2,2,2,2,5,2,2,2,3,2,2,2,4,2,2,2,2,2,2,2,5,6,6,7,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,9,10,9,9,9,11,9,9,9,10,9,9,9,12,9,9,9,10,9,9,9,11,9,9,9,10,9,9,9,12,6,6,7,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,6,6,7,0
db 14,6,15,6,16,17,18,19,16,20,21,22,14,6,6,23,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,0,0,0,0
db 24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,24,25,24,26,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,28,28,29,29,30,30,27,27,28,28,29,29,30,30,27,27,28,28,29,29,30,30,27,27,28,28,29,29,30,31,0,0,0,0
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
;-------------------------------------------------------------------------------
; Sample offsets
;-------------------------------------------------------------------------------
section .su_sample_offsets data align=1
su_sample_offsets:
dd 560606
dw 4276
dw 1
dd 641780
dw 2423
dw 1
dd 433554
dw 2615
dw 5676
dd 367477
dw 1343
dw 1
;-------------------------------------------------------------------------------
; Delay times
;-------------------------------------------------------------------------------
section .su_delay_times data align=1
su_delay_times:
dw 1116,1188,1276,1356,1422,1492,1556,1618,1140,1212,1300,1380,1446,1516,1580,1642,21381,12027
dw 1395,350,1744,1744,1116,1188,1276,1356,1422,1492,1556,1618,1140,1212,1300,1380,1446,1516,1580,1642
;-------------------------------------------------------------------------------
@ -969,14 +1006,14 @@ su_delay_times:
;-------------------------------------------------------------------------------
section .su_patch_opcodes data align=1
su_patch_opcodes:
db 2,4,6,8,10,2,12,10,14,14,16,14,14,14,14,14,6,8,18,20,22,20,22,25,2,26,2,26,2,26,0,2,26,4,6,8,10,2,12,14,14,10,16,14,14,14,14,18,25,2,2,10,26,0,2,12,10,14,14,14,18,25,0,5,5,17,5,17,15,14,22,14,7,15,3,11,25,4,26,4,26,26,4,26,4,26,4,26,0,2,4,4,16,10,18,20,22,20,25,0,2,26,26,2,4,4,16,10,14,14,18,7,29,11,25,0,31,21,33,0
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
;-------------------------------------------------------------------------------
; The parameters / inputs to each opcode
;-------------------------------------------------------------------------------
section .su_patch_operands data align=1
su_patch_operands:
db 22,64,0,0,38,77,64,19,128,66,70,64,78,128,0,68,0,0,70,2,128,97,128,68,108,128,68,100,128,68,19,98,16,15,128,80,40,74,80,23,42,16,97,128,59,27,128,112,0,0,15,27,128,112,0,8,15,128,0,38,49,0,0,128,70,40,0,47,54,0,0,128,19,152,0,54,68,70,0,128,26,200,0,39,71,0,0,128,7,0,149,88,64,42,115,114,54,33,58,100,28,45,0,0,128,84,102,93,63,68,75,87,64,11,66,68,53,128,80,7,76,16,13,54,16,64,128,0,71,128,74,0,128,49,71,121,0,128,0,56,0,4,53,0,0,128,102,128,87,128,16,95,128,80,89,71,32,61,45,0,64,87,64,128,65,128,34,64,60,87,128,64,128,35,64,69,0,128,106,128,66,62,91,64,103,26,88,85,31,88,96,12,128,88,25,59,106,60,64,29,21,64,64,4,128,64,128,40,52,25,0,41,42,55,54,63,128,72,75,33,0,59,43,0,74,64,0,128,64,128,72,69,73,0,40,64,0,128,64,128,72,71,120,0,40,64,0,128,64,128,72,86,152,0,39,62,0,30,71,88,62,14,53,27,72,64,88,66,64,113,64,128,64,64,71,128,86,0,16,1,73,128,90,0,17,1,84,52,39,81,0,0,128,87,144,0,90,107,0,33,57,67,57,128,76,64,0,98,64,101,64,64,48,85,78,97,64,35,39,82,64,15,128,68,64,80,48,56,87,46,54,85,35,2,50,128,114,77,0,15,128
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
;-------------------------------------------------------------------------------
; Constants
@ -986,8 +1023,8 @@ FCONST_32767_0 dd 0x46fffe00
FCONST_0_00781250 dd 0x3c000000
FCONST_0_500000 dd 0x3f000000
FCONST_0_99609375 dd 0x3f7f0000
FCONST_3_80000em05 dd 0x381f6230
FCONST_9_269614em05 dd 0x38c265dc
FCONST_84_28075 dd 0x42a88fbe
ICONST_2147483648 dd 0x80000000
ICONST_1034594986 dd 0x3daaaaaa
ICONST_24 dd 0x18

View File

@ -3,14 +3,14 @@
#define SU_RENDER_H
#define SU_CHANNEL_COUNT 2
#define SU_LENGTH_IN_SAMPLES 3335488
#define SU_LENGTH_IN_SAMPLES 1550944
#define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
#define SU_SAMPLE_RATE 44100
#define SU_BPM 165
#define SU_BPM 116
#define SU_ROWS_PER_BEAT 4
#define SU_ROWS_PER_PATTERN 16
#define SU_LENGTH_IN_PATTERNS 52
#define SU_LENGTH_IN_PATTERNS 17
#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))
@ -34,6 +34,8 @@ typedef short SUsample;
extern "C" {
#endif
void SU_CALLCONV su_render_song(SUsample *buffer);
void SU_CALLCONV su_load_gmdls();
#define SU_LOAD_GMDLS
#ifdef __cplusplus

View File

@ -3,14 +3,14 @@
%define PLAYER_INC
%define SU_CHANNEL_COUNT 2
%define SU_LENGTH_IN_SAMPLES 3335488
%define SU_LENGTH_IN_SAMPLES 1550944
%define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
%define SU_SAMPLE_RATE 44100
%define SU_BPM 165
%define SU_BPM 116
%define SU_ROWS_PER_BEAT 4
%define SU_ROWS_PER_PATTERN 16
%define SU_LENGTH_IN_PATTERNS 52
%define SU_LENGTH_IN_PATTERNS 17
%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
@ -23,5 +23,7 @@ _su_symbols:
%else ; MANGLED
extern su_render_song
%endif ; MANGLED
extern _su_load_gmdls
%define SU_LOAD_GMDLS
%endif ; PLAYER_INC

View File

@ -1,156 +1,53 @@
bpm: 165
bpm: 116
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, -1, -1, 5, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 57, 57, 1, 1, 1], [1, 1, 1, 1, 57, 57, 57, 57, 1, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 57, 57, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
order: [-1, -1, -1, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 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, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, -1, -1, 5, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 1, 1, 1, 46, 1], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 1, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 46, 1, 46, 1, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 46, 46, 46, 46, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 46, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -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, -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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1, -1]
patterns: [[48, 1, 48, 1, 1, 1, 48, 1, 48, 1, 48, 1, 1, 1, 48, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
order: [-1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1]
patterns: [[1, 1, 1, 1, 72, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1]]
- numvoices: 1
order: [0, -1, 1, -1, 2, 3, 4, 5, 2, 6, 7, 8, 0, -1, -1, 9, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [46, 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, 48, 1, 50, 1, 53, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 43, 1, 45, 1, 46, 1, 48, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 1, 50, 1], [52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 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]]
- 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]]
- numvoices: 1
order: [0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, -1, -1, -1, -1]
patterns: [[62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0], [65, 0, 72, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 71, 0], [65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 4, -1, -1, -1, -1]
patterns: [[50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50, 1], [48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48, 1], [46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46, 1], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 0]]
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]]
rowsperpattern: 16
length: 52
length: 17
patch:
- name: snare
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 22, decay: 64, gain: 38, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 128, detune: 64, gain: 70, lfo: 0, phase: 19, shape: 66, stereo: 0, transpose: 77, type: 0}
- type: distort
id: 3
parameters: {drive: 78, stereo: 0}
- type: hold
id: 4
parameters: {damp: 0, dry: 128, feedback: 96, holdfreq: 128, notetracking: 2, pregain: 40, stereo: 0}
- type: mulp
id: 5
parameters: {panning: 64, stereo: 0}
- type: envelope
id: 6
parameters: {attack: 0, auxgain: 64, decay: 68, gain: 70, outgain: 64, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 81
parameters: {gain: 128, shape: 2, stereo: 0}
- type: mulp
id: 82
parameters: {stereo: 0}
- type: filter
id: 83
parameters: {bandpass: 0, frequency: 97, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: filter
id: 84
parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: addp
id: 85
parameters: {stereo: 0}
- type: filter
id: 86
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: filter
id: 87
parameters: {bandpass: 0, frequency: 19, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 98, stereo: 0}
- type: filter
id: 88
parameters: {bandpass: 0, frequency: 15, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 89
parameters: {bandpass: 0, frequency: 40, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 74, stereo: 0}
- type: filter
id: 90
parameters: {bandpass: 0, frequency: 23, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 42, stereo: 0}
- type: distort
id: 91
parameters: {drive: 97, stereo: 0}
- type: hold
id: 92
parameters: {holdfreq: 128, stereo: 0}
- type: pan
id: 93
parameters: {panning: 59, stereo: 0}
- type: delay
id: 94
parameters: {damp: 0, dry: 128, feedback: 112, notetracking: 0, pregain: 27, stereo: 0}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618]
- type: xch
id: 95
parameters: {stereo: 0}
- type: delay
id: 96
parameters: {damp: 0, dry: 128, feedback: 112, notetracking: 0, pregain: 27, stereo: 0}
varargs: [1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: xch
id: 97
parameters: {stereo: 0}
- type: outaux
id: 98
parameters: {auxgain: 0, outgain: 128, stereo: 1}
- type: envelope
id: 99
parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 100
parameters: {amount: 70, port: 0, sendpop: 1, target: 2}
- type: envelope
id: 101
parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 102
parameters: {amount: 19, port: 0, sendpop: 1, target: 83}
- type: envelope
id: 103
parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70}
- type: send
id: 104
parameters: {amount: 26, port: 0, sendpop: 1, target: 86}
- name: kick
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 39, channel: 2, decay: 71, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 205
parameters: {amount: 7, damp: 64, dry: 128, feedback: 125, notetracking: 0, port: 0, pregain: 40, sendpop: 0, stereo: 0, target: 184, unit: 0, voice: 0}
parameters: {attack: 18, channel: 2, decay: 65, gain: 60, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 106
parameters: {color: 115, detune: 64, gain: 54, lfo: 0, phase: 42, shape: 114, stereo: 0, transpose: 88, type: 1, unison: 1}
- type: distort
id: 107
parameters: {drive: 58, stereo: 0}
- type: hold
id: 108
parameters: {holdfreq: 100, stereo: 0}
parameters: {color: 128, detune: 57, gain: 79, lfo: 0, phase: 0, shape: 63, stereo: 0, transpose: 94, type: 0, unison: 2}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 28, decay: 45, gain: 128, release: 0, stereo: 0, sustain: 0}
parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 102, shape: 84, stereo: 0}
parameters: {gain: 81, shape: 67, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 93, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 63, stereo: 0}
parameters: {bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 35, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 75, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 87, stereo: 0}
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 62, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
@ -159,222 +56,236 @@ patch:
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 66, stereo: 0}
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}
- type: filter
id: 14
parameters: {bandpass: 0, frequency: 7, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 76, stereo: 0}
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: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0}
parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 49, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 128, stereo: 1}
parameters: {auxgain: 0, outgain: 57, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 71, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 74}
parameters: {attack: 62, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: envelope
id: 120
parameters: {attack: 49, decay: 71, gain: 128, release: 0, stereo: 0, sustain: 121}
parameters: {attack: 39, decay: 61, gain: 128, release: 0, stereo: 0, sustain: 34}
- type: mulp
id: 121
parameters: {stereo: 0}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- name: snare edm 2 (sample)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 0, decay: 76, gain: 96, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, detune: 116, gain: 37, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 114, stereo: 0, transpose: 86, type: 4, unison: 2}
- type: distort
parameters: {drive: 95, stereo: 0}
- type: mulp
parameters: {panning: 64, stereo: 0}
- type: envelope
parameters: {attack: 0, auxgain: 64, decay: 68, gain: 83, outgain: 64, release: 0, stereo: 0, sustain: 0}
- type: noise
parameters: {gain: 107, shape: 3, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 67, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 78, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 71, stereo: 0}
- type: outaux
parameters: {auxgain: 10, outgain: 84, stereo: 1}
- type: envelope
parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
parameters: {amount: 19, port: 0, sendpop: 1, target: 201}
- type: envelope
parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70}
- type: send
parameters: {amount: 26, port: 0, sendpop: 1, target: 202}
- name: clap
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 53, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: delay
id: 162
parameters: {damp: 0, dry: 128, feedback: 0, notetracking: 0, pregain: 64, stereo: 0}
varargs: [1395, 350]
- type: noise
id: 3
parameters: {gain: 0, shape: 97, stereo: 0}
- type: mulp
id: 4
parameters: {stereo: 0}
- type: envelope
id: 163
parameters: {attack: 0, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: delay
id: 164
parameters: {damp: 0, dry: 6, feedback: 0, notetracking: 0, pregain: 64, stereo: 0}
varargs: [1744, 1744]
- type: noise
id: 165
parameters: {gain: 128, shape: 79, stereo: 0}
- type: mulp
id: 171
parameters: {stereo: 0}
- type: addp
id: 235
parameters: {stereo: 0}
- type: envelope
id: 233
parameters: {attack: 0, decay: 62, gain: 42, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 234
parameters: {color: 64, detune: 64, gain: 125, looplength: 1, loopstart: 2423, phase: 0, samplestart: 641780, shape: 64, stereo: 0, transpose: 64, type: 4}
- type: mulp
id: 236
parameters: {stereo: 0}
- type: addp
id: 173
parameters: {stereo: 0}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 76, stereo: 0}
- type: distort
parameters: {drive: 114, stereo: 0}
- type: pan
id: 174
parameters: {panning: 70, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 12, outgain: 50, stereo: 1}
- name: House Bass Organ
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}
- 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}
- type: mulp
id: 223
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}
- type: pan
id: 211
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}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 90, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 21, decay: 78, gain: 64, release: 85, stereo: 1, sustain: 0}
- type: mulp
id: 232
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}
- 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}
- type: outaux
id: 6
parameters: {auxgain: 78, outgain: 49, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 128
parameters: {attack: 4, decay: 53, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 129
parameters: {gain: 128, shape: 102, stereo: 0}
id: 1
parameters: {attack: 50, decay: 60, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 127, looplength: 1, loopstart: 1343, phase: 0, samplestart: 367477, shape: 64, stereo: 1, transpose: 82, type: 4}
- type: mulp
id: 130
parameters: {stereo: 0}
id: 239
parameters: {stereo: 1}
- type: filter
id: 131
parameters: {bandpass: 0, frequency: 87, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
parameters: {bandpass: 0, frequency: 78, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 132
parameters: {bandpass: 0, frequency: 95, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 133
parameters: {bandpass: 1, frequency: 89, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 71, stereo: 0}
id: 240
parameters: {bandpass: 0, frequency: 109, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: pan
id: 134
parameters: {panning: 61, stereo: 0}
id: 7
parameters: {panning: 57, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 45, stereo: 1}
- name: ba_reese
numvoices: 1
units:
- type: oscillator
id: 159
parameters: {color: 128, detune: 87, gain: 128, lfo: 0, phase: 64, shape: 65, stereo: 1, transpose: 64, type: 1, unison: 2}
- type: oscillator
id: 160
parameters: {color: 128, detune: 60, gain: 128, lfo: 0, phase: 87, shape: 64, stereo: 1, transpose: 64, type: 1, unison: 3}
- type: addp
id: 162
parameters: {stereo: 1}
- type: oscillator
id: 161
parameters: {color: 128, detune: 69, gain: 128, lfo: 0, phase: 0, shape: 106, stereo: 1, transpose: 64, type: 0, unison: 2}
- type: addp
id: 16
parameters: {stereo: 1}
- type: filter
id: 17
parameters: {bandpass: 0, frequency: 62, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 91, stereo: 1}
- type: filter
id: 190
parameters: {bandpass: 0, frequency: 103, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 26, stereo: 0}
- type: xch
id: 195
parameters: {stereo: 0}
- type: filter
id: 196
parameters: {bandpass: 0, frequency: 85, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 31, stereo: 0}
- type: distort
id: 193
parameters: {drive: 96, stereo: 1}
- type: filter
id: 194
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 1}
- type: envelope
id: 189
parameters: {attack: 25, decay: 59, gain: 64, release: 60, stereo: 1, sustain: 106}
- type: mulp
id: 206
parameters: {stereo: 1}
- type: outaux
id: 21
parameters: {auxgain: 21, outgain: 29, stereo: 1}
- type: oscillator
id: 149
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 4, shape: 64, stereo: 0, transpose: 64, type: 1}
- type: send
id: 150
parameters: {amount: 52, port: 1, sendpop: 1, stereo: 0, target: 159}
- type: oscillator
id: 152
parameters: {color: 54, detune: 42, gain: 128, lfo: 1, phase: 55, shape: 63, stereo: 0, transpose: 41, type: 0}
- type: send
id: 153
parameters: {amount: 75, port: 1, sendpop: 0, stereo: 0, target: 160}
- type: send
id: 154
parameters: {amount: 59, port: 3, sendpop: 1, stereo: 0, target: 160}
- type: oscillator
id: 156
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 74, type: 0}
- type: send
id: 157
parameters: {amount: 69, port: 1, sendpop: 1, stereo: 0, target: 161}
- type: oscillator
id: 191
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 40, type: 0, unison: 0}
- type: send
id: 192
parameters: {amount: 71, port: 0, sendpop: 1, stereo: 0, target: 190, unit: 0, voice: 0}
- type: oscillator
id: 197
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 40, type: 0}
- type: send
id: 198
parameters: {amount: 86, port: 0, sendpop: 1, stereo: 0, target: 196, unit: 0, voice: 0}
- name: ky_sine
numvoices: 1
units:
- type: envelope
id: 163
parameters: {attack: 39, decay: 62, gain: 71, release: 30, stereo: 0, sustain: 0}
- type: oscillator
id: 164
parameters: {color: 53, detune: 62, gain: 72, lfo: 0, phase: 14, shape: 27, stereo: 0, transpose: 88, type: 0}
- type: oscillator
id: 165
parameters: {color: 113, detune: 66, gain: 128, lfo: 0, phase: 64, shape: 64, stereo: 0, transpose: 88, type: 0}
- type: addp
id: 166
parameters: {stereo: 0}
- type: mulp
id: 167
parameters: {stereo: 0}
- type: pan
id: 168
parameters: {panning: 64, stereo: 0}
- type: delay
id: 169
parameters: {damp: 0, dry: 128, feedback: 86, notetracking: 2, pregain: 71, stereo: 0}
varargs: [64]
- type: xch
id: 170
parameters: {stereo: 0}
- type: delay
id: 171
parameters: {damp: 0, dry: 128, feedback: 90, notetracking: 2, pregain: 73, stereo: 0}
varargs: [36]
- type: outaux
id: 172
parameters: {auxgain: 52, outgain: 84, stereo: 1}
- name: ba_trana
numvoices: 1
units:
- type: envelope
id: 173
parameters: {attack: 39, decay: 81, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 174
parameters: {amount: 87, port: 0, sendpop: 0, target: 181}
- type: send
id: 175
parameters: {amount: 90, port: 3, sendpop: 1, target: 179}
- type: envelope
id: 176
parameters: {attack: 33, decay: 57, gain: 128, release: 57, stereo: 0, sustain: 67}
- type: oscillator
id: 177
parameters: {color: 98, detune: 64, gain: 101, lfo: 0, phase: 0, shape: 64, stereo: 0, transpose: 76, type: 0, unison: 0}
- type: oscillator
id: 179
parameters: {color: 78, detune: 48, gain: 64, lfo: 0, phase: 85, shape: 97, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: addp
id: 178
parameters: {stereo: 0}
- type: mulp
id: 185
parameters: {stereo: 0}
- type: filter
id: 181
parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 82, stereo: 0}
- type: filter
id: 182
parameters: {bandpass: 0, frequency: 15, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 183
parameters: {panning: 64, stereo: 0}
- type: distort
id: 200
parameters: {drive: 80, stereo: 1}
- type: compressor
id: 186
parameters: {attack: 48, invgain: 87, ratio: 54, release: 56, stereo: 1, threshold: 46}
- type: mulp
id: 187
parameters: {stereo: 1}
- type: outaux
id: 184
parameters: {auxgain: 35, outgain: 85, stereo: 1}
parameters: {auxgain: 0, outgain: 84, stereo: 1}
- name: Global
numvoices: 1
units:
@ -383,7 +294,7 @@ patch:
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 77, dry: 128, feedback: 114, notetracking: 0, pregain: 50, stereo: 1}
parameters: {damp: 42, dry: 128, feedback: 120, notetracking: 0, pregain: 40, stereo: 1}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618, 1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: out
id: 9

301
4klang_st.yml Normal file
View File

@ -0,0 +1,301 @@
bpm: 116
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [-1, -1, -1, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 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]
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]
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]]
- 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]]
- 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]]
rowsperpattern: 16
length: 17
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 18, channel: 2, decay: 65, gain: 60, 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}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 81, shape: 67, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 35, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 62, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
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}
- 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}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 57, 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}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- name: snare edm 2 (sample)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 0, decay: 76, gain: 96, release: 0, stereo: 1, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, detune: 116, gain: 37, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 114, stereo: 1, transpose: 86, type: 4, unison: 2}
- type: distort
parameters: {drive: 95, stereo: 1}
- type: mulp
parameters: {panning: 64, stereo: 1}
- type: envelope
parameters: {attack: 0, auxgain: 64, decay: 68, gain: 83, outgain: 64, release: 0, stereo: 1, sustain: 0}
- type: noise
parameters: {gain: 107, shape: 3, stereo: 1}
- type: mulp
parameters: {stereo: 1}
- type: filter
id: 201
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 67, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 78, stereo: 1}
- type: addp
parameters: {stereo: 1}
- type: pan
parameters: {panning: 64, stereo: 1}
- type: outaux
parameters: {auxgain: 0, outgain: 78, stereo: 1}
- type: envelope
parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
parameters: {amount: 19, port: 0, sendpop: 1, target: 201}
- type: envelope
parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70}
- type: send
parameters: {amount: 26, port: 0, sendpop: 1, target: 202}
- name: clap
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 53, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: delay
id: 162
parameters: {damp: 0, dry: 128, feedback: 0, notetracking: 0, pregain: 64, stereo: 0}
varargs: [1395, 350]
- type: noise
id: 3
parameters: {gain: 0, shape: 97, stereo: 0}
- type: mulp
id: 4
parameters: {stereo: 0}
- type: envelope
id: 163
parameters: {attack: 0, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: delay
id: 164
parameters: {damp: 0, dry: 6, feedback: 0, notetracking: 0, pregain: 64, stereo: 0}
varargs: [1744, 1744]
- type: noise
id: 165
parameters: {gain: 128, shape: 79, stereo: 0}
- type: mulp
id: 171
parameters: {stereo: 0}
- type: addp
id: 235
parameters: {stereo: 0}
- type: envelope
id: 233
parameters: {attack: 0, decay: 62, gain: 42, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 234
parameters: {color: 64, detune: 64, gain: 125, looplength: 1, loopstart: 2423, phase: 0, samplestart: 641780, shape: 64, stereo: 0, transpose: 64, type: 4}
- type: mulp
id: 236
parameters: {stereo: 0}
- type: addp
id: 173
parameters: {stereo: 0}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 76, stereo: 0}
- type: distort
parameters: {drive: 114, stereo: 0}
- type: pan
id: 174
parameters: {panning: 70, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 12, outgain: 50, stereo: 1}
- name: House Bass Organ
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}
- 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}
- type: mulp
id: 223
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}
- type: pan
id: 211
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}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 90, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 21, decay: 78, gain: 64, release: 85, stereo: 1, sustain: 0}
- type: mulp
id: 232
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}
- 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}
- type: outaux
id: 6
parameters: {auxgain: 78, outgain: 49, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 50, decay: 60, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 127, looplength: 1, loopstart: 1343, phase: 0, samplestart: 367477, shape: 64, stereo: 1, transpose: 82, type: 4}
- type: mulp
id: 239
parameters: {stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 78, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 240
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}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 84, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 42, dry: 128, feedback: 120, notetracking: 0, pregain: 40, stereo: 1}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618, 1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: out
id: 9
parameters: {gain: 128, stereo: 1}

View File

@ -3,23 +3,23 @@ rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, -1, -1, 5]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 57], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 57], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 57, 57], [1, 1, 1, 1, 57, 57, 57, 57, 1, 1, 1, 1, 57], [1, 1, 1, 1, 57, 1, 1, 1, 57, 57, 1, 1, 57], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, -1, -1, 5, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 57, 57, 1, 1, 1], [1, 1, 1, 1, 57, 57, 57, 57, 1, 1, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 57, 1, 1, 1, 57, 57, 1, 1, 57, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, -1, -1, 5]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 1, 1, 1, 46], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46], [46, 1, 1, 1, 1, 1, 1, 1, 46, 1, 46], [46, 1, 1, 1, 1, 1, 1, 1, 46, 46, 46, 46], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 46], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, -1, -1, 5, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 1, 1, 1, 46, 1], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 1, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 46, 1, 46, 1, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 46, 46, 46, 46, 1, 1, 1, 1], [46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 46, 46, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
- numvoices: 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1]
patterns: [[48, 1, 48, 1, 1, 1, 48, 1, 48, 1, 48, 1, 1, 1, 48], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]]
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1, -1]
patterns: [[48, 1, 48, 1, 1, 1, 48, 1, 48, 1, 48, 1, 1, 1, 48, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [0, -1, 1, -1, 2, 3, 4, 5, 2, 6, 7, 8, 0, -1, -1, 9]
patterns: [[50], [48], [46], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 1, 50, 1, 53], [43], [1, 1, 1, 1, 1, 1, 1, 1, 43, 1, 45, 1, 46, 1, 48], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 1, 50], [52], [45], [1, 1, 1, 1, 1, 1, 1, 1, 0]]
order: [0, -1, 1, -1, 2, 3, 4, 5, 2, 6, 7, 8, 0, -1, -1, 9, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [46, 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, 48, 1, 50, 1, 53, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 43, 1, 45, 1, 46, 1, 48, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 1, 50, 1], [52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2]
order: [0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, -1, -1, -1, -1]
patterns: [[62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0], [65, 0, 72, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 71, 0], [65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 4]
patterns: [[50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50], [48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48], [46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 0]]
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 4, -1, -1, -1, -1]
patterns: [[50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50, 1, 50, 0, 50, 1], [48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48, 1, 48, 0, 48, 1], [46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46, 1, 46, 0, 46, 1], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1], [43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 1, 43, 0, 43, 0]]
rowsperpattern: 16
length: 52
patch:
@ -172,17 +172,6 @@ patch:
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: delay
id: 115
parameters: {damp: 128, dry: 128, feedback: 20, notetracking: 0, pregain: 21, stereo: 0}
varargs: [1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: xch
id: 116
parameters: {stereo: 0}
- type: delay
id: 117
parameters: {damp: 128, dry: 128, feedback: 20, notetracking: 0, pregain: 20, stereo: 0}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618]
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 128, stereo: 1}
@ -222,23 +211,54 @@ patch:
- type: pan
id: 134
parameters: {panning: 61, stereo: 0}
- type: delay
id: 135
parameters: {damp: 29, dry: 128, feedback: 50, notetracking: 0, pregain: 28, stereo: 0}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618]
- type: xch
id: 136
parameters: {stereo: 0}
- type: delay
id: 137
parameters: {damp: 0, dry: 128, feedback: 40, notetracking: 0, pregain: 32, stereo: 0}
varargs: [1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 45, stereo: 1}
- name: ba_reese
numvoices: 1
units:
- type: oscillator
id: 159
parameters: {color: 128, detune: 87, gain: 128, lfo: 0, phase: 64, shape: 65, stereo: 1, transpose: 64, type: 1, unison: 2}
- type: oscillator
id: 160
parameters: {color: 128, detune: 60, gain: 128, lfo: 0, phase: 87, shape: 64, stereo: 1, transpose: 64, type: 1, unison: 3}
- type: addp
id: 162
parameters: {stereo: 1}
- type: oscillator
id: 161
parameters: {color: 128, detune: 69, gain: 128, lfo: 0, phase: 0, shape: 106, stereo: 1, transpose: 64, type: 0, unison: 2}
- type: addp
id: 16
parameters: {stereo: 1}
- type: filter
id: 17
parameters: {bandpass: 0, frequency: 62, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 91, stereo: 1}
- type: filter
id: 190
parameters: {bandpass: 0, frequency: 103, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 26, stereo: 0}
- type: xch
id: 195
parameters: {stereo: 0}
- type: filter
id: 196
parameters: {bandpass: 0, frequency: 85, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 31, stereo: 0}
- type: distort
id: 193
parameters: {drive: 96, stereo: 1}
- type: filter
id: 194
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 1}
- type: envelope
id: 189
parameters: {attack: 25, decay: 59, gain: 64, release: 60, stereo: 1, sustain: 106}
- type: mulp
id: 206
parameters: {stereo: 1}
- type: outaux
id: 21
parameters: {auxgain: 21, outgain: 29, stereo: 1}
- type: oscillator
id: 149
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 4, shape: 64, stereo: 0, transpose: 64, type: 1}
@ -260,48 +280,6 @@ patch:
- type: send
id: 157
parameters: {amount: 69, port: 1, sendpop: 1, stereo: 0, target: 161}
- type: envelope
id: 189
parameters: {attack: 22, decay: 54, gain: 64, release: 64, stereo: 1, sustain: 64}
- type: oscillator
id: 159
parameters: {color: 128, detune: 87, gain: 128, lfo: 0, phase: 64, shape: 65, stereo: 1, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 160
parameters: {color: 128, detune: 60, gain: 128, lfo: 0, phase: 87, shape: 64, stereo: 1, transpose: 64, type: 1, unison: 2}
- type: oscillator
id: 161
parameters: {color: 128, detune: 69, gain: 128, lfo: 0, phase: 0, shape: 106, stereo: 1, transpose: 64, type: 0, unison: 2}
- type: addp
id: 162
parameters: {stereo: 1}
- type: addp
id: 16
parameters: {stereo: 1}
- type: filter
id: 17
parameters: {bandpass: 0, frequency: 62, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 91, stereo: 1}
- type: filter
id: 190
parameters: {bandpass: 0, frequency: 93, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 74, stereo: 1}
- type: xch
id: 195
parameters: {stereo: 1}
- type: filter
id: 196
parameters: {bandpass: 0, frequency: 94, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 78, stereo: 1}
- type: mulp
id: 19
parameters: {stereo: 1}
- type: distort
id: 193
parameters: {drive: 96, stereo: 1}
- type: filter
id: 194
parameters: {bandpass: 0, frequency: 10, highpass: 1, lowpass: 1, negbandpass: 1, neghighpass: 0, resonance: 128, stereo: 1}
- type: outaux
id: 21
parameters: {auxgain: 21, outgain: 29, stereo: 1}
- type: oscillator
id: 191
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 40, type: 0, unison: 0}

View File

@ -43,11 +43,11 @@ USE_WIDECHAR_TEXTS=1
########### Time base ###########
USE_TIME_DIVIDER_IN_X86_CODE=1
TIME_DIVIDER=64145.453
TIME_DIVIDER=91241.383
TIME_BASE=bars
AUDIO_DELAY=2048
PROD_END_TIME=3337536
PROD_END_TIME=1552992
########### Final product ###########
@ -59,11 +59,11 @@ EXE_LINKER_PROGRAM=GNU ld
QUOTE=\"
CRINKLER_ORDERTRIES=400
CRINKLER_ORDERTRIES=4000
AUDIO_BUFFER_ALLOCATED_LENGTH=3337536
AUDIO_BUFFER_ALLOCATED_LENGTH=1552992
AUDIO_SAMPLING_RATE=44100
LOOP_END=5.0
LOOP_START=3.0
LOOP_ENABLED=0
TIME_DIVIDER_INT=64145
TIME_DIVIDER_INT=91241

View File

@ -132,6 +132,7 @@ section .text
; the __imp__ versions refer to the corresponding import address table entries
; 4klang
extern _su_render_song@4
; General Windows stuff
@ -179,10 +180,12 @@ SetRenderedAudioBufferPtr:
export StartAudioRendererThread
global _StartAudioRendererThread
_StartAudioRendererThread
StartAudioRendererThread:
StartAudioRendererThread:
push 0
push 0
push dword [rendered_audio_buffer_ptr]
extern _su_load_gmdls@0
call _su_load_gmdls@0
push _su_render_song@4
push 0
push 0

View File

@ -389,6 +389,8 @@ main:
push 0
push 0
push rendered_audio_data + (AUDIO_DELAY * 4)
extern _su_load_gmdls@0
call _su_load_gmdls@0
push _su_render_song@4
push 0
push 0

View File

@ -7,11 +7,11 @@ include $(PARENT_CONFIG)
# Visuals
EXE_LINKER_PROGRAM=GNU ld
EXE_LINKER_PROGRAM=Crinkler
CRINKLER_ORDERTRIES=4000
SHADER_FILE=shader_minified.h
TIME_UNIFORM_NAME='n'
RESOLUTION_UNIFORM_NAME='r'
TIME_UNIFORM_NAME='f'
RESOLUTION_UNIFORM_NAME='v'
TEXTS_UNIFORM_NAME='k'
USE_WIDECHAR_TEXTS=1
TIME_DIVIDER=44100.000

BIN
music/4k_house.xrns Normal file

Binary file not shown.

Binary file not shown.

286
music/sointu_house.yml Normal file
View File

@ -0,0 +1,286 @@
bpm: 100
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [0]
patterns: [[72, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72]]
rowsperpattern: 16
length: 1
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 18, channel: 2, decay: 65, gain: 60, 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}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 0, decay: 43, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 81, shape: 67, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 35, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 62, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
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}
- 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}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 57, 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}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- name: snare edm 2 (sample)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 0, decay: 76, gain: 96, release: 0, stereo: 1, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, detune: 116, gain: 37, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 114, stereo: 1, transpose: 86, type: 4, unison: 2}
- type: distort
parameters: {drive: 95, stereo: 1}
- type: mulp
parameters: {panning: 64, stereo: 1}
- type: envelope
parameters: {attack: 0, auxgain: 64, decay: 68, gain: 83, outgain: 64, release: 0, stereo: 1, sustain: 0}
- type: noise
parameters: {gain: 107, shape: 3, stereo: 1}
- type: mulp
parameters: {stereo: 1}
- type: filter
id: 201
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 67, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 78, stereo: 1}
- type: addp
parameters: {stereo: 1}
- type: pan
parameters: {panning: 64, stereo: 1}
- type: outaux
parameters: {auxgain: 0, outgain: 78, stereo: 1}
- type: envelope
parameters: {attack: 47, decay: 54, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
parameters: {amount: 19, port: 0, sendpop: 1, target: 201}
- type: envelope
parameters: {attack: 54, decay: 68, gain: 128, release: 0, stereo: 0, sustain: 70}
- type: send
parameters: {amount: 26, port: 0, sendpop: 1, target: 202}
- name: clap
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 53, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: delay
id: 162
parameters: {damp: 0, dry: 128, feedback: 0, notetracking: 0, pregain: 64, stereo: 1}
varargs: [1395, 350]
- type: noise
id: 3
parameters: {gain: 0, shape: 97, stereo: 1}
- type: mulp
id: 4
parameters: {stereo: 1}
- type: envelope
id: 163
parameters: {attack: 0, decay: 54, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: delay
id: 164
parameters: {damp: 0, dry: 6, feedback: 0, notetracking: 0, pregain: 64, stereo: 1}
varargs: [1744, 1744]
- type: noise
id: 165
parameters: {gain: 128, shape: 79, stereo: 1}
- type: mulp
id: 171
parameters: {stereo: 1}
- type: addp
id: 235
parameters: {stereo: 1}
- type: envelope
id: 233
parameters: {attack: 0, decay: 62, gain: 42, release: 0, stereo: 1, sustain: 0}
- type: oscillator
id: 234
parameters: {color: 64, detune: 64, gain: 125, looplength: 1, loopstart: 2423, phase: 0, samplestart: 641780, shape: 64, stereo: 1, transpose: 64, type: 4}
- type: mulp
id: 236
parameters: {stereo: 1}
- type: addp
id: 173
parameters: {stereo: 1}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 39, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 76, stereo: 1}
- type: distort
parameters: {drive: 114, stereo: 1}
- type: pan
id: 174
parameters: {panning: 80, stereo: 1}
- type: outaux
id: 161
parameters: {auxgain: 12, outgain: 50, stereo: 1}
- name: House Bass Organ
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}
- 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}
- type: mulp
id: 223
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}
- type: pan
id: 211
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}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 90, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 21, decay: 78, gain: 64, release: 85, stereo: 1, sustain: 0}
- type: mulp
id: 232
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}
- 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}
- type: outaux
id: 6
parameters: {auxgain: 78, outgain: 49, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 50, decay: 60, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 127, looplength: 1, loopstart: 1343, phase: 0, samplestart: 367477, shape: 64, stereo: 1, transpose: 82, type: 4}
- type: mulp
id: 239
parameters: {stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 78, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 240
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}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 84, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 42, dry: 128, feedback: 120, notetracking: 0, pregain: 40, stereo: 1}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618, 1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: out
id: 9
parameters: {gain: 128, stereo: 1}

View File

@ -9,6 +9,12 @@ struct Ray {
vec3 dir;
};
vec2 getUV(vec2 offset) {
vec2 uv = 2.0 *((gl_FragCoord.xy + offset*0.5)/u_resolution.xy - 0.5);
uv.x *= u_resolution.x/u_resolution.y; // Correct for aspect ratio
return uv;
}
mat2 scale(vec2 scale){
return mat2(1. / scale.x, 0.0, 0.0, 1./scale.y);
}
@ -617,8 +623,20 @@ float sdCog2d(vec2 pos) {
float sdCog(vec3 pos, float angle) {
pos.xy *= Rot(angle);
float d1 = opExtrusion(pos, sdCog2d(pos.xy), 0.05);
float d2 = fCapsule(pos, vec3(0., 0.0, 0.), vec3(0., 0., 1.), 0.2);
return 0.8 * fOpDifferenceRound(d1,d2,0.05)-0.003;}
float d2 = fCapsule(pos, vec3(0., 0.0, 0.), vec3(0., 0., 1.), 0.2);
return 0.8 * fOpDifferenceRound(d1,d2,0.05)-0.003;
}
float sdText(vec3 pos, float angle) {
//pos.xy *= Rot(angle);
vec3 color = texture2D(texts, getUV(vec2( 0.,0.))).rgb;
//gl_FragColor = vec4(vec3(color), 1.);
//float d1 = opExtrusion(pos, , 0.1);
return 0.;
// return d1;
}
float sdHex(vec3 pos, float i, float angle) {
@ -655,10 +673,11 @@ vec2 mapScene(in vec3 p) {
if (d == a) mat = 1. + mod(i,3.);
}
/*float c2 = sdCog(p, u_time);
d = min(d, c2);
if ( d == c2) mat = 4.;
*/
//float c2 = sdText(p, u_time);
//d = min(d, c2);
//if ( d == c2) mat = 4.;
// float c3 = fBox(p+vec3(0.5, .87, 0.), vec3(1., 1.,1.));
// d = min(d, c3);
@ -963,11 +982,7 @@ vec3 render(vec2 uv) {
return col;
}
vec2 getUV(vec2 offset) {
vec2 uv = 2.0 *((gl_FragCoord.xy + offset*0.5)/u_resolution.xy - 0.5);
uv.x *= u_resolution.x/u_resolution.y; // Correct for aspect ratio
return uv;
}
void main()
{

View File

@ -1,18 +1,228 @@
// Generated with Shader Minifier 1.3.6 (https://github.com/laurentlb/Shader_Minifier/)
#ifndef SHADER_MINIFIED_H_
# define SHADER_MINIFIED_H_
# define VAR_my_fragColor "v"
# define VAR_u_resolution "r"
# define VAR_u_time "n"
# define VAR_texts "k"
# define VAR_texture_sampler "m"
# define VAR_u_resolution "v"
# define VAR_u_time "f"
const char *__temp_cleaned_shader_glsl =
"#version 330\n"
"uniform float n;"
"uniform vec2 r;"
"layout(location=1) out vec4 v;struct Light{vec3 position;float intensity;vec3 color;};struct Surface{float dist;vec3 position;vec3 baseColor;vec3 normal;vec3 emissiveColor;};struct Hit{Surface surface;Surface near;};"
"uniform vec2 v;"
"uniform float f;"
"uniform sampler2D m,k;struct Ray{vec3 rd;vec3 dir;};"
"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;"
"float n(vec3 v,vec2 x)"
"{"
"vec3 f=abs(v);"
"return max(f.y-x.y,max(f.x*sqrt(3.)*.5+f.z*.5,f.z)-x.x);"
"}"
"void n(inout vec2 v)"
"{"
"float f=acos(-1.)/2.;"
"v=cos(f)*v+sin(f)*vec2(v.y,-v.x);"
"}"
"float x(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);"
"}"
"mat2 t(float v)"
"{"
"float f=sin(v),x=cos(v);"
"return mat2(x,-f,f,x);"
"}"
"float n(vec3 v,float f,float i)"
"{"
"vec3 r=v;"
"r.xz*=t(i);"
"r.yz*=t(i);"
"n(r.yz);"
"float m=n(r,vec2(.5+f,.1)),y=n(r,vec2(.2+f,.1));"
"return x(m,-y);"
"}"
"vec2 x(vec3 v)"
"{"
"float x=0.,r=1e10;"
"vec3 i=v;"
"i.xy*=n();"
"for(float m=1.;m<=6.;m++)"
"{"
"float y=n(i,m*.35,f+abs(2.+.4*sin(f))*m*3.1415/6.);"
"r=min(r,y);"
"if(r==y)"
"x=1.+mod(m,3.);"
"}"
"return vec2(r,x);"
"}"
"vec3 t(vec3 v,vec3 f,inout vec3 i)"
"{"
"float r=0.,m=0.,y=0.;"
"for(int e=0;e<150;e++)"
"{"
"i=v+f*r;"
"vec2 n=x(i);"
"r+=n.x;"
"m=n.y;"
"if(r>80.)"
"break;"
"if(n.x<abs(.001*r))"
"{"
"y=1.;"
"break;"
"}"
"}"
"if(r>80.)"
"r=-1.;"
"return vec3(r,m,y);"
"}"
"vec3 x(vec3 v,vec3 f,vec3 i)"
"{"
"float r=0.,m=0.,y=0.;"
"for(int e=0;e<50;e++)"
"{"
"i=v+f*r;"
"vec2 n=x(i);"
"r+=n.x;"
"m=n.y;"
"if(r>40.)"
"break;"
"if(n.x<abs(.001*r))"
"{"
"y=1.;"
"break;"
"}"
"}"
"if(r>40.)"
"r=-1.;"
"return vec3(r,m,y);"
"}"
"float e(vec3 v,vec3 f)"
"{"
"float r=1.,m=.01;"
"for(int i=0;i<40;i++)"
"{"
"if(m>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.)"
"break;"
"}"
"r=max(r,-1.);"
"return.25*(1.+r)*(1.+r)*(2.-r);"
"}"
"vec3 e(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);"
"return normalize(r);"
"}"
"vec3 p(vec3 v,vec3 f)"
"{"
"vec3 r=vec3(.5454);"
"return r+(1.-r)*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 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;"
"}"
"float r(vec3 v,vec3 f)"
"{"
"float r=0.,m=1.;"
"for(int i=0;i<8;i++)"
"{"
"float y=.01+.02*float(i*i),d=x(v+f*y).x;"
"r+=(y-d)*m;"
"m*=.85;"
"}"
"return 1.-clamp(.6*r,0.,1.);"
"}"
"vec3 e(vec3 v,vec3 f,vec3 m,float i)"
"{"
"float y=1.,x=r(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);"
"}"
"vec3 p(vec3 f)"
"{"
"vec2 r=gl_FragCoord.xy/v.xy;"
"f=mix(f,f*smoothstep(.8,.4,length(r-vec2(.5))),.9);"
"f=mix(f,smoothstep(0.,1.,f),.5);"
"f*=vec3(1);"
"return pow(f,vec3(1./2.2));"
"}"
"vec3 e(vec2 f,vec3 v,vec3 i)"
"{"
"vec3 r=normalize(i-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 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(vec2 v)"
"{"
"bool r=!true;"
"vec3 f=vec3(0,5,-3),y=vec3(0),m;"
"m=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;"
"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);"
"}"
"return i;"
"}"
"vec2 e()"
"{"
"vec2 r=2.*((gl_FragCoord.xy+vec2(0)*.5)/v.xy-.5);"
"r.x*=v.x/v.y;"
"return r;"
"}"
"void main()"
"{"
"v=vec4(vec3(0,1,0),1);"
"vec3 v=vec3(0);"
"v+=r(e());"
"v=p(v);"
"gl_FragColor=vec4(v,1);"
"}";
#endif // SHADER_MINIFIED_H_

BIN
texture_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB