71 Commits

Author SHA1 Message Date
f9270a4722 no nyt 2024-07-31 21:44:25 +03:00
a22e759c47 fade to white 2024-07-31 21:23:38 +03:00
610c2391b1 final ? 4095 2024-07-31 21:16:38 +03:00
01dd045a6a Merge branch 'experimental' of http://gitlab.xn--jrvisalo-0za.fi/markus.jarvisalo/4kdemo into experimental 2024-07-31 21:08:18 +03:00
10a7d12eb8 fresnel 2024-07-31 21:07:00 +03:00
73c4457de4 portaali fresnel 2024-07-31 21:06:04 +03:00
96f49bfdff add noise 2024-07-31 21:03:25 +03:00
485df6c245 noiset --> 4076 2024-07-31 20:03:15 +03:00
ba4b8a9f89 vähemmän glowia. final size: 4065 2024-07-31 04:13:18 +03:00
5db872e091 glow toimii!! final size: 4076 2024-07-31 03:26:05 +03:00
d184eba529 fresnel 2024-07-30 22:42:41 +03:00
29d6b84ee0 readme update 2024-07-30 21:50:34 +03:00
6c46d4ab6f add readme.txt 2024-07-30 20:15:20 +03:00
5ae2fd8095 final 0.2 - 4094 bytes 2024-07-30 19:42:23 +03:00
0fc0faf492 final 0.1 - 4091bytes 2024-07-29 23:33:17 +03:00
a3ff44acf5 musa optimointia - 4080bytes 2024-07-29 23:10:53 +03:00
ba4b18d0ea Merge branch 'dev' of http://gitlab.xn--jrvisalo-0za.fi/markus.jarvisalo/4kdemo into dev 2024-07-29 22:57:15 +03:00
6c6de97a23 värit ja materiaalit 2024-07-29 22:53:43 +03:00
4f1f573b8f kamera ajoja 2024-07-29 22:51:50 +03:00
a8c521bfcf Merge branch 'dev' of http://gitlab.xn--jrvisalo-0za.fi/markus.jarvisalo/4kdemo into dev 2024-07-29 22:22:07 +03:00
0284461cd5 kamera ajo 2024-07-29 22:20:30 +03:00
9646be5552 kamera-ajo 2024-07-29 22:18:06 +03:00
719e6d367d zoomi 2024-07-29 20:09:00 +03:00
c659731142 uudet musat 2024-07-29 19:35:28 +03:00
f8371d479f lyhyemmät musat 2024-07-29 19:33:06 +03:00
9c678c1611 Optimointeja 2024-07-29 19:17:51 +03:00
055dbd10c0 4096 tavua 2024-07-29 18:19:39 +03:00
7fbe712d53 Add specular to materials 2024-07-29 17:22:13 +03:00
ba77e88342 optimize 2024-07-29 16:19:22 +03:00
ba6e615159 update 2024-07-29 15:59:04 +03:00
83b935c968 fixes 2024-07-29 15:51:58 +03:00
33e75f8760 tunneli vege, vettä tilalle 2024-07-29 15:15:52 +03:00
e8f64b78bb ja lisää optimointeja 2024-07-29 08:56:13 +03:00
f5cfde0373 lisää optimointia 2024-07-29 08:13:18 +03:00
b4c88efb92 biisi optimoitu 2024-07-29 00:05:11 +03:00
02fc36ddd8 optimoitu 2024-07-28 22:41:20 +03:00
1d606da897 Vesi optimoitu 2024-07-28 22:29:00 +03:00
f7a6502ea2 ajotuksia + valo 2024-07-28 20:39:43 +03:00
8f7befa8db animaatiot ja värit 2024-07-28 19:17:28 +03:00
0f6b4dd3e1 eka merkki lukittu 2024-07-27 17:40:11 +03:00
fa12676bee lisäyksiä 2024-07-27 00:18:28 +03:00
a7eed4cefb Optimointeja 2024-07-26 19:35:31 +03:00
98263cafaa Maastoa ja kameraa 2024-07-26 17:34:38 +03:00
c2d5cd9ee4 additions 2024-07-26 00:54:30 +03:00
f9ecf51295 Merge branch 'dev' of http://gitlab.xn--jrvisalo-0za.fi/markus.jarvisalo/4kdemo into dev 2024-07-24 23:36:39 +03:00
83606f875e Textures 2024-07-24 23:36:31 +03:00
bdfce751c8 fix music 2024-07-24 19:25:21 +03:00
e14ce9aff9 fix for sointu 2024-07-24 19:00:16 +03:00
37bec1279f Vesi efekti 2024-07-24 18:40:11 +03:00
4389be6ef8 Animaatiot toimii 2024-07-24 16:48:38 +03:00
0ea616d2ec Update shader.glsl 2024-07-24 16:15:14 +03:00
2a579218a0 musamusa 2024-06-09 18:44:55 +03:00
342f91c6ca tranaa!! 2024-06-04 21:06:35 +03:00
878e57b057 sample testailuja 2024-06-04 17:07:01 +03:00
1c6b4cdc7e sointu toimii! 2024-06-02 21:24:14 +03:00
8c1fe50342 testing 2024-06-01 17:09:23 +03:00
4c7c2e863b new effect, occulusion etc... softshadows... 2024-05-30 22:32:17 +03:00
3d7a859ac1 Fix AA 2024-05-30 14:13:54 +03:00
d2a36e472e depth of field 2024-05-29 22:17:28 +03:00
1b95e62d9e post process 2024-05-29 20:58:47 +03:00
579a7693ed add zip files to ignore 2024-05-29 18:48:18 +03:00
6a098253ca fixes 2024-05-29 18:47:21 +03:00
9b0e678611 fixes 2024-05-28 22:53:49 +03:00
063624d7bb testing shader fragments 2024-05-28 22:10:25 +03:00
42ab16309c fix 2024-05-25 13:50:45 +03:00
8cdac52f8f rok 2024-05-25 01:35:09 +03:00
9c461b49a2 testing 2024-05-25 01:15:49 +03:00
05de1acfc9 text scroller 2024-05-24 21:48:35 +03:00
acb50e1e15 remove dlls 2024-05-24 21:03:47 +03:00
d6ee9002ce add readme and music originals (you'll need renoise for developing) + remove shader backup 2024-05-24 02:02:26 +03:00
a160937863 Initial workin version, see readme for build info. 2024-05-24 02:01:34 +03:00
103 changed files with 17182 additions and 2729 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
*.obj
*.exe
*.html
__temp*.*
__temp*.*
*.dll
*.zip

2
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,2 @@
{
}

50
2d_thing.frag Normal file
View File

@ -0,0 +1,50 @@
#ifdef GL_ES
precision mediump float;
#endif
const float PI = 3.14159265;
uniform vec2 u_resolution;
uniform float u_time;
vec3 palette(float t) {
vec3 a = vec3(0.5, 0.5, 0.5);
vec3 b = vec3(1.0, 1.0, 1.0);
vec3 c = vec3(1.0, 1.0, 1.0);
vec3 d = vec3(0.0, 0.6666, 0.3333);
return a + b * cos(6.28318 * (c*t+d));
}
mat2 rotate(float angle){
return mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
}
float polygon(vec2 position, float radius, float sides){
float a = atan(position.x, position.y);
float slice = PI * 2.0 / sides;
return 1. - step(radius, cos(floor(0.5 + a / slice) * slice - a) * length(position));
}
float star(vec2 position, float radius, float sides){
float a = atan(position.x, position.y);
float slice = PI * 2. / sides;
return 1. - step(radius, cos(floor(-2.0 + a / slice) * slice - a));
}
void main() {
vec2 uv = (gl_FragCoord.xy * 2. - u_resolution.xy) / u_resolution.y;
vec3 color = vec3(0.08, 0.22, 0.39);
vec3 mixer = vec3(0.);
for(float i = 1.; i < 3.; i++){
vec2 translate = uv;
translate *= rotate(i*1.4/5.); // + u_time);
float sides = 11.;
mixer += vec3(star(translate, 0.06, sides))*vec3(0.5725, 0.8275, 0.9451)*(i*0.7)*0.2;
}
color = mix( color, mixer, 0.5);
// color = max(color, polygon(uv, 0.3, 6.)),
gl_FragColor = vec4(color, 1.0);
}

View File

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

2701
4klang.asm

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,45 @@
// some useful song defines for 4klang
#define SAMPLE_RATE 44100
#define BPM 120.000000
#define MAX_INSTRUMENTS 3
#define MAX_PATTERNS 50
#define PATTERN_SIZE_SHIFT 4
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
#define SAMPLES_PER_TICK 5512
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
#define POLYPHONY 1
#define INTEGER_16BIT
#define SAMPLE_TYPE short
// auto-generated by Sointu, editing not recommended
#ifndef SU_RENDER_H
#define SU_RENDER_H
#define WINDOWS_OBJECT
#define SU_CHANNEL_COUNT 2
#define SU_LENGTH_IN_SAMPLES 2828192
#define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
// declaration of the external synth render function, you'll always need that
extern "C" void __stdcall _4klang_render(void*);
// declaration of the external envelope buffer. access only if you're song was exported with that option
extern "C" float _4klang_envelope_buffer;
// declaration of the external note buffer. access only if you're song was exported with that option
extern "C" int _4klang_note_buffer;
#define SU_SAMPLE_RATE 44100
#define SU_BPM 116
#define SU_ROWS_PER_BEAT 4
#define SU_ROWS_PER_PATTERN 16
#define SU_LENGTH_IN_PATTERNS 31
#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))
#include <stdint.h>
#if UINTPTR_MAX == 0xffffffff
#if defined(__clang__) || defined(__GNUC__)
#define SU_CALLCONV __attribute__ ((stdcall))
#elif defined(_WIN32)
#define SU_CALLCONV __stdcall
#endif
#else
#define SU_CALLCONV
#endif
typedef short SUsample;
#define SU_SAMPLE_RANGE 32767.0
#define SU_SAMPLE_PCM16
#define SU_SAMPLE_SIZE 2
#ifdef __cplusplus
extern "C" {
#endif
void SU_CALLCONV su_render_song(SUsample *buffer);
void SU_CALLCONV su_load_gmdls();
#define SU_LOAD_GMDLS
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,621 +1,29 @@
%macro export_func 1
global _%1
_%1:
%endmacro
%define USE_SECTIONS
%define SAMPLE_RATE 44100
%define MAX_INSTRUMENTS 3
%define MAX_VOICES 1
%define HLD 1
%define BPM 120.000000
%define MAX_PATTERNS 50
%define PATTERN_SIZE_SHIFT 4
%define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
%define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
%define SAMPLES_PER_TICK 5512
%define DEF_LFO_NORMALIZE 0.0000453515
%define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
%define GO4K_USE_16BIT_OUTPUT
;%define GO4K_USE_GROOVE_PATTERN
;%define GO4K_USE_ENVELOPE_RECORDINGS
;%define GO4K_USE_NOTE_RECORDINGS
%define GO4K_CLIP_OUTPUT
%define GO4K_USE_DLL
%define GO4K_USE_GLOBAL_DLL
%define GO4K_USE_ENV_CHECK
%define GO4K_USE_VCO_CHECK
%define GO4K_USE_VCO_SHAPE
%define GO4K_USE_VCF_CHECK
%define GO4K_USE_VCF_MOD_FM
%define GO4K_USE_VCF_HIGH
%define GO4K_USE_VCF_BAND
%define GO4K_USE_VCF_PEAK
%define GO4K_USE_DST_CHECK
%define GO4K_USE_DLL_CHORUS
%define GO4K_USE_DLL_CHORUS_CLAMP
%define GO4K_USE_DLL_DAMP
%define GO4K_USE_DLL_DC_FILTER
%define GO4K_USE_FSTG_CHECK
%define GO4K_USE_WAVESHAPER_CLIP
%define MAX_DELAY 65536
%define MAX_UNITS 64
%define MAX_UNIT_SLOTS 16
%define GO4K_BEGIN_CMDDEF(def_name)
%define GO4K_END_CMDDEF db 0
%define GO4K_BEGIN_PARAMDEF(def_name)
%define GO4K_END_PARAMDEF
GO4K_ENV_ID equ 1
%macro GO4K_ENV 5
db %1
db %2
db %3
db %4
db %5
%endmacro
%define ATTAC(val) val
%define DECAY(val) val
%define SUSTAIN(val) val
%define RELEASE(val) val
%define GAIN(val) val
struc go4kENV_val
.attac resd 1
.decay resd 1
.sustain resd 1
.release resd 1
.gain resd 1
.size
endstruc
struc go4kENV_wrk
.state resd 1
.level resd 1
.gm resd 1
.am resd 1
.dm resd 1
.sm resd 1
.rm resd 1
.size
endstruc
%define ENV_STATE_ATTAC 0
%define ENV_STATE_DECAY 1
%define ENV_STATE_SUSTAIN 2
%define ENV_STATE_RELEASE 3
%define ENV_STATE_OFF 4
GO4K_VCO_ID equ 2
%macro GO4K_VCO 8
db %1
db %2
%ifdef GO4K_USE_VCO_PHASE_OFFSET
db %3
%endif
%ifdef GO4K_USE_VCO_GATE
db %4
%endif
db %5
%ifdef GO4K_USE_VCO_SHAPE
db %6
%endif
db %7
db %8
%endmacro
%define TRANSPOSE(val) val
%define DETUNE(val) val
%define PHASE(val) val
%define GATES(val) val
%define COLOR(val) val
%define SHAPE(val) val
%define FLAGS(val) val
%define SINE 0x01
%define TRISAW 0x02
%define PULSE 0x04
%define NOISE 0x08
%define LFO 0x10
%define GATE 0x20
%define VCO_STEREO 0x40
struc go4kVCO_val
.transpose resd 1
.detune resd 1
%ifdef GO4K_USE_VCO_PHASE_OFFSET
.phaseofs resd 1
%endif
%ifdef GO4K_USE_VCO_GATE
.gate resd 1
%endif
.color resd 1
%ifdef GO4K_USE_VCO_SHAPE
.shape resd 1
%endif
.gain resd 1
.flags resd 1
.size
endstruc
struc go4kVCO_wrk
.phase resd 1
.tm resd 1
.dm resd 1
.fm resd 1
.pm resd 1
.cm resd 1
.sm resd 1
.gm resd 1
.phase2 resd 1
.size
endstruc
GO4K_VCF_ID equ 3
%macro GO4K_VCF 3
db %1
db %2
db %3
%endmacro
%define LOWPASS 0x1
%define HIGHPASS 0x2
%define BANDPASS 0x4
%define BANDSTOP 0x3
%define ALLPASS 0x7
%define PEAK 0x8
%define STEREO 0x10
%define FREQUENCY(val) val
%define RESONANCE(val) val
%define VCFTYPE(val) val
struc go4kVCF_val
.freq resd 1
.res resd 1
.type resd 1
.size
endstruc
struc go4kVCF_wrk
.low resd 1
.high resd 1
.band resd 1
.freq resd 1
.fm resd 1
.rm resd 1
.low2 resd 1
.high2 resd 1
.band2 resd 1
.size
endstruc
GO4K_DST_ID equ 4
%macro GO4K_DST 3
db %1
%ifdef GO4K_USE_DST_SH
db %2
%ifdef GO4K_USE_DST_STEREO
db %3
%endif
%else
%ifdef GO4K_USE_DST_STEREO
db %3
%endif
%endif
%endmacro
%define DRIVE(val) val
%define SNHFREQ(val) val
%define FLAGS(val) val
struc go4kDST_val
.drive resd 1
%ifdef GO4K_USE_DST_SH
.snhfreq resd 1
%endif
.flags resd 1
.size
endstruc
struc go4kDST_wrk
.out resd 1
.snhphase resd 1
.dm resd 1
.sm resd 1
.out2 resd 1
.size
endstruc
GO4K_DLL_ID equ 5
%macro GO4K_DLL 8
db %1
db %2
db %3
%ifdef GO4K_USE_DLL_DAMP
db %4
%endif
%ifdef GO4K_USE_DLL_CHORUS
db %5
db %6
%endif
db %7
db %8
%endmacro
%define PREGAIN(val) val
%define DRY(val) val
%define FEEDBACK(val) val
%define DEPTH(val) val
%define DAMP(val) val
%define DELAY(val) val
%define COUNT(val) val
struc go4kDLL_val
.pregain resd 1
.dry resd 1
.feedback resd 1
%ifdef GO4K_USE_DLL_DAMP
.damp resd 1
%endif
%ifdef GO4K_USE_DLL_CHORUS
.freq resd 1
.depth
%endif
.delay resd 1
.count resd 1
.size
endstruc
struc go4kDLL_wrk
.index resd 1
.store resd 1
.dcin resd 1
.dcout resd 1
%ifdef GO4K_USE_DLL_CHORUS
.phase resd 1
%endif
.buffer resd MAX_DELAY
.size
endstruc
struc go4kDLL_wrk2
.pm resd 1
.fm resd 1
.im resd 1
.dm resd 1
.sm resd 1
.am resd 1
.size
endstruc
GO4K_FOP_ID equ 6
%macro GO4K_FOP 1
db %1
%endmacro
%define OP(val) val
%define FOP_POP 0x1
%define FOP_ADDP 0x2
%define FOP_MULP 0x3
%define FOP_PUSH 0x4
%define FOP_XCH 0x5
%define FOP_ADD 0x6
%define FOP_MUL 0x7
%define FOP_ADDP2 0x8
%define FOP_LOADNOTE 0x9
%define FOP_MULP2 0xa
struc go4kFOP_val
.flags resd 1
.size
endstruc
struc go4kFOP_wrk
.size
endstruc
GO4K_FST_ID equ 7
%macro GO4K_FST 2
db %1
dw %2
%endmacro
%define AMOUNT(val) val
%define DEST(val) val
%define FST_SET 0x0000
%define FST_ADD 0x4000
%define FST_POP 0x8000
struc go4kFST_val
.amount resd 1
.op1 resd 1
.size
endstruc
struc go4kFST_wrk
.size
endstruc
GO4K_PAN_ID equ 8
%macro GO4K_PAN 1
%ifdef GO4K_USE_PAN
db %1
%endif
%endmacro
%define PANNING(val) val
struc go4kPAN_val
%ifdef GO4K_USE_PAN
.panning resd 1
%endif
.size
endstruc
struc go4kPAN_wrk
.pm resd 1
.size
endstruc
GO4K_OUT_ID equ 9
%macro GO4K_OUT 2
db %1
%ifdef GO4K_USE_GLOBAL_DLL
db %2
%endif
%endmacro
%define AUXSEND(val) val
struc go4kOUT_val
.gain resd 1
%ifdef GO4K_USE_GLOBAL_DLL
.auxsend resd 1
%endif
.size
endstruc
struc go4kOUT_wrk
.am resd 1
.gm resd 1
.size
endstruc
GO4K_ACC_ID equ 10
%macro GO4K_ACC 1
db %1
%endmacro
%define OUTPUT 0
%define AUX 8
%define ACCTYPE(val) val
struc go4kACC_val
.acctype resd 1
.size
endstruc
struc go4kACC_wrk
.size
endstruc
%ifdef GO4K_USE_FLD
GO4K_FLD_ID equ 11
%macro GO4K_FLD 1
db %1
%endmacro
%define VALUE(val) val
struc go4kFLD_val
.value resd 1
.size
endstruc
struc go4kFLD_wrk
.vm resd 1
.size
endstruc
%endif
%ifdef GO4K_USE_GLITCH
GO4K_GLITCH_ID equ 12
%macro GO4K_GLITCH 5
db %1
db %2
db %3
db %4
db %5
%endmacro
%define ACTIVE(val) val
%define SLICEFACTOR(val)val
%define PITCHFACTOR(val)val
%define SLICESIZE(val) val
struc go4kGLITCH_val
.active resd 1
.dry resd 1
.dsize resd 1
.dpitch resd 1
.slicesize resd 1
.size
endstruc
struc go4kGLITCH_wrk
.index resd 1
.store resd 1
.slizesize resd 1
.slicepitch resd 1
.unused resd 1
.buffer resd MAX_DELAY
.size
endstruc
struc go4kGLITCH_wrk2
.am resd 1
.dm resd 1
.sm resd 1
.pm resd 1
.size
endstruc
%endif
%ifdef GO4K_USE_FSTG
GO4K_FSTG_ID equ 13
%macro GO4K_FSTG 2
db %1
dw %2
%endmacro
struc go4kFSTG_val
.amount resd 1
.op1 resd 1
.size
endstruc
struc go4kFSTG_wrk
.size
endstruc
%endif
struc go4k_instrument
.release resd 1
.note resd 1
.workspace resd MAX_UNITS*MAX_UNIT_SLOTS
.dlloutl resd 1
.dlloutr resd 1
.outl resd 1
.outr resd 1
.size
endstruc
struc go4k_synth
.instruments resb go4k_instrument.size * MAX_INSTRUMENTS * MAX_VOICES
.global resb go4k_instrument.size * MAX_VOICES
.size
endstruc
%ifdef USE_SECTIONS
section .g4kmuc1 data align=1
%else
section .data align=1
%endif
go4k_patterns
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
db 48, HLD, HLD, 48, HLD, HLD, 43, HLD, 41, HLD, HLD, 41, 0, 0, 0, 0,
db 41, HLD, HLD, 41, HLD, HLD, 43, HLD, 48, HLD, HLD, 48, 0, 0, 0, 0,
db 43, HLD, HLD, 43, HLD, HLD, 46, HLD, 48, HLD, HLD, 48, 0, 0, 0, 0,
db 41, HLD, HLD, 41, HLD, HLD, 53, HLD, 41, HLD, HLD, 41, 0, 0, 0, 0,
db 48, HLD, HLD, 48, HLD, HLD, 60, HLD, 48, HLD, HLD, 48, 0, 0, 0, 0,
db 0, 0, 84, HLD, HLD, HLD, 79, 0, 82, 79, 0, 77, 0, 75, HLD, 0,
db 72, 0, 72, 0, 75, 0, 82, 79, HLD, HLD, 79, 0, 0, 0, 0, 0,
db 72, 0, 72, 0, 75, 0, 75, 72, HLD, HLD, 72, 0, 0, 0, 0, 0,
db 87, HLD, HLD, HLD, 0, 0, 84, 0, 0, 0, 84, 0, 84, 0, 0, 0,
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 82, 0, 84, 82, 79,
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, HLD, 0, 89, 0, 87, 0,
db 89, HLD, HLD, HLD, 0, 0, 84, 0, 0, 0, 84, 0, 84, 0, 0, 0,
db 75, HLD, HLD, 75, HLD, HLD, 70, HLD, 68, HLD, HLD, 68, 0, 0, 0, 0,
db 68, HLD, HLD, 68, HLD, HLD, 70, HLD, 75, HLD, HLD, 75, 0, 0, 0, 0,
db 70, HLD, HLD, 70, HLD, HLD, 70, HLD, 75, HLD, HLD, 75, 0, 0, 0, 0,
db 68, HLD, HLD, 68, HLD, HLD, 70, HLD, HLD, 70, HLD, HLD, 70, HLD, 0, 0,
db 68, HLD, HLD, 68, HLD, HLD, 68, HLD, 70, HLD, HLD, 70, 0, 0, 70, HLD,
db 70, HLD, HLD, 70, HLD, HLD, 75, HLD, HLD, 75, HLD, HLD, 75, HLD, 0, 0,
db 70, HLD, HLD, 70, HLD, HLD, 70, HLD, 75, HLD, HLD, 75, 0, 0, 75, HLD,
go4k_patterns_end
%ifdef USE_SECTIONS
section .g4kmuc2 data align=1
%else
section .data
%endif
go4k_pattern_lists
Instrument0List db 0, 0, 0, 0, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 0, 0, 0, 0, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 0, 0,
Instrument1List db 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 6, 8, 6, 7, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 9, 11, 12, 11, 12, 0, 6, 7, 6, 8, 6, 7, 6, 8, 9, 11, 9, 0, 6, 7, 6, 8, 0, 0,
Instrument2List db 13, 14, 13, 15, 13, 14, 13, 15, 13, 14, 13, 15, 13, 14, 13, 15, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 13, 14, 13, 15, 13, 14, 13, 15, 13, 14, 13, 0, 13, 14, 13, 15, 0, 0,
go4k_pattern_lists_end
%ifdef USE_SECTIONS
section .g4kmuc3 data align=1
%else
section .data
%endif
go4k_synth_instructions
GO4K_BEGIN_CMDDEF(Instrument0)
db GO4K_ENV_ID
db GO4K_ENV_ID
db GO4K_FST_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_PAN_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument1)
db GO4K_ENV_ID
db GO4K_ENV_ID
db GO4K_FST_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_DLL_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument2)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_FOP_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Global)
db GO4K_ACC_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_ACC_ID
db GO4K_FOP_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
go4k_synth_instructions_end
%ifdef USE_SECTIONS
section .g4kmuc4 data align=1
%else
section .data
%endif
go4k_synth_parameter_values
GO4K_BEGIN_PARAMDEF(Instrument0)
GO4K_ENV ATTAC(5),DECAY(85),SUSTAIN(107),RELEASE(0),GAIN(128)
GO4K_ENV ATTAC(59),DECAY(95),SUSTAIN(0),RELEASE(64),GAIN(91)
GO4K_FST AMOUNT(80),DEST(6*MAX_UNIT_SLOTS+4+FST_SET)
GO4K_FOP OP(FOP_POP)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW)
GO4K_FOP OP(FOP_MULP)
GO4K_VCF FREQUENCY(20),RESONANCE(23),VCFTYPE(LOWPASS)
GO4K_PAN PANNING(64)
GO4K_OUT GAIN(64), AUXSEND(0)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument1)
GO4K_ENV ATTAC(23),DECAY(66),SUSTAIN(20),RELEASE(64),GAIN(128)
GO4K_ENV ATTAC(75),DECAY(77),SUSTAIN(20),RELEASE(64),GAIN(128)
GO4K_FST AMOUNT(92),DEST(6*MAX_UNIT_SLOTS+4+FST_SET)
GO4K_FOP OP(FOP_POP)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(PULSE)
GO4K_FOP OP(FOP_MULP)
GO4K_VCF FREQUENCY(38),RESONANCE(45),VCFTYPE(BANDPASS)
GO4K_FOP OP(FOP_PUSH)
GO4K_VCF FREQUENCY(56),RESONANCE(80),VCFTYPE(BANDSTOP)
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(35),DEPTH(57),DELAY(17),COUNT(1)
GO4K_FOP OP(FOP_XCH)
GO4K_VCF FREQUENCY(45),RESONANCE(94),VCFTYPE(BANDSTOP)
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(8),DEPTH(61),DELAY(18),COUNT(1)
GO4K_OUT GAIN(64), AUXSEND(0)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument2)
GO4K_ENV ATTAC(36),DECAY(75),SUSTAIN(0),RELEASE(64),GAIN(128)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(89),GAIN(128),FLAGS(TRISAW)
GO4K_VCO TRANSPOSE(68),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(89),GAIN(128),FLAGS(TRISAW)
GO4K_FOP OP(FOP_ADDP)
GO4K_VCO TRANSPOSE(71),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(85),GAIN(128),FLAGS(TRISAW)
GO4K_FOP OP(FOP_ADDP)
GO4K_FOP OP(FOP_MULP)
GO4K_FOP OP(FOP_PUSH)
GO4K_VCF FREQUENCY(36),RESONANCE(49),VCFTYPE(BANDPASS)
GO4K_FOP OP(FOP_XCH)
GO4K_VCF FREQUENCY(49),RESONANCE(28),VCFTYPE(BANDPASS)
GO4K_OUT GAIN(46), AUXSEND(0)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Global)
GO4K_ACC ACCTYPE(AUX)
GO4K_DLL PREGAIN(40),DRY(128),FEEDBACK(113),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(1),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(40),DRY(128),FEEDBACK(103),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(9),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_ACC ACCTYPE(OUTPUT)
GO4K_FOP OP(FOP_ADDP2)
GO4K_OUT GAIN(64), AUXSEND(16)
GO4K_END_PARAMDEF
go4k_synth_parameter_values_end
%ifdef USE_SECTIONS
section .g4kmuc5 data align=1
%else
section .data
%endif
%ifdef GO4K_USE_DLL
global _go4k_delay_times
_go4k_delay_times
dw 0
dw 1116
dw 1188
dw 1276
dw 1356
dw 1422
dw 1492
dw 1556
dw 1618
dw 1140
dw 1212
dw 1300
dw 1380
dw 1446
dw 1516
dw 1580
dw 1642
dw 22050
dw 16537
%endif
; auto-generated by Sointu, editing not recommended
%ifndef PLAYER_INC
%define PLAYER_INC
%define SU_CHANNEL_COUNT 2
%define SU_LENGTH_IN_SAMPLES 2828192
%define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
%define SU_SAMPLE_RATE 44100
%define SU_BPM 116
%define SU_ROWS_PER_BEAT 4
%define SU_ROWS_PER_PATTERN 16
%define SU_LENGTH_IN_PATTERNS 31
%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
%define SU_SAMPLE_RANGE 32767.0
%define SU_SAMPLE_PCM16
_su_symbols:
%ifdef MANGLED
extern _su_render_song@4
%else ; MANGLED
extern su_render_song
%endif ; MANGLED
extern _su_load_gmdls
%define SU_LOAD_GMDLS
%endif ; PLAYER_INC

191
4klang.yml Normal file
View File

@ -0,0 +1,191 @@
bpm: 116
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [0, -1, -1, 1, 2, 3, 4, 5, -1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 9, 10, 11, 6, 6, 7, 7, 6, 6]
patterns: [[21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 62, 1, 64, 1, 65, 1, 1, 1, 67, 1, 1, 1], [69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 64, 62], [64, 1, 1, 1, 1, 1, 1, 1, 69, 1, 1, 1, 1, 1, 1, 1], [33, 0, 1, 1, 33, 33, 33, 33, 0, 1, 33, 0, 1, 33, 0, 1], [28, 0, 1, 1, 28, 28, 28, 28, 0, 1, 28, 0, 1, 28, 0, 1], [26, 0, 1, 1, 26, 26, 26, 26, 0, 1, 26, 0, 1, 26, 0, 1], [23, 0, 1, 1, 23, 23, 23, 23, 0, 1, 23, 0, 1, 23, 0, 1], [28, 0, 1, 1, 28, 28, 28, 30, 0, 1, 30, 0, 1, 30, 0, 1], [32, 0, 1, 1, 32, 32, 32, 32, 0, 1, 32, 0, 1, 32, 0, 1]]
- numvoices: 1
order: [0, -1, -1, -1, -1, -1, 1, -1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 6, 7, 2, 2, 3, 3, 2, 2]
patterns: [[33, 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], [45, 0, 1, 1, 45, 45, 45, 45, 0, 1, 45, 0, 1, 45, 0, 1], [40, 0, 1, 1, 40, 40, 40, 40, 0, 1, 40, 0, 1, 40, 0, 1], [38, 0, 1, 1, 38, 38, 38, 38, 0, 1, 38, 0, 1, 38, 0, 1], [35, 0, 1, 1, 35, 35, 35, 35, 0, 1, 35, 0, 1, 35, 0, 1], [40, 0, 1, 1, 40, 40, 40, 42, 0, 1, 42, 0, 1, 42, 0, 1], [47, 0, 1, 1, 47, 47, 47, 47, 0, 1, 47, 0, 1, 47, 0, 1]]
- numvoices: 1
order: [-1, 0, -1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 2, 4, 1, 1, 2, 2, 1, 1]
patterns: [[40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [40, 0, 1, 1, 40, 40, 40, 40, 0, 1, 40, 0, 1, 40, 0, 1], [47, 0, 1, 1, 47, 47, 47, 47, 0, 1, 47, 0, 1, 47, 0, 1], [45, 0, 1, 1, 45, 45, 45, 45, 0, 1, 45, 0, 1, 45, 0, 1], [44, 0, 1, 1, 44, 44, 44, 44, 0, 1, 44, 0, 1, 44, 0, 1]]
- numvoices: 1
order: [-1, -1, 0, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 2, 4, 1, 1, 2, 2, 1, 1]
patterns: [[49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [49, 0, 1, 1, 49, 49, 49, 49, 0, 1, 49, 0, 1, 49, 0, 1], [44, 0, 1, 1, 44, 44, 44, 44, 0, 1, 44, 0, 1, 44, 0, 1], [42, 0, 1, 1, 42, 42, 42, 42, 0, 1, 42, 0, 1, 42, 0, 1], [59, 0, 1, 1, 59, 59, 59, 59, 0, 1, 59, 0, 1, 59, 0, 1]]
- numvoices: 1
order: [-1, -1, -1, 0, 1, 2, 3, 4, -1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 6, -1, 5, 5, 6, 6, 5, 5]
patterns: [[64, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 50, 1, 52, 1, 53, 1, 1, 1, 55, 1, 1, 1], [57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 52, 50], [52, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1], [52, 0, 1, 1, 52, 52, 52, 52, 0, 1, 52, 0, 1, 52, 0, 1], [59, 0, 1, 1, 59, 59, 59, 59, 0, 1, 59, 0, 1, 59, 0, 1], [57, 0, 1, 1, 57, 57, 57, 57, 0, 1, 57, 0, 1, 57, 0, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0]
patterns: [[33, 1, 1, 1, 33, 33, 33, 33, 1, 1, 33, 1, 1, 33, 1, 1], [32, 1, 1, 1, 32, 32, 32, 32, 1, 1, 32, 1, 1, 32, 1, 1], [30, 1, 1, 1, 30, 30, 30, 30, 1, 1, 30, 1, 1, 30, 1, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0]
patterns: [[45, 1, 1, 1, 45, 45, 45, 45, 1, 1, 45, 1, 1, 45, 1, 1], [44, 1, 1, 1, 44, 44, 44, 44, 1, 1, 44, 1, 1, 44, 1, 1], [42, 1, 1, 1, 42, 42, 42, 42, 1, 1, 42, 1, 1, 42, 1, 1]]
- numvoices: 3
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
patter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terns: [[62, 1, 1, 1, 62, 62, 62, 62, 1, 1, 62, 1, 1, 62, 1, 1]]
- numvoices: 1
order: [-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]
patterns: [[60, 1, 1, 1, 60, 1, 1, 1, 60, 1, 1, 1, 60, 1, 1, 1]]
rowsperpattern: 16
length: 31
patch:
- name: Strings
numvoices: 5
units:
- type: envelope
id: 33
parameters: {attack: 57, channel: 2, decay: 82, gain: 128, release: 63, stereo: 0, sustain: 62}
- type: oscillator
id: 19
parameters: {color: 65, damp: 64, detune: 65, dry: 128, feedback: 125, gain: 41, looplength: 9710, loopstart: 251, notetracking: 0, phase: 0, pregain: 40, samplestart: 1448797, shape: 67, stereo: 0, transpose: 91, type: 4, unison: 1}
- type: oscillator
id: 24
parameters: {color: 69, detune: 63, gain: 62, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 65, stereo: 0, transpose: 79, type: 4, unison: 1}
- type: addp
id: 20
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: mulp
parameters: {auxgain: 64, outgain: 64, panning: 64, stereo: 0}
- type: envelope
id: 46
parameters: {attack: 57, auxgain: 64, decay: 87, gain: 100, outgain: 64, panning: 64, release: 64, stereo: 0, sustain: 50}
- type: oscillator
id: 37
parameters: {auxgain: 35, color: 64, detune: 54, gain: 64, looplength: 9710, loopstart: 251, outgain: 40, phase: 0, samplestart: 1448797, shape: 64, stereo: 0, transpose: 91, type: 4, unison: 1}
- type: oscillator
id: 38
parameters: {color: 128, detune: 62, gain: 78, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 1}
- type: xch
id: 41
parameters: {stereo: 0}
- type: addp
id: 39
parameters: {stereo: 0}
- type: mulp
id: 35
parameters: {stereo: 0}
- type: outaux
id: 23
parameters: {auxgain: 19, outgain: 18, stereo: 1}
- name: Pizzicato
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 31, channel: 2, decay: 70, gain: 76, release: 66, stereo: 0, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 64, damp: 64, detune: 31, dry: 128, feedback: 125, gain: 128, looplength: 398, loopstart: 2073, notetracking: 0, phase: 0, pregain: 40, samplestart: 1034961, shape: 64, stereo: 0, transpose: 77, type: 4, unison: 2}
- type: oscillator
parameters: {auxgain: 64, color: 64, detune: 48, gain: 97, looplength: 398, loopstart: 2073, outgain: 64, phase: 0, samplestart: 1034961, shape: 64, stereo: 0, transpose: 89, type: 4, unison: 2}
- type: addp
id: 16
parameters: {stereo: 0}
- type: mulp
id: 14
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {auxgain: 39, outgain: 58, panning: 75, stereo: 0}
- type: delay
id: 49
parameters: {damp: 86, dry: 128, feedback: 59, notetracking: 0, pregain: 28, stereo: 1}
varargs: [5230, 4533]
- type: outaux
id: 6
parameters: {auxgain: 32, outgain: 20, stereo: 1}
- name: Trumpet
numvoices: 3
units:
- type: envelope
id: 51
parameters: {attack: 25, decay: 64, gain: 112, release: 64, stereo: 1, sustain: 88}
- type: oscillator
id: 1037
parameters: {color: 64, detune: 64, gain: 47, looplength: 76, loopstart: 1916, phase: 0, samplestart: 1622065, shape: 64, stereo: 1, transpose: 62, type: 4, unison: 1}
- type: mulp
id: 53
parameters: {stereo: 1}
- type: delay
parameters: {damp: 18, dry: 128, feedback: 37, notetracking: 2, pregain: 84, stereo: 1}
varargs: [48, 96]
- type: outaux
id: 56
parameters: {auxgain: 53, outgain: 56, stereo: 1}
- type: envelope
id: 61
parameters: {attack: 91, decay: 0, gain: 82, release: 89, stereo: 0, sustain: 92}
- type: oscillator
id: 59
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 82, type: 0, unison: 0}
- type: mulp
id: 62
parameters: {stereo: 0}
- type: send
id: 1038
parameters: {amount: 80, port: 1, sendpop: 1, stereo: 0, target: 1037, unit: 0, voice: 0}
- name: snare edm 2 (sample-st)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 0, decay: 68, gain: 90, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 48, detune: 52, gain: 53, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 81, stereo: 0, transpose: 76, type: 4}
- 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: 39, shape: 2, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 0, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 67, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 110, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 116, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 59, stereo: 0}
- type: outaux
parameters: {auxgain: 56, outgain: 77, stereo: 1}
- name: kick
numvoices: 1
units:
- type: envelope
id: 1039
parameters: {attack: 0, decay: 43, gain: 103, release: 50, stereo: 0, sustain: 89}
- type: oscillator
id: 1040
parameters: {color: 42, detune: 42, gain: 128, looplength: 1, loopstart: 1034, phase: 0, samplestart: 741926, shape: 72, stereo: 0, transpose: 79, type: 4}
- type: mulp
id: 1041
parameters: {stereo: 0}
- type: pan
id: 1043
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 1044
parameters: {auxgain: 0, outgain: 72, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 14, dry: 128, feedback: 123, notetracking: 0, pregain: 33, 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: 90, stereo: 1}

470
4klang2.yml Normal file
View File

@ -0,0 +1,470 @@
bpm: 137
rowsperbeat: 8
score:
tracks:
- numvoices: 1
order: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, -1, -1]
patterns: [[48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 48, 1], [48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 48, 48, 48], [48, 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]]
- 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, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 1, 57, 1, 57, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 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, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 13, 9, 11, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 11, 8, 8, 16, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 0, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, -1, -1, -1]
patterns: [[1, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 1, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 0], [1, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 1], [0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 1, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 0], [1, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 1], [0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 1, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 55, 1, 0, 1, 53, 0, 52, 1, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 0], [38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1], [40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1], [47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1], [45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1], [43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1], [42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1], [50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1], [49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,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 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 52, 1]]
- numvoices: 1
order: [-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, -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, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 57, 1, 57, 1, 57, 1, 54, 1, 54, 1, 54, 1, 54, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 10, 5, 6, 7, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 21, 20, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 20, 23, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, -1, -1, -1]
patterns: [[50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 0, 50, 1, 0, 1, 50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 0, 50, 0, 50, 1, 50, 1, 1, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 46, 0, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 1, 41, 1, 1, 1, 41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [0, 1, 46, 0, 74, 0, 74, 1, 0, 1, 46, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 74, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [48, 1, 1, 0, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1], [1, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 1, 1, 1, 1, 46, 1, 0, 1, 46, 0, 46, 1, 0, 1, 46, 1, 0, 1, 1, 1, 46, 1, 0, 1, 46, 1, 0, 1, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 1, 0, 1, 41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 0], [50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1], [45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1], [43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [1, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 18, 19, 22, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 23, 22, 24, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 74, 0, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 76, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 77, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [0, 1, 74, 0, 70, 0, 46, 1, 0, 1, 74, 1, 69, 1, 1, 1, 70, 1, 1, 1, 0, 1, 70, 1, 0, 1, 70, 0, 70, 0, 70, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [76, 1, 1, 0, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1], [1, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 0], [69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1], [71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1], [66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1], [67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1], [1, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 17, 18, 21, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 18, 22, 23, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 77, 0, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 79, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 1, 81, 1, 1, 1, 81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [0, 1, 70, 0, 46, 0, 70, 1, 0, 1, 70, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [79, 1, 1, 0, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1], [1, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 1, 0, 1, 81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 0], [78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1], [1, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1]]
- numvoices: 2
order: [-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, 0, 1, 2, 3, 4, 5, 6, -1, 7, 8, 9, 10, 11, 12, 13, -1, 14, 10, 15, 1, 16, 12, 6, -1, 17, 8, 9, 10, 18, 19, 20, -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: [[66, 1, 78, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 67, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 1, 81, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [74, 1, 86, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 1, 85, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [71, 1, 1, 1, 0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 1, 0, 1, 1, 1, 1], [74, 1, 86, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 1, 85, 1, 0, 1, 1, 1], [71, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 1, 1, 1, 0, 1, 1, 1], [64, 1, 76, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 1, 1, 0, 1, 1, 1, 1], [74, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 74, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [74, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [-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, 0, -1, -1, -1, 1, 2, 3, -1, 4, -1, -1, -1, 5, 6, 7, -1, 8, -1, -1, -1, 9, 6, 3, -1, 10, -1, -1, -1, 11, 12, 13, -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: [[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, 79, 0, 1, 1, 1, 1], [1, 83, 1, 1, 1, 0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 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 85, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 86, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 32
length: 99
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 0, channel: 2, decay: 69, gain: 80, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 106
parameters: {color: 128, detune: 69, gain: 80, lfo: 0, phase: 0, shape: 69, stereo: 0, transpose: 89, type: 0, unison: 2}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 0, damp: 0, decay: 43, dry: 128, feedback: 96, gain: 128, notetracking: 2, pregain: 40, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 127, panning: 64, shape: 105, stereo: 0}
- type: filter
id: 112
parameters: {auxgain: 64, bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, outgain: 64, resonance: 110, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 68, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 12, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 69, stereo: 0}
- type: filter
id: 14
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 33, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 42, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 62, decay: 76, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 122
parameters: {amount: 46, 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: 5, channel: 2, decay: 66, gain: 108, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, damp: 64, detune: 114, dry: 128, feedback: 125, gain: 49, lfo: 0, looplength: 1, loopstart: 4276, notetracking: 0, phase: 0, pregain: 40, samplestart: 560606, shape: 114, stereo: 0, transpose: 86, type: 4, unison: 3}
- type: distort
parameters: {drive: 99, gain: 128, 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: 77, shape: 7, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 1, frequency: 99, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 112, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 125, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 52, stereo: 0}
- type: outaux
parameters: {auxgain: 14, outgain: 71, 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: 69, 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: 101, 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: distort
parameters: {drive: 112, stereo: 0}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 54, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 77, stereo: 0}
- type: pan
id: 174
parameters: {panning: 60, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 21, outgain: 17, stereo: 1}
- name: basss v3
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 200
parameters: {amount: 93, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 39, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 75, detune: 74, gain: 58, lfo: 0, phase: 64, shape: 103, stereo: 0, transpose: 76, type: 2, unison: 2}
- type: oscillator
id: 6
parameters: {color: 57, detune: 65, gain: 128, lfo: 0, phase: 71, shape: 57, stereo: 0, transpose: 64, type: 2, unison: 2}
- type: addp
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 37, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 72, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 86, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 5, outgain: 31, stereo: 1}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 100, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 0, decay: 84, gain: 64, release: 78, stereo: 1, sustain: 0}
- type: mulp
id: 232
parameters: {stereo: 1}
- type: oscillator
id: 2
parameters: {color: 64, detune: 54, gain: 111, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 87, stereo: 1, transpose: 77, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 1}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 99, outgain: 128, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 37, 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: 127, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: pan
id: 7
parameters: {panning: 67, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 11, outgain: 128, stereo: 1}
- name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 64, detune: 82, gain: 128, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 78, stereo: 0, transpose: 64, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 1017
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 43, outgain: 89, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 83, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}
- name: Super Pluck
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 30, decay: 0, gain: 72, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 2
parameters: {color: 128, detune: 44, gain: 128, phase: 68, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 10
parameters: {color: 128, detune: 0, gain: 96, lfo: 0, phase: 37, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 11
parameters: {stereo: 0}
- type: noise
id: 23
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 24
parameters: {stereo: 0}
- type: mulp
id: 17
parameters: {stereo: 0}
- id: 18
parameters: {}
- type: envelope
id: 12
parameters: {attack: 20, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 13
parameters: {color: 128, detune: 86, gain: 128, phase: 47, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 14
parameters: {color: 128, detune: 110, gain: 93, lfo: 0, phase: 35, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 28
parameters: {stereo: 0}
- type: noise
id: 27
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 15
parameters: {stereo: 0}
- type: mulp
id: 26
parameters: {stereo: 0}
- type: delay
parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0}
varargs: [69]
- type: pan
parameters: {panning: 56, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 85, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 19
parameters: {bandpass: 1, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 111, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 7, outgain: 24, stereo: 1}
- name: Trance bells
comment: |-
Generic pluck generator
Use oscillator type, color and shape to alter the sound properties
numvoices: 4
units:
- type: envelope
id: 163
parameters: {attack: 12, decay: 86, gain: 46, release: 78, stereo: 0, sustain: 57}
- type: envelope
id: 215
parameters: {attack: 26, decay: 89, gain: 82, release: 86, stereo: 0, sustain: 82}
- type: mulp
id: 216
parameters: {stereo: 0}
- type: oscillator
id: 164
parameters: {color: 64, detune: 64, gain: 128, lfo: 0, looplength: 1945, loopstart: 1315, phase: 128, samplestart: 1069972, shape: 64, stereo: 0, transpose: 69, type: 4, unison: 0}
- type: oscillator
id: 165
parameters: {color: 26, detune: 67, gain: 34, lfo: 0, phase: 0, shape: 68, stereo: 0, transpose: 76, type: 1, unison: 2}
- type: addp
id: 166
parameters: {stereo: 0}
- type: mulp
id: 214
parameters: {stereo: 0}
- type: envelope
id: 1005
parameters: {attack: 0, decay: 82, gain: 128, release: 78, stereo: 0, sustain: 128}
- type: oscillator
id: 1002
parameters: {color: 65, detune: 60, gain: 74, looplength: 1645, loopstart: 3820, phase: 0, samplestart: 551786, shape: 70, stereo: 0, transpose: 83, type: 4, unison: 1}
- parameters: {}
disabled: true
- type: mulp
parameters: {stereo: 0}
- type: delay
id: 1004
parameters: {damp: 22, dry: 67, feedback: 16, notetracking: 0, pregain: 67, stereo: 0}
varargs: [4533]
- type: xch
id: 1006
parameters: {stereo: 0}
- type: addp
id: 1003
parameters: {stereo: 0}
- type: filter
id: 217
parameters: {bandpass: 1, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 58, stereo: 0}
- type: filter
id: 218
parameters: {bandpass: 0, frequency: 92, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 168
parameters: {panning: 61, stereo: 0}
- type: delay
id: 169
parameters: {damp: 44, dry: 128, feedback: 91, notetracking: 0, pregain: 69, stereo: 1}
varargs: [14990, 22310, 20568, 33814]
- type: outaux
id: 172
parameters: {auxgain: 22, outgain: 23, stereo: 1}
- type: loadnote
id: 219
parameters: {stereo: 0}
- type: send
id: 220
parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0}
- name: Saw lead
numvoices: 3
units:
- type: envelope
id: 1007
parameters: {attack: 10, decay: 79, gain: 21, release: 73, stereo: 1, sustain: 82}
- type: oscillator
id: 1008
parameters: {color: 37, detune: 72, gain: 82, phase: 0, shape: 84, stereo: 1, transpose: 64, type: 2, unison: 3}
- type: mulp
id: 1009
parameters: {stereo: 1}
- type: pan
id: 1011
parameters: {panning: 56, stereo: 1}
- type: filter
id: 1015
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 55, stereo: 1}
- type: compressor
parameters: {attack: 43, invgain: 94, ratio: 100, release: 61, stereo: 1, threshold: 23}
- type: mulp
id: 1014
parameters: {stereo: 1}
- type: filter
id: 1016
parameters: {bandpass: 0, frequency: 84, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: delay
id: 1010
parameters: {damp: 18, dry: 128, feedback: 63, notetracking: 2, pregain: 41, stereo: 1}
varargs: [32, 32]
- type: outaux
id: 1012
parameters: {auxgain: 0, outgain: 38, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 32, dry: 115, feedback: 122, notetracking: 0, pregain: 57, 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}

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

@ -32,9 +32,9 @@ include common.script
# Audio debug/test DLL
debug_4klang.obj: debug_4klang_wrapper.asm 4klang.asm 4klang.inc
$(ASSEMBLER_EXE) $(ASSEMBLER_OPTS) $(FORCED_4KLANG_OPTS) -o $@ $<
debug_4klang.obj: debug_4klang_wrapper.asm sointu.asm sointu.inc
$(ASSEMBLER_EXE) $(ASSEMBLER_OPTS) $(FORCED_4KLANG_OPTS) -o $@ $<
debug_audio.obj: debug_audio.asm errormsg.inc
$(ASSEMBLER_EXE) $(ASSEMBLER_OPTS) -o $@ $<

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# 4k intro
# Build
1. Configiksi minified.config
2. klikkaa minify shaders
3. klikkaa build exe
4. profit.
Huomattua: final.config yrittää pakata shaderit 2x, tämä ei hyvä siksi se näytti tyhjää kuvaa.
2 skenellä ja musalla buildatun intron koko nyt 3.457 kb
eli sinne mahtuu vaikka ja mitä vielä!

1758
_4klang.asm Normal file

File diff suppressed because it is too large Load Diff

22
_4klang.h Normal file
View File

@ -0,0 +1,22 @@
// some useful song defines for 4klang
#define SAMPLE_RATE 44100
#define BPM 165.000000
#define MAX_INSTRUMENTS 6
#define MAX_PATTERNS 25
#define PATTERN_SIZE_SHIFT 5
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
#define SAMPLES_PER_TICK 4009
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
#define POLYPHONY 1
#define FLOAT_32BIT
#define SAMPLE_TYPE float
#define WINDOWS_OBJECT
// declaration of the external synth render function, you'll always need that
extern "C" void __stdcall _su_render_song(void*);
// declaration of the external envelope buffer. access only if you're song was exported with that option
extern "C" float _4klang_envelope_buffer;
// declaration of the external note buffer. access only if you're song was exported with that option
extern "C" int _4klang_note_buffer;

791
_4klang.inc Normal file
View File

@ -0,0 +1,791 @@
%macro export_func 1
global _%1
_%1:
%endmacro
%define USE_SECTIONS
%define SAMPLE_RATE 44100
%define MAX_INSTRUMENTS 6
%define MAX_VOICES 1
%define HLD 1
%define BPM 165.000000
%define MAX_PATTERNS 25
%define PATTERN_SIZE_SHIFT 5
%define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
%define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
%define SAMPLES_PER_TICK 4009
%define DEF_LFO_NORMALIZE 0.0000623583
%define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
;%define GO4K_USE_16BIT_OUTPUT
;%define GO4K_USE_GROOVE_PATTERN
;%define GO4K_USE_ENVELOPE_RECORDINGS
;%define GO4K_USE_NOTE_RECORDINGS
%define GO4K_CLIP_OUTPUT
%define GO4K_USE_DST
%define GO4K_USE_DLL
%define GO4K_USE_PAN
%define GO4K_USE_GLOBAL_DLL
%define GO4K_USE_ENV_CHECK
%define GO4K_USE_VCO_CHECK
%define GO4K_USE_VCO_PHASE_OFFSET
%define GO4K_USE_VCO_SHAPE
%define GO4K_USE_VCO_MOD_TM
%define GO4K_USE_VCO_MOD_DM
%define GO4K_USE_VCO_MOD_CM
%define GO4K_USE_VCF_CHECK
%define GO4K_USE_VCF_MOD_FM
%define GO4K_USE_VCF_HIGH
%define GO4K_USE_VCF_BAND
%define GO4K_USE_VCF_PEAK
%define GO4K_USE_VCF_STEREO
%define GO4K_USE_DST_CHECK
%define GO4K_USE_DST_SH
%define GO4K_USE_DLL_CHORUS
%define GO4K_USE_DLL_CHORUS_CLAMP
%define GO4K_USE_DLL_DAMP
%define GO4K_USE_DLL_DC_FILTER
%define GO4K_USE_FSTG_CHECK
%define GO4K_USE_WAVESHAPER_CLIP
%define MAX_DELAY 65536
%define MAX_UNITS 64
%define MAX_UNIT_SLOTS 16
%define GO4K_BEGIN_CMDDEF(def_name)
%define GO4K_END_CMDDEF db 0
%define GO4K_BEGIN_PARAMDEF(def_name)
%define GO4K_END_PARAMDEF
GO4K_ENV_ID equ 1
%macro GO4K_ENV 5
db %1
db %2
db %3
db %4
db %5
%endmacro
%define ATTAC(val) val
%define DECAY(val) val
%define SUSTAIN(val) val
%define RELEASE(val) val
%define GAIN(val) val
struc go4kENV_val
.attac resd 1
.decay resd 1
.sustain resd 1
.release resd 1
.gain resd 1
.size
endstruc
struc go4kENV_wrk
.state resd 1
.level resd 1
.gm resd 1
.am resd 1
.dm resd 1
.sm resd 1
.rm resd 1
.size
endstruc
%define ENV_STATE_ATTAC 0
%define ENV_STATE_DECAY 1
%define ENV_STATE_SUSTAIN 2
%define ENV_STATE_RELEASE 3
%define ENV_STATE_OFF 4
GO4K_VCO_ID equ 2
%macro GO4K_VCO 8
db %1
db %2
%ifdef GO4K_USE_VCO_PHASE_OFFSET
db %3
%endif
%ifdef GO4K_USE_VCO_GATE
db %4
%endif
db %5
%ifdef GO4K_USE_VCO_SHAPE
db %6
%endif
db %7
db %8
%endmacro
%define TRANSPOSE(val) val
%define DETUNE(val) val
%define PHASE(val) val
%define GATES(val) val
%define COLOR(val) val
%define SHAPE(val) val
%define FLAGS(val) val
%define SINE 0x01
%define TRISAW 0x02
%define PULSE 0x04
%define NOISE 0x08
%define LFO 0x10
%define GATE 0x20
%define VCO_STEREO 0x40
struc go4kVCO_val
.transpose resd 1
.detune resd 1
%ifdef GO4K_USE_VCO_PHASE_OFFSET
.phaseofs resd 1
%endif
%ifdef GO4K_USE_VCO_GATE
.gate resd 1
%endif
.color resd 1
%ifdef GO4K_USE_VCO_SHAPE
.shape resd 1
%endif
.gain resd 1
.flags resd 1
.size
endstruc
struc go4kVCO_wrk
.phase resd 1
.tm resd 1
.dm resd 1
.fm resd 1
.pm resd 1
.cm resd 1
.sm resd 1
.gm resd 1
.phase2 resd 1
.size
endstruc
GO4K_VCF_ID equ 3
%macro GO4K_VCF 3
db %1
db %2
db %3
%endmacro
%define LOWPASS 0x1
%define HIGHPASS 0x2
%define BANDPASS 0x4
%define BANDSTOP 0x3
%define ALLPASS 0x7
%define PEAK 0x8
%define STEREO 0x10
%define FREQUENCY(val) val
%define RESONANCE(val) val
%define VCFTYPE(val) val
struc go4kVCF_val
.freq resd 1
.res resd 1
.type resd 1
.size
endstruc
struc go4kVCF_wrk
.low resd 1
.high resd 1
.band resd 1
.freq resd 1
.fm resd 1
.rm resd 1
.low2 resd 1
.high2 resd 1
.band2 resd 1
.size
endstruc
GO4K_DST_ID equ 4
%macro GO4K_DST 3
db %1
%ifdef GO4K_USE_DST_SH
db %2
%ifdef GO4K_USE_DST_STEREO
db %3
%endif
%else
%ifdef GO4K_USE_DST_STEREO
db %3
%endif
%endif
%endmacro
%define DRIVE(val) val
%define SNHFREQ(val) val
%define FLAGS(val) val
struc go4kDST_val
.drive resd 1
%ifdef GO4K_USE_DST_SH
.snhfreq resd 1
%endif
.flags resd 1
.size
endstruc
struc go4kDST_wrk
.out resd 1
.snhphase resd 1
.dm resd 1
.sm resd 1
.out2 resd 1
.size
endstruc
GO4K_DLL_ID equ 5
%macro GO4K_DLL 8
db %1
db %2
db %3
%ifdef GO4K_USE_DLL_DAMP
db %4
%endif
%ifdef GO4K_USE_DLL_CHORUS
db %5
db %6
%endif
db %7
db %8
%endmacro
%define PREGAIN(val) val
%define DRY(val) val
%define FEEDBACK(val) val
%define DEPTH(val) val
%define DAMP(val) val
%define DELAY(val) val
%define COUNT(val) val
struc go4kDLL_val
.pregain resd 1
.dry resd 1
.feedback resd 1
%ifdef GO4K_USE_DLL_DAMP
.damp resd 1
%endif
%ifdef GO4K_USE_DLL_CHORUS
.freq resd 1
.depth
%endif
.delay resd 1
.count resd 1
.size
endstruc
struc go4kDLL_wrk
.index resd 1
.store resd 1
.dcin resd 1
.dcout resd 1
%ifdef GO4K_USE_DLL_CHORUS
.phase resd 1
%endif
.buffer resd MAX_DELAY
.size
endstruc
struc go4kDLL_wrk2
.pm resd 1
.fm resd 1
.im resd 1
.dm resd 1
.sm resd 1
.am resd 1
.size
endstruc
GO4K_FOP_ID equ 6
%macro GO4K_FOP 1
db %1
%endmacro
%define OP(val) val
%define FOP_POP 0x1
%define FOP_ADDP 0x2
%define FOP_MULP 0x3
%define FOP_PUSH 0x4
%define FOP_XCH 0x5
%define FOP_ADD 0x6
%define FOP_MUL 0x7
%define FOP_ADDP2 0x8
%define FOP_LOADNOTE 0x9
%define FOP_MULP2 0xa
struc go4kFOP_val
.flags resd 1
.size
endstruc
struc go4kFOP_wrk
.size
endstruc
GO4K_FST_ID equ 7
%macro GO4K_FST 2
db %1
dw %2
%endmacro
%define AMOUNT(val) val
%define DEST(val) val
%define FST_SET 0x0000
%define FST_ADD 0x4000
%define FST_POP 0x8000
struc go4kFST_val
.amount resd 1
.op1 resd 1
.size
endstruc
struc go4kFST_wrk
.size
endstruc
GO4K_PAN_ID equ 8
%macro GO4K_PAN 1
%ifdef GO4K_USE_PAN
db %1
%endif
%endmacro
%define PANNING(val) val
struc go4kPAN_val
%ifdef GO4K_USE_PAN
.panning resd 1
%endif
.size
endstruc
struc go4kPAN_wrk
.pm resd 1
.size
endstruc
GO4K_OUT_ID equ 9
%macro GO4K_OUT 2
db %1
%ifdef GO4K_USE_GLOBAL_DLL
db %2
%endif
%endmacro
%define AUXSEND(val) val
struc go4kOUT_val
.gain resd 1
%ifdef GO4K_USE_GLOBAL_DLL
.auxsend resd 1
%endif
.size
endstruc
struc go4kOUT_wrk
.am resd 1
.gm resd 1
.size
endstruc
GO4K_ACC_ID equ 10
%macro GO4K_ACC 1
db %1
%endmacro
%define OUTPUT 0
%define AUX 8
%define ACCTYPE(val) val
struc go4kACC_val
.acctype resd 1
.size
endstruc
struc go4kACC_wrk
.size
endstruc
%ifdef GO4K_USE_FLD
GO4K_FLD_ID equ 11
%macro GO4K_FLD 1
db %1
%endmacro
%define VALUE(val) val
struc go4kFLD_val
.value resd 1
.size
endstruc
struc go4kFLD_wrk
.vm resd 1
.size
endstruc
%endif
%ifdef GO4K_USE_GLITCH
GO4K_GLITCH_ID equ 12
%macro GO4K_GLITCH 5
db %1
db %2
db %3
db %4
db %5
%endmacro
%define ACTIVE(val) val
%define SLICEFACTOR(val)val
%define PITCHFACTOR(val)val
%define SLICESIZE(val) val
struc go4kGLITCH_val
.active resd 1
.dry resd 1
.dsize resd 1
.dpitch resd 1
.slicesize resd 1
.size
endstruc
struc go4kGLITCH_wrk
.index resd 1
.store resd 1
.slizesize resd 1
.slicepitch resd 1
.unused resd 1
.buffer resd MAX_DELAY
.size
endstruc
struc go4kGLITCH_wrk2
.am resd 1
.dm resd 1
.sm resd 1
.pm resd 1
.size
endstruc
%endif
%ifdef GO4K_USE_FSTG
GO4K_FSTG_ID equ 13
%macro GO4K_FSTG 2
db %1
dw %2
%endmacro
struc go4kFSTG_val
.amount resd 1
.op1 resd 1
.size
endstruc
struc go4kFSTG_wrk
.size
endstruc
%endif
struc go4k_instrument
.release resd 1
.note resd 1
.workspace resd MAX_UNITS*MAX_UNIT_SLOTS
.dlloutl resd 1
.dlloutr resd 1
.outl resd 1
.outr resd 1
.size
endstruc
struc go4k_synth
.instruments resb go4k_instrument.size * MAX_INSTRUMENTS * MAX_VOICES
.global resb go4k_instrument.size * MAX_VOICES
.size
endstruc
%ifdef USE_SECTIONS
section .g4kmuc1 data align=1
%else
section .data align=1
%endif
go4k_patterns
db 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, HLD, HLD, HLD, 57, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, 57, 57, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, 57, 57, HLD, HLD, 57, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0,
db 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, 46, HLD, HLD, HLD, 46, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, 46, HLD, HLD, HLD, HLD, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, 46, 46, HLD, HLD, HLD, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, HLD, HLD, HLD, HLD,
db 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
db 50, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
db 48, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 48, HLD, 50, HLD, 53, HLD,
db 43, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 43, HLD, 45, HLD, 46, HLD, 48, HLD,
db 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 48, HLD, 50, HLD,
db 52, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 45, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 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, 65, 0, 72, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 71, 0,
db 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
db 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD,
db 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD,
db 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD,
db 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD,
db 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, 0,
go4k_patterns_end
%ifdef USE_SECTIONS
section .g4kmuc2 data align=1
%else
section .data
%endif
go4k_pattern_lists
Instrument0List db 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 2, 2, 2, 5, 2, 3, 2, 4, 2, 2, 2, 5, 6,
Instrument1List db 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 8, 10, 8, 9, 8, 11, 8, 9, 8, 10, 8, 9, 8, 11, 6,
Instrument2List db 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 6,
Instrument3List db 13, 14, 15, 16, 17, 18, 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Instrument4List db 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 20, 21, 0,
Instrument5List db 0, 0, 0, 0, 0, 0, 0, 0, 22, 23, 24, 25, 22, 23, 24, 25, 22, 23, 24, 25, 22, 23, 24, 26, 0,
go4k_pattern_lists_end
%ifdef USE_SECTIONS
section .g4kmuc3 data align=1
%else
section .data
%endif
go4k_synth_instructions
GO4K_BEGIN_CMDDEF(Instrument0)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_DST_ID
db GO4K_FOP_ID
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_DST_ID
db GO4K_PAN_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_OUT_ID
db GO4K_ENV_ID
db GO4K_FST_ID
db GO4K_ENV_ID
db GO4K_FST_ID
db GO4K_ENV_ID
db GO4K_FST_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument1)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_DST_ID
db GO4K_FOP_ID
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_FOP_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_PAN_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_OUT_ID
db GO4K_ENV_ID
db GO4K_ENV_ID
db GO4K_FOP_ID
db GO4K_FST_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument2)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_PAN_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument3)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_FST_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FST_ID
db GO4K_FST_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FST_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_VCO_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_FOP_ID
db GO4K_PAN_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument4)
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_FOP_ID
db GO4K_PAN_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Instrument5)
db GO4K_ENV_ID
db GO4K_FST_ID
db GO4K_FST_ID
db GO4K_ENV_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCO_ID
db GO4K_FOP_ID
db GO4K_VCF_ID
db GO4K_VCF_ID
db GO4K_PAN_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
GO4K_BEGIN_CMDDEF(Global)
db GO4K_ACC_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_DLL_ID
db GO4K_FOP_ID
db GO4K_ACC_ID
db GO4K_FOP_ID
db GO4K_OUT_ID
GO4K_END_CMDDEF
go4k_synth_instructions_end
%ifdef USE_SECTIONS
section .g4kmuc4 data align=1
%else
section .data
%endif
go4k_synth_parameter_values
GO4K_BEGIN_PARAMDEF(Instrument0)
GO4K_ENV ATTAC(22),DECAY(64),SUSTAIN(0),RELEASE(0),GAIN(38)
GO4K_VCO TRANSPOSE(77),DETUNE(64),PHASE(19),GATES(0),COLOR(128),SHAPE(66),GAIN(70),FLAGS(SINE)
GO4K_DST DRIVE(78), SNHFREQ(128), FLAGS(0)
GO4K_FOP OP(FOP_MULP)
GO4K_ENV ATTAC(0),DECAY(68),SUSTAIN(0),RELEASE(0),GAIN(70)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(2),GAIN(128),FLAGS(NOISE)
GO4K_FOP OP(FOP_MULP)
GO4K_VCF FREQUENCY(97),RESONANCE(128),VCFTYPE(PEAK)
GO4K_VCF FREQUENCY(108),RESONANCE(128),VCFTYPE(PEAK)
GO4K_FOP OP(FOP_ADDP)
GO4K_VCF FREQUENCY(100),RESONANCE(128),VCFTYPE(PEAK)
GO4K_VCF FREQUENCY(19),RESONANCE(98),VCFTYPE(HIGHPASS)
GO4K_VCF FREQUENCY(15),RESONANCE(128),VCFTYPE(BANDSTOP)
GO4K_VCF FREQUENCY(40),RESONANCE(74),VCFTYPE(BANDSTOP)
GO4K_VCF FREQUENCY(23),RESONANCE(42),VCFTYPE(HIGHPASS)
GO4K_DST DRIVE(97), SNHFREQ(128), FLAGS(0)
GO4K_PAN PANNING(59)
GO4K_DLL PREGAIN(27),DRY(128),FEEDBACK(112),DAMP(0),FREQUENCY(7),DEPTH(70),DELAY(1),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(27),DRY(128),FEEDBACK(112),DAMP(0),FREQUENCY(16),DEPTH(55),DELAY(9),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_OUT GAIN(128), AUXSEND(0)
GO4K_ENV ATTAC(38),DECAY(49),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_FST AMOUNT(70),DEST(1*MAX_UNIT_SLOTS+1+FST_SET+FST_POP)
GO4K_ENV ATTAC(47),DECAY(54),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_FST AMOUNT(19),DEST(7*MAX_UNIT_SLOTS+4+FST_SET+FST_POP)
GO4K_ENV ATTAC(54),DECAY(68),SUSTAIN(70),RELEASE(0),GAIN(128)
GO4K_FST AMOUNT(26),DEST(10*MAX_UNIT_SLOTS+4+FST_SET+FST_POP)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument1)
GO4K_ENV ATTAC(7),DECAY(73),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_VCO TRANSPOSE(90),DETUNE(0),PHASE(10),GATES(0),COLOR(63),SHAPE(94),GAIN(128),FLAGS(TRISAW)
GO4K_DST DRIVE(58), SNHFREQ(100), FLAGS(0)
GO4K_FOP OP(FOP_ADDP)
GO4K_ENV ATTAC(28),DECAY(45),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(99),GAIN(128),FLAGS(NOISE)
GO4K_VCF FREQUENCY(80),RESONANCE(128),VCFTYPE(PEAK)
GO4K_VCF FREQUENCY(75),RESONANCE(87),VCFTYPE(LOWPASS)
GO4K_FOP OP(FOP_MULP)
GO4K_FOP OP(FOP_ADDP)
GO4K_VCF FREQUENCY(11),RESONANCE(128),VCFTYPE(PEAK)
GO4K_VCF FREQUENCY(53),RESONANCE(128),VCFTYPE(BANDSTOP)
GO4K_VCF FREQUENCY(12),RESONANCE(76),VCFTYPE(HIGHPASS)
GO4K_VCF FREQUENCY(11),RESONANCE(70),VCFTYPE(HIGHPASS)
GO4K_PAN PANNING(64)
GO4K_DLL PREGAIN(21),DRY(128),FEEDBACK(20),DAMP(128),FREQUENCY(6),DEPTH(51),DELAY(9),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(20),DRY(128),FEEDBACK(20),DAMP(128),FREQUENCY(2),DEPTH(63),DELAY(1),COUNT(8)
GO4K_OUT GAIN(128), AUXSEND(0)
GO4K_ENV ATTAC(75),DECAY(128),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_ENV ATTAC(49),DECAY(71),SUSTAIN(121),RELEASE(0),GAIN(128)
GO4K_FOP OP(FOP_MULP)
GO4K_FST AMOUNT(0),DEST(1*MAX_UNIT_SLOTS+1+FST_SET+FST_POP)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument2)
GO4K_ENV ATTAC(4),DECAY(53),SUSTAIN(0),RELEASE(0),GAIN(128)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(102),GAIN(128),FLAGS(NOISE)
GO4K_FOP OP(FOP_MULP)
GO4K_VCF FREQUENCY(87),RESONANCE(128),VCFTYPE(HIGHPASS)
GO4K_VCF FREQUENCY(95),RESONANCE(128),VCFTYPE(BANDSTOP)
GO4K_VCF FREQUENCY(89),RESONANCE(71),VCFTYPE(BANDPASS)
GO4K_PAN PANNING(61)
GO4K_DLL PREGAIN(28),DRY(128),FEEDBACK(50),DAMP(29),FREQUENCY(0),DEPTH(0),DELAY(1),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(32),DRY(128),FEEDBACK(40),DAMP(0),FREQUENCY(10),DEPTH(34),DELAY(9),COUNT(8)
GO4K_OUT GAIN(45), AUXSEND(0)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument3)
GO4K_ENV ATTAC(23),DECAY(85),SUSTAIN(113),RELEASE(38),GAIN(119)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
GO4K_FST AMOUNT(52),DEST(11*MAX_UNIT_SLOTS+2+FST_SET)
GO4K_FOP OP(FOP_POP)
GO4K_VCO TRANSPOSE(41),DETUNE(42),PHASE(55),GATES(85),COLOR(54),SHAPE(63),GAIN(128),FLAGS(SINE|LFO)
GO4K_FST AMOUNT(75),DEST(12*MAX_UNIT_SLOTS+2+FST_SET)
GO4K_FST AMOUNT(59),DEST(12*MAX_UNIT_SLOTS+5+FST_SET)
GO4K_FOP OP(FOP_POP)
GO4K_VCO TRANSPOSE(74),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(SINE|LFO)
GO4K_FST AMOUNT(69),DEST(13*MAX_UNIT_SLOTS+2+FST_SET)
GO4K_FOP OP(FOP_POP)
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(22),GATES(85),COLOR(0),SHAPE(64),GAIN(128),FLAGS(TRISAW)
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(87),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW)
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(106),GAIN(128),FLAGS(SINE)
GO4K_FOP OP(FOP_ADDP)
GO4K_FOP OP(FOP_ADDP)
GO4K_VCF FREQUENCY(54),RESONANCE(120),VCFTYPE(LOWPASS|STEREO)
GO4K_VCF FREQUENCY(35),RESONANCE(70),VCFTYPE(BANDSTOP)
GO4K_FOP OP(FOP_MULP)
GO4K_PAN PANNING(63)
GO4K_OUT GAIN(71), AUXSEND(45)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument4)
GO4K_ENV ATTAC(39),DECAY(62),SUSTAIN(0),RELEASE(30),GAIN(71)
GO4K_VCO TRANSPOSE(88),DETUNE(62),PHASE(14),GATES(0),COLOR(53),SHAPE(27),GAIN(72),FLAGS(SINE)
GO4K_VCO TRANSPOSE(88),DETUNE(66),PHASE(64),GATES(0),COLOR(113),SHAPE(64),GAIN(128),FLAGS(SINE)
GO4K_FOP OP(FOP_ADDP)
GO4K_FOP OP(FOP_MULP)
GO4K_PAN PANNING(64)
GO4K_DLL PREGAIN(95),DRY(128),FEEDBACK(83),DAMP(0),FREQUENCY(8),DEPTH(55),DELAY(17),COUNT(1)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(81),DRY(128),FEEDBACK(90),DAMP(0),FREQUENCY(11),DEPTH(48),DELAY(18),COUNT(1)
GO4K_OUT GAIN(65), AUXSEND(52)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Instrument5)
GO4K_ENV ATTAC(11),DECAY(99),SUSTAIN(0),RELEASE(0),GAIN(120)
GO4K_FST AMOUNT(83),DEST(8*MAX_UNIT_SLOTS+4+FST_SET)
GO4K_FST AMOUNT(93),DEST(6*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
GO4K_ENV ATTAC(42),DECAY(0),SUSTAIN(128),RELEASE(39),GAIN(128)
GO4K_VCO TRANSPOSE(76),DETUNE(64),PHASE(8),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(SINE)
GO4K_FOP OP(FOP_ADDP)
GO4K_VCO TRANSPOSE(64),DETUNE(71),PHASE(69),GATES(0),COLOR(73),SHAPE(75),GAIN(64),FLAGS(TRISAW)
GO4K_FOP OP(FOP_MULP)
GO4K_VCF FREQUENCY(39),RESONANCE(82),VCFTYPE(LOWPASS)
GO4K_VCF FREQUENCY(15),RESONANCE(128),VCFTYPE(PEAK)
GO4K_PAN PANNING(64)
GO4K_OUT GAIN(128), AUXSEND(40)
GO4K_END_PARAMDEF
GO4K_BEGIN_PARAMDEF(Global)
GO4K_ACC ACCTYPE(AUX)
GO4K_DLL PREGAIN(45),DRY(128),FEEDBACK(126),DAMP(79),FREQUENCY(7),DEPTH(68),DELAY(1),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_DLL PREGAIN(45),DRY(128),FEEDBACK(124),DAMP(76),FREQUENCY(8),DEPTH(45),DELAY(9),COUNT(8)
GO4K_FOP OP(FOP_XCH)
GO4K_ACC ACCTYPE(OUTPUT)
GO4K_FOP OP(FOP_ADDP2)
GO4K_OUT GAIN(64), AUXSEND(0)
GO4K_END_PARAMDEF
go4k_synth_parameter_values_end
%ifdef USE_SECTIONS
section .g4kmuc5 data align=1
%else
section .data
%endif
%ifdef GO4K_USE_DLL
global _go4k_delay_times
_go4k_delay_times
dw 0
dw 1116
dw 1188
dw 1276
dw 1356
dw 1422
dw 1492
dw 1556
dw 1618
dw 1140
dw 1212
dw 1300
dw 1380
dw 1446
dw 1516
dw 1580
dw 1642
dw 21381
dw 12027
%endif

390
_4klang.yml Normal file
View File

@ -0,0 +1,390 @@
bpm: 165
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]]
- 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]]
- 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]]
- 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]]
- 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]]
rowsperpattern: 16
length: 52
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
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}
- 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}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 28, decay: 45, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 102, shape: 84, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 93, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 63, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 75, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 87, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 66, 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}
- type: filter
id: 15
parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 128, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 71, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 74}
- type: envelope
id: 120
parameters: {attack: 49, decay: 71, gain: 128, release: 0, stereo: 0, sustain: 121}
- type: mulp
id: 121
parameters: {stereo: 0}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- 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}
- type: mulp
id: 130
parameters: {stereo: 0}
- type: filter
id: 131
parameters: {bandpass: 0, frequency: 87, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- 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}
- type: pan
id: 134
parameters: {panning: 61, stereo: 0}
- 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}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 77, dry: 128, feedback: 114, notetracking: 0, pregain: 50, 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}

956
_shader.glsl Normal file
View File

@ -0,0 +1,956 @@
precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
uniform vec2 u_mouse;
uniform sampler2D texture_sampler;
uniform sampler2D texts;
struct Ray {
vec3 rayDir;
vec3 rayOrigin;
vec3 hitPos;
float distance;
bool isHit;
};
mat2 scale(vec2 scale){
return mat2(1. / scale.x, 0.0, 0.0, 1./scale.y);
}
////////////////////////////////////////////////////////////////
//
// HG_SDF
//
// GLSL LIBRARY FOR BUILDING SIGNED DISTANCE BOUNDS
//
// version 2021-07-28
//
// Check https://mercury.sexy/hg_sdf for updates
// and usage examples. Send feedback to spheretracing@mercury.sexy.
//
// Brought to you by MERCURY https://mercury.sexy/
//
//
//
// Released dual-licensed under
// Creative Commons Attribution-NonCommercial (CC BY-NC)
// or
// MIT License
// at your choice.
//
// SPDX-License-Identifier: MIT OR CC-BY-NC-4.0
//
// /////
////////////////////////////////////////////////////////////////
//
// HELPER FUNCTIONS/MACROS
//
////////////////////////////////////////////////////////////////
const float PI = 3.14159265;
const float TAU = (2.*PI);
const float PHI = sqrt(5.)*0.5 + 0.5;
// Sign function that doesn't return 0
float sgn(float x) {
return (x < 0. )? -1. : 1.;
}
vec2 sgn(vec2 v) {
return vec2((v.x<0.)?-1.:1., (v.y<0.)?-1.:1.);
}
float square (float x) {
return x*x;
}
vec2 square (vec2 x) {
return x*x;
}
vec3 square (vec3 x) {
return x*x;
}
float lengthSqr(vec3 x) {
return dot(x, x);
}
// Maximum/minumum elements of a vector
float vmax(vec2 v) {
return max(v.x, v.y);
}
float vmax(vec3 v) {
return max(max(v.x, v.y), v.z);
}
float vmax(vec4 v) {
return max(max(v.x, v.y), max(v.z, v.w));
}
float vmin(vec2 v) {
return min(v.x, v.y);
}
float vmin(vec3 v) {
return min(min(v.x, v.y), v.z);
}
float vmin(vec4 v) {
return min(min(v.x, v.y), min(v.z, v.w));
}
////////////////////////////////////////////////////////////////
//
// PRIMITIVE DISTANCE FUNCTIONS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that is a distance function is called fSomething.
// The first argument is always a point in 2 or 3-space called <p>.
// Unless otherwise noted, (if the object has an intrinsic "up"
// side or direction) the y axis is "up" and the object is
// centered at the origin.
//
////////////////////////////////////////////////////////////////
float fSphere(vec3 p, float r) {
return length(p) - r;
}
// Plane with normal n (n is normalized) at some distance from the origin
float fPlane(vec3 p, vec3 n, float distanceFromOrigin) {
return dot(p, n) + distanceFromOrigin;
}
// Cheap Box: distance to corners is overestimated
float fBoxCheap(vec3 p, vec3 b) { //cheap box
return vmax(abs(p) - b);
}
// Box: correct distance to corners
float fBox(vec3 p, vec3 b) {
vec3 d = abs(p) - b;
return length(max(d, vec3(0))) + vmax(min(d, vec3(0)));
}
// Same as above, but in two dimensions (an endless box)
float fBox2Cheap(vec2 p, vec2 b) {
return vmax(abs(p)-b);
}
float fBox2(vec2 p, vec2 b) {
vec2 d = abs(p) - b;
return length(max(d, vec2(0.))) + vmax(min(d, vec2(0.)));
}
// Endless "corner"
float fCorner (vec2 p) {
return length(max(p, vec2(0.))) + vmax(min(p, vec2(0.)));
}
// Cylinder standing upright on the xz plane
float fCylinder(vec3 p, float r, float height) {
float d = length(p.xz) - r;
d = max(d, abs(p.y) - height);
return d;
}
// Capsule: A Cylinder with round caps on both sides
float fCapsule(vec3 p, float r, float c) {
return mix(length(p.xz) - r, length(vec3(p.x, abs(p.y) - c, p.z)) - r, step(c, abs(p.y)));
}
// Distance to line segment between <a> and <b>, used for fCapsule() version 2below
float fLineSegment(vec3 p, vec3 a, vec3 b) {
vec3 ab = b - a;
float t = clamp( dot(p - a, ab) / dot(ab, ab), 0., 1. );
return length((ab*t + a) - p);
}
// Capsule version 2: between two end points <a> and <b> with radius r
float fCapsule(vec3 p, vec3 a, vec3 b, float r) {
return fLineSegment(p, a, b) - r;
}
// Torus in the XZ-plane
float fTorus(vec3 p, float smallRadius, float largeRadius) {
return length(vec2(length(p.xz) - largeRadius, p.y)) - smallRadius;
}
// A circle line. Can also be used to make a torus by subtracting the smaller radius of the torus.
float fCircle(vec3 p, float r) {
float l = length(p.xz) - r;
return length(vec2(p.y, l));
}
// A circular disc with no thickness (i.e. a cylinder with no height).
// Subtract some value to make a flat disc with rounded edge.
float fDisc(vec3 p, float r) {
float l = length(p.xz) - r;
return l < 0. ? abs(p.y) : length(vec2(p.y, l));
}
// Hexagonal prism, circumcircle variant
float fHexagonCircumcircle(vec3 p, vec2 h) {
vec3 q = abs(p);
return max(q.y - h.y, max(q.x*sqrt(3.)*0.5 + q.z*0.5, q.z) - h.x);
//this is mathematically equivalent to this line, but less efficient:
//return max(q.y - h.y, max(dot(vec2(cos(PI/3), sin(PI/3)), q.zx), q.z) - h.x);
}
// Hexagonal prism, incircle variant
float fHexagonIncircle(vec3 p, vec2 h) {
return fHexagonCircumcircle(p, vec2(h.x*sqrt(3.)*0.5, h.y));
}
// Cone with correct distances to tip and base circle. Y is up, 0 is in the middle of the base.
float fCone(vec3 p, float radius, float height) {
vec2 q = vec2(length(p.xz), p.y);
vec2 tip = q - vec2(0, height);
vec2 mantleDir = normalize(vec2(height, radius));
float mantle = dot(tip, mantleDir);
float d = max(mantle, -q.y);
float projected = dot(tip, vec2(mantleDir.y, -mantleDir.x));
// distance to tip
if ((q.y > height) && (projected < 0.)) {
d = max(d, length(tip));
}
// distance to base ring
if ((q.x > radius) && (projected > length(vec2(height, radius)))) {
d = max(d, length(q - vec2(radius, 0)));
}
return d;
}
////////////////////////////////////////////////////////////////
//
// DOMAIN MANIPULATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that modifies the domain is named pSomething.
//
// Many operate only on a subset of the three dimensions. For those,
// you must choose the dimensions that you want manipulated
// by supplying e.g. <p.x> or <p.zx>
//
// <inout p> is always the first argument and modified in place.
//
// Many of the operators partition space into cells. An identifier
// or cell index is returned, if possible. This return value is
// intended to be optionally used e.g. as a random seed to change
// parameters of the distance functions inside the cells.
//
// Unless stated otherwise, for cell index 0, <p> is unchanged and cells
// are centered on the origin so objects don't have to be moved to fit.
//
//
////////////////////////////////////////////////////////////////
// Rotate around a coordinate axis (i.e. in a plane perpendicular to that axis) by angle <a>.
// Read like this: R(p.xz, a) rotates "x towards z".
// This is fast if <a> is a compile-time constant and slower (but still practical) if not.
void pR(inout vec2 p, float a) {
p = cos(a)*p + sin(a)*vec2(p.y, -p.x);
}
// Shortcut for 45-degrees rotation
void pR45(inout vec2 p) {
p = (p + vec2(p.y, -p.x))*sqrt(0.5);
}
// Repeat space along one axis. Use like this to repeat along the x axis:
// <float cell = pMod1(p.x,5);> - using the return value is optional.
float pMod1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Same, but mirror every second cell so they match at the boundaries
float pModMirror1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize,size) - halfsize;
p *= mod(c, 2.0)*2. - 1.;
return c;
}
// Repeat the domain only in positive direction. Everything in the negative half-space is unchanged.
float pModSingle1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
if (p >= 0.)
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Repeat only a few times: from indices <start> to <stop> (similar to above, but more flexible)
float pModInterval1(inout float p, float size, float start, float stop) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p+halfsize, size) - halfsize;
if (c > stop) { //yes, this might not be the best thing numerically.
p += size*(c - stop);
c = stop;
}
if (c <start) {
p += size*(c - start);
c = start;
}
return c;
}
// Repeat around the origin by a fixed angle.
// For easier use, num of repetitions is use to specify the angle.
float pModPolar(inout vec2 p, float repetitions) {
float angle = 2.*PI/repetitions;
float a = atan(p.y, p.x) + angle/2.;
float r = length(p);
float c = floor(a/angle);
a = mod(a,angle) - angle/2.;
p = vec2(cos(a), sin(a))*r;
// For an odd number of repetitions, fix cell index of the cell in -x direction
// (cell index would be e.g. -5 and 5 in the two halves of the cell):
if (abs(c) >= (repetitions/2.)) c = abs(c);
return c;
}
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5,size) - size*0.5;
return c;
}
// Same, but mirror every second cell so all boundaries match
vec2 pModMirror2(inout vec2 p, vec2 size) {
vec2 halfsize = size*0.5;
vec2 c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
p *= mod(c,vec2(2.))*2. - vec2(1);
return c;
}
// Same, but mirror every second cell at the diagonal as well
vec2 pModGrid2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
p *= mod(c,vec2(2.))*2. - vec2(1.);
p -= size/2.;
if (p.x > p.y) p.xy = p.yx;
return floor(c/2.);
}
// Repeat in three dimensions
vec3 pMod3(inout vec3 p, vec3 size) {
vec3 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
return c;
}
// Mirror at an axis-aligned plane which is at a specified distance <dist> from the origin.
float pMirror (inout float p, float dist) {
float s = sgn(p);
p = abs(p)-dist;
return s;
}
// Mirror in both dimensions and at the diagonal, yielding one eighth of the space.
// translate by dist before mirroring.
vec2 pMirrorOctant (inout vec2 p, vec2 dist) {
vec2 s = sgn(p);
pMirror(p.x, dist.x);
pMirror(p.y, dist.y);
if (p.y > p.x)
p.xy = p.yx;
return s;
}
// Reflect space at a plane
float pReflect(inout vec3 p, vec3 planeNormal, float offset) {
float t = dot(p, planeNormal)+offset;
if (t < 0.) {
p = p - (2.*t)*planeNormal;
}
return sgn(t);
}
////////////////////////////////////////////////////////////////
//
// OBJECT COMBINATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// We usually need the following boolean operators to combine two objects:
// Union: OR(a,b)
// Intersection: AND(a,b)
// Difference: AND(a,!b)
// (a and b being the distances to the objects).
//
// The trivial implementations are min(a,b) for union, max(a,b) for intersection
// and max(a,-b) for difference. To combine objects in more interesting ways to
// produce rounded edges, chamfers, stairs, etc. instead of plain sharp edges we
// can use combination operators. It is common to use some kind of "smooth minimum"
// instead of min(), but we don't like that because it does not preserve Lipschitz
// continuity in many cases.
//
// Naming convention: since they return a distance, they are called fOpSomething.
// The different flavours usually implement all the boolean operators above
// and are called fOpUnionRound, fOpIntersectionRound, etc.
//
// The basic idea: Assume the object surfaces intersect at a right angle. The two
// distances <a> and <b> constitute a new local two-dimensional coordinate system
// with the actual intersection as the origin. In this coordinate system, we can
// evaluate any 2D distance function we want in order to shape the edge.
//
// The operators below are just those that we found useful or interesting and should
// be seen as examples. There are infinitely more possible operators.
//
// They are designed to actually produce correct distances or distance bounds, unlike
// popular "smooth minimum" operators, on the condition that the gradients of the two
// SDFs are at right angles. When they are off by more than 30 degrees or so, the
// Lipschitz condition will no longer hold (i.e. you might get artifacts). The worst
// case is parallel surfaces that are close to each other.
//
// Most have a float argument <r> to specify the radius of the feature they represent.
// This should be much smaller than the object size.
//
// Some of them have checks like "if ((-a < r) && (-b < r))" that restrict
// their influence (and computation cost) to a certain area. You might
// want to lift that restriction or enforce it. We have left it as comments
// in some cases.
//
// usage example:
//
// float fTwoBoxes(vec3 p) {
// float box0 = fBox(p, vec3(1));
// float box1 = fBox(p-vec3(1), vec3(1));
// return fOpUnionChamfer(box0, box1, 0.2);
// }
//
////////////////////////////////////////////////////////////////
float fOpUnion( float d1, float d2 )
{
return min(d1,d2);
}
float fOpSubtraction( float d1, float d2 )
{
return max(-d1,d2);
}
float opIntersection( float d1, float d2 )
{
return max(d1,d2);
}
float opXor(float d1, float d2 )
{
return max(min(d1,d2),-max(d1,d2));
}
// The "Chamfer" flavour makes a 45-degree chamfered edge (the diagonal of a square of size <r>):
float fOpUnionChamfer(float a, float b, float r) {
return min(min(a, b), (a - r + b)*sqrt(0.5));
}
// Intersection has to deal with what is normally the inside of the resulting object
// when using union, which we normally don't care about too much. Thus, intersection
// implementations sometimes differ from union implementations.
float fOpIntersectionChamfer(float a, float b, float r) {
return max(max(a, b), (a + r + b)*sqrt(0.5));
}
// Difference can be built from Intersection or Union:
float fOpDifferenceChamfer (float a, float b, float r) {
return fOpIntersectionChamfer(a, -b, r);
}
// The "Round" variant uses a quarter-circle to join the two objects smoothly:
float fOpUnionRound(float a, float b, float r) {
vec2 u = max(vec2(r - a,r - b), vec2(0));
return max(r, min (a, b)) - length(u);
}
float fOpIntersectionRound(float a, float b, float r) {
vec2 u = max(vec2(r + a,r + b), vec2(0));
return min(-r, max (a, b)) + length(u);
}
float fOpDifferenceRound (float a, float b, float r) {
return fOpIntersectionRound(a, -b, r);
}
// The "Columns" flavour makes n-1 circular columns at a 45 degree angle:
float fOpUnionColumns(float a, float b, float r, float n) {
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.x -= sqrt(2.)/2.*r;
p.x += columnradius*sqrt(2.);
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
// At this point, we have turned 45 degrees and moved at a point on the
// diagonal that we want to place the columns on.
// Now, repeat the domain along this direction and place a circle.
pMod1(p.y, columnradius*2.);
float result = length(p) - columnradius;
result = min(result, p.x);
result = min(result, a);
return min(result, b);
} else {
return min(a, b);
}
}
float fOpDifferenceColumns(float a, float b, float r, float n) {
a = -a;
float m = min(a, b);
//avoid the expensive computation where not needed (produces discontinuity though)
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/n/2.0;
columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.y += columnradius;
p.x -= sqrt(2.)/2.*r;
p.x += -columnradius*sqrt(2.)/2.;
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
pMod1(p.y,columnradius*2.);
float result = -length(p) + columnradius;
result = max(result, p.x);
result = min(result, a);
return -min(result, b);
} else {
return -m;
}
}
float fOpIntersectionColumns(float a, float b, float r, float n) {
return fOpDifferenceColumns(a,-b,r, n);
}
// The "Stairs" flavour produces n-1 steps of a staircase:
// much less stupid version by paniq
float fOpUnionStairs(float a, float b, float r, float n) {
float s = r/n;
float u = b-r;
return min(min(a,b), 0.5 * (u + a + abs ((mod (u - a + s, 2. * s)) - s)));
}
// We can just call Union since stairs are symmetric.
float fOpIntersectionStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, -b, r, n);
}
float fOpDifferenceStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, b, r, n);
}
// Similar to fOpUnionRound, but more lipschitz-y at acute angles
// (and less so at 90 degrees). Useful when fudging around too much
// by MediaMolecule, from Alex Evans' siggraph slides
float fOpUnionSoft(float a, float b, float r) {
float e = max(r - abs(a - b), 0.);
return min(a, b) - e*e*0.25/r;
}
// produces a cylindical pipe that runs along the intersection.
// No objects remain, only the pipe. This is not a boolean operator.
float fOpPipe(float a, float b, float r) {
return length(vec2(a, b)) - r;
}
// first object gets a v-shaped engraving where it intersect the second
float fOpEngrave(float a, float b, float r) {
return max(a, (a + r - abs(b))*sqrt(0.5));
}
// first object gets a capenter-style groove cut out
float fOpGroove(float a, float b, float ra, float rb) {
return max(a, min(a + ra, rb - abs(b)));
}
// first object gets a capenter-style tongue attached
float fOpTongue(float a, float b, float ra, float rb) {
return min(a, max(a - ra, abs(b) - rb));
}
//#endSection End of library
// https://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl
// golden_noise
float noise(in vec2 xy, in float seed){
return fract(tan(distance(xy*PHI, xy)*seed)*xy.x);
}
vec3 rnd23(vec2 p)
{
vec3 p3 = fract(p.xyx * vec3(.1031, .1030, .0973));
p3 += dot(p3, p3.yxz+33.33);
return fract((p3.xxy+p3.yzz)*p3.zyx);
}
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
float opExtrusion( in vec3 p, in float sdf, in float h )
{
vec2 w = vec2( sdf, abs(p.z) - h);
return min(max(w.x,w.y),0.0) + length(max(w,0.0));
}
float sdCog2d(vec2 pos) {
float r = length(pos)*2.;
float a = atan(pos.y,pos.x);
float f = 1. - smoothstep(-0.2, .8, sin(a * 12.))*0.14;
f = smoothstep(f,f + 2.,r);
return f;
}
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 sdHex(vec3 pos, float i, float angle) {
vec3 po = pos;
po.xz *= Rot(angle);
po.yz *= Rot(angle);
pR(po.yz, PI/2.);
float d1 = fHexagonCircumcircle(po, vec2(0.5+i, .1));
float d2 = fHexagonCircumcircle(po, vec2(0.2+i, .1));
return fOpDifferenceRound(d1,d2,0.1);
}
/*
* Scene geometry
* returns vec2(distance, material.id)
*/
vec2 mapScene(in vec3 pos) {
float mat = 0.;
float d = 1e10;
float r = 10.;
float box1 = fBoxCheap(pos, vec3(r));
float box2 = fBoxCheap(pos - vec3(0., 0., 15.), vec3(r - .5));
float room = fOpSubtraction(box2, box1);
d = min(d,room);
if ( d == room) mat = 1.;
/* float c2 = sdCog(pos, 0.);
d = min(d, c2);
if ( d == c2) mat = 4.;
/*
float c3 = fBox(pos+vec3(0.0, .0, 0.), vec3(1., 1.,1.));
d = min(d, c3);
if ( d == c3) mat = 4.;
*/
return vec2(d, mat);
}
vec3 castRay(vec3 ro, vec3 rd, inout vec3 pos) {
float t = 0.0;
float mat = 0.;
float hit = 0.;
for(int i=0; i < 200; i++) {
pos = ro + rd * t;
vec2 res = mapScene(pos);
t += res.x;
mat = res.y;
if (t > 100.) break;
if (res.x < abs(0.001*t) ) {
hit = 1.;
break;
}
}
if (t > 100.) t = -1.0;
return vec3(t, mat, hit);
}
vec3 castReflectedRay(vec3 ro, vec3 rd, vec3 pos) {
float t = 0.0;
float mat = 0.;
float hit = 0.;
for(int i=0; i < 50; i++) {
pos = ro + rd * t;
vec2 res = mapScene(pos);
t += res.x;
mat = res.y;
if (t > 40.) break;
if (res.x < abs(0.001*t) ) {
hit = 1.;
break;
}
}
if (t > 40.) t = -1.0;
return vec3(t, mat, hit);
}
float softshadow( in vec3 ro, in vec3 rd, float mint, float maxt, float w )
{
float res = 1.0;
float t = mint;
for( int i=0; i<40; i++ )
{
if (t > maxt) break;
float h = mapScene(ro + t*rd).x;
res = min( res, h/(w*t) );
t += clamp(h, 0.005, 0.50);
if( res < -1.0 || t>maxt ) break;
}
res = max(res,-1.0);
return 0.25*(1.0+res)*(1.0+res)*(2.0-res);
}
vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.001, 0.);
vec3 n = vec3( mapScene(pos+e.xyy).x - mapScene(pos-e.xyy).x,
mapScene(pos+e.yxy).x - mapScene(pos-e.yxy).x,
mapScene(pos+e.yyx).x - mapScene(pos-e.yyx).x
);
return normalize(n);
}
vec3 fresnel( vec3 F0, vec3 h, vec3 l ) {
return F0 + ( 1.0 - F0 ) * pow( clamp( 1.0 - dot( h, l ), 0.0, 1.0 ), 5.0 );
}
// https://suricrasia.online/blog/shader-functions/
vec3 eRot(vec3 p, vec3 ax, float ro) {
return mix(dot(ax,p)*ax, p, cos(ro)) + sin(ro)*cross(ax,p);
}
vec3 addPointLight(vec3 light_pos, vec3 light_color, float shininess, vec3 v, vec3 dir, vec3 n, float occ) {
vec3 Ks = vec3( .5454 );
vec3 Kd = vec3( .9 );
vec3 ref = reflect( dir, n );
vec3 vl = normalize( v );
vec3 diffuse = Kd * vec3( max( 0.0, dot( vl, n ) ) );
vec3 specular = vec3( max( 0.0, dot( vl, ref ) ) );
vec3 F = fresnel( Ks, normalize( vl - dir ), vl );//*occ;
float shadow = softshadow(v+n*0.01,light_pos, .01, 30., 18.);
specular = pow( specular, vec3( shininess ) );//*occ;
return light_color * shadow * occ; //* mix( diffuse, specular, F );// * shadow;
}
float getAmbientOcc(vec3 p, vec3 n) {
float occ = 0.;
float weight = 0.5;
for (int i = 0; i < 8; i++) {
float len = 0.01 + 0.02 * float(i*i);
float dist = mapScene(p+n*len).x;
occ += (len - dist) * weight;
weight *=0.8;
}
return 1.0 - clamp(0.5 * occ, 0., 1.);
}
vec3 shading(vec3 p, vec3 nor, vec3 dir, float material) {
float shininess = 1.;
float occ = getAmbientOcc(p,nor);
vec3 outMaterial = vec3(0.1529, 0.1529, 0.1529);
if (material == 0.) {
outMaterial = vec3(0.1216, 0.098, 0.1137);
shininess = 1.5;
} else if (material == 1.) {
outMaterial = vec3(0.549, 0.549, 0.5529);
shininess = 1.0;
} else if (material == 2.) {
outMaterial = vec3(0.5804, 0.9647, 1.0);
shininess = 1.;
} else if (material == 3.) {
outMaterial = vec3(0.0, 0.0, 0.0);
shininess = 100.;
} else if (material == 4.) {
outMaterial = vec3(0.9961, 1.0, 0.9922);
shininess = .3;
}
vec3 lights = vec3(0.);
lights += addPointLight(vec3( 1., 0., 10. ),vec3(0.9882, 0.9882, 0.9882)*3., shininess, p, dir, nor, occ);
//lights += addPointLight(vec3( -2.,4., 1. ),vec3(0.04, 0.2, 0.71)*1., shininess, v, dir, n, occ);
// lights += addPointLight(vec3( 2., -1.0, -1.0 ),vec3(0.12, 0.51, 0.63)*2., shininess, v,dir,n,occ );
vec3 lightDir = vec3(0. , 5., 10.);
float sun_dif = clamp(dot(nor, lightDir), 0., 1.);
float shadow = softshadow(p+nor*0.01,lightDir, .01, 30., 18.);
// lights += vec3(0.6627, 0.7098, 0.8863) * sun_dif*shadow*occ; //* shadow; //* mix( vec3(sun_dif), specular, F )
// final += texture( iChannel0, ref ).rgb * fresnel( Ks, n, -dir );
// vec3 col = vec3(0.4)* ref.x;
float ind = clamp( dot( nor, normalize(lightDir*vec3(-1.0,.0,-1.0)) ), 0.0, 1.0 );
// lights += vec3(0.1333, 0.1333, 0.1216) * ind *occ;
return outMaterial * max(vec3(0.), lights);
}
vec3 postProcess(vec3 col) {
// float random = noise(gl_FragCoord.xy, 0.01+u_time);
// float random2 = noise(gl_FragCoord.xy, .2+u_time);
//col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither
// Normalized pixel coordinates (from 0 to 1)
vec2 screenCoord = gl_FragCoord.xy/u_resolution.xy;
// Vignette
float radius = 0.8;
float d = smoothstep(radius, radius-0.4, length(screenCoord-vec2(0.5)));
col = mix(col, col * d, .9);
// Contrast
float constrast = .5;
col = mix(col, smoothstep(0.0, 1.0, col), constrast);
// Colour mapping
col *= vec3(1.0, 1.0, 1.0);
// gamma
col = pow( col, vec3(1.0/2.2) );
return col;
}
mat3 getCamera(vec3 camPosition, vec3 lookAt) {
vec3 camF = normalize(lookAt - camPosition);
vec3 camR = normalize(cross(vec3(0., 1., 0.), camF));
vec3 camU = cross(camF, camR);
return mat3(camR, camU, camF);
}
vec3 applyFog(vec3 col, float t, vec3 rd, vec3 lightDir, float b ) {
float fogAmount = 1.0 - exp(-t*b);
float sunAmount = max( dot(rd, lightDir), 0.0 );
vec3 fogColor = mix( vec3(0.3686, 0.2431, 0.4392), // blue
vec3(0.4, 0.7294, 0.9216), // yellow
pow(sunAmount,8.0) );
return mix( col, fogColor, fogAmount );
}
/**
* renders the scene
* @param uv uv coordinate from gl_fragCoord
*/
vec3 render(vec2 uv) {
// camera
vec3 camPos = vec3( sin(u_time)*2., 10., 30.);
vec3 lookAt = vec3(0., 0., 0.);
vec3 rayDir = getCamera(camPos, lookAt) * normalize(vec3(uv, 1.2));
vec3 hitPos = vec3(0.);
vec3 t = castRay(camPos, rayDir, hitPos);
vec3 rd = rayDir;
vec3 col = vec3(0.051, 0.0667, 0.1529);
if (t.x > 0.) {
vec3 nor = calcNormal(hitPos);
col = shading(hitPos, nor, rayDir , t.y);
// float fogAmount = 0.04;
// col = col*exp(-t.x*fogAmount) + applyFog(col, t.x, rd, vec3(0., .3, -1.), fogAmount) * (1.0-exp(-t.x*fogAmount));
/* rayDir = normalize(reflect(rayDir, nor));
vec3 rayOrigin = hitPos + (rayDir * 0.01);
vec3 t2 = castReflectedRay(rayOrigin, rayDir, hitPos);
if (t2.z > 0.) {
hitPos = rayOrigin + rayDir * t2.x;
nor = calcNormal(hitPos);
col += 0.1 * shading(hitPos, nor, rayDir , t2.y);
/* rayDir = normalize(reflect(rayDir, nor));
rayOrigin = hitPos + (rayDir * 0.01);
vec3 t3 = castReflectedRay(rayOrigin, rayDir, hitPos);
if (t3.z > 0.) {
hitPos = rayOrigin + rayDir * t3.x;
nor = calcNormal(hitPos);
col += 0.05 * shading(hitPos, nor, rayDir , t3.y);
} */
// }
}
// pixelColor*exp(-distance*b) + fogColor*(1.0-exp(-distance*b));
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()
{
vec3 finalColor = vec3(0.);
/*
const float AA_SIZE = 1.;
float count = 0.0;
for (float aaY = 0.0; aaY < AA_SIZE; aaY++) {
for (float aaX = 0.0; aaX < AA_SIZE; aaX++) {
finalColor += render(getUV(vec2( aaX, aaY)));
count += 1.0;
}
}
finalColor /= count; */
finalColor += render(getUV(vec2( 0., 0.)));
finalColor = postProcess(finalColor);
// fade in at the beginning
// finalColor*=vec3(clamp((u_time-.5)*0.35,0., 1.));
// fade out at the end
// finalColor*=vec3(clamp((120.-u_time)*.35, 0., 1.));
gl_FragColor = vec4(finalColor, 1.);
}

View File

@ -3,34 +3,34 @@
# Base configuration file
########### Music #############
MUSIC_4KLANG_INC_FILE=
MUSIC_4KLANG_INC_FILE=4klang.inc
MUSIC_BEATS_PER_BAR=4.0
########### Visuals ############
SHADER_FILE=shader.glsl
RESOLUTION_X=1920
RESOLUTION_X=1980
RESOLUTION_Y=1080
USE_TIME_UNIFORM=1
TIME_UNIFORM_NAME='time'
TIME_UNIFORM_NAME='u_time'
USE_RESOLUTION_UNIFORM=1
RESOLUTION_UNIFORM_NAME='resolution'
RESOLUTION_UNIFORM_NAME='u_resolution'
# Frame-to-texture, mipmaps
TWO_PASS_RENDERING=1
TWO_PASS_RENDERING=0
FRAME_TO_TEXTURE=0
USE_MIPMAP=0
SECOND_PASS_NEGATIVE_TIME=1
SECOND_PASS_NEGATIVE_TIME=0
# Texts
USE_TEXTS=1
USE_TEXTS_UNIFORM=1
# Texts
USE_TEXTS=0
USE_TEXTS_UNIFORM=0
TEXTS_UNIFORM_NAME='texts'
TEXT_BITMAP_RESOLUTION_X=1024
TEXT_BITMAP_RESOLUTION_Y=1024
TEXT_FONT_NAME='Arial'
TEXT_FONT_SIZE=120
TEXT_BITMAP_RESOLUTION_X=2048
TEXT_BITMAP_RESOLUTION_Y=512
TEXT_FONT_NAME='Segoe UI Black'
TEXT_FONT_SIZE=32
TEXT_FONT_STRIKEOUT=0
TEXT_FONT_UNDERLINE=0
TEXT_FONT_ITALIC=0
@ -39,33 +39,31 @@ TEXT_FONT_ORIENTATION=0
TEXT_FONT_ESCAPEMENT=0
TEXT_FONT_WIDTH=0
TEXT_CHARACTER_EXTRA_SPACING=0
USE_WIDECHAR_TEXTS=0
USE_WIDECHAR_TEXTS=1
########### Time base ###########
USE_TIME_DIVIDER_IN_X86_CODE=1
TIME_DIVIDER=88200.000
TIME_DIVIDER=91241.383
TIME_BASE=bars
AUDIO_DELAY=2048
PROD_END_TIME=4411648
PROD_END_TIME=2830240
########### Final product ###########
# The name of the final EXE
OUTPUT_EXE_NAME=testing.exe
OUTPUT_EXE_NAME=4k_test.exe
# this is just the name/text of the GUI option, not the name of the linker executable
EXE_LINKER_PROGRAM=Crinkler
EXE_LINKER_PROGRAM=GNU ld
QUOTE=\"
CRINKLER_ORDERTRIES=4000
CRINKLER_ORDERTRIES=100
AUDIO_BUFFER_ALLOCATED_LENGTH=4411648
AUDIO_BUFFER_ALLOCATED_LENGTH=2830240
AUDIO_SAMPLING_RATE=44100
LOOP_END=5.0
LOOP_START=3.0
LOOP_END=28.0
LOOP_START=24.0
LOOP_ENABLED=0
TIME_DIVIDER_INT=88200
TIME_DIVIDER_INT=91241

779
cogs.frag Normal file
View File

@ -0,0 +1,779 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform float u_time;
uniform sampler2D texture_sampler;
uniform sampler2D texts;
////////////////////////////////////////////////////////////////
//
// HG_SDF
//
// GLSL LIBRARY FOR BUILDING SIGNED DISTANCE BOUNDS
//
// version 2021-07-28
//
// Check https://mercury.sexy/hg_sdf for updates
// and usage examples. Send feedback to spheretracing@mercury.sexy.
//
// Brought to you by MERCURY https://mercury.sexy/
//
//
//
// Released dual-licensed under
// Creative Commons Attribution-NonCommercial (CC BY-NC)
// or
// MIT License
// at your choice.
//
// SPDX-License-Identifier: MIT OR CC-BY-NC-4.0
//
// /////
////////////////////////////////////////////////////////////////
//
// HELPER FUNCTIONS/MACROS
//
////////////////////////////////////////////////////////////////
#define PI 3.14159265
#define TAU (2*PI)
#define PHI (sqrt(5)*0.5 + 0.5)
// Sign function that doesn't return 0
float sgn(float x) {
return (x < 0. )? -1. : 1.;
}
vec2 sgn(vec2 v) {
return vec2((v.x<0.)?-1.:1., (v.y<0.)?-1.:1.);
}
float square (float x) {
return x*x;
}
vec2 square (vec2 x) {
return x*x;
}
vec3 square (vec3 x) {
return x*x;
}
float lengthSqr(vec3 x) {
return dot(x, x);
}
// Maximum/minumum elements of a vector
float vmax(vec2 v) {
return max(v.x, v.y);
}
float vmax(vec3 v) {
return max(max(v.x, v.y), v.z);
}
float vmax(vec4 v) {
return max(max(v.x, v.y), max(v.z, v.w));
}
float vmin(vec2 v) {
return min(v.x, v.y);
}
float vmin(vec3 v) {
return min(min(v.x, v.y), v.z);
}
float vmin(vec4 v) {
return min(min(v.x, v.y), min(v.z, v.w));
}
////////////////////////////////////////////////////////////////
//
// PRIMITIVE DISTANCE FUNCTIONS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that is a distance function is called fSomething.
// The first argument is always a point in 2 or 3-space called <p>.
// Unless otherwise noted, (if the object has an intrinsic "up"
// side or direction) the y axis is "up" and the object is
// centered at the origin.
//
////////////////////////////////////////////////////////////////
float fSphere(vec3 p, float r) {
return length(p) - r;
}
// Plane with normal n (n is normalized) at some distance from the origin
float fPlane(vec3 p, vec3 n, float distanceFromOrigin) {
return dot(p, n) + distanceFromOrigin;
}
// Cheap Box: distance to corners is overestimated
float fBoxCheap(vec3 p, vec3 b) { //cheap box
return vmax(abs(p) - b);
}
// Box: correct distance to corners
float fBox(vec3 p, vec3 b) {
vec3 d = abs(p) - b;
return length(max(d, vec3(0))) + vmax(min(d, vec3(0)));
}
// Same as above, but in two dimensions (an endless box)
float fBox2Cheap(vec2 p, vec2 b) {
return vmax(abs(p)-b);
}
float fBox2(vec2 p, vec2 b) {
vec2 d = abs(p) - b;
return length(max(d, vec2(0.))) + vmax(min(d, vec2(0.)));
}
// Endless "corner"
float fCorner (vec2 p) {
return length(max(p, vec2(0.))) + vmax(min(p, vec2(0.)));
}
// Cylinder standing upright on the xz plane
float fCylinder(vec3 p, float r, float height) {
float d = length(p.xz) - r;
d = max(d, abs(p.y) - height);
return d;
}
// Capsule: A Cylinder with round caps on both sides
float fCapsule(vec3 p, float r, float c) {
return mix(length(p.xz) - r, length(vec3(p.x, abs(p.y) - c, p.z)) - r, step(c, abs(p.y)));
}
// Distance to line segment between <a> and <b>, used for fCapsule() version 2below
float fLineSegment(vec3 p, vec3 a, vec3 b) {
vec3 ab = b - a;
float t = clamp( dot(p - a, ab) / dot(ab, ab), 0., 1. );
return length((ab*t + a) - p);
}
// Capsule version 2: between two end points <a> and <b> with radius r
float fCapsule(vec3 p, vec3 a, vec3 b, float r) {
return fLineSegment(p, a, b) - r;
}
// Torus in the XZ-plane
float fTorus(vec3 p, float smallRadius, float largeRadius) {
return length(vec2(length(p.xz) - largeRadius, p.y)) - smallRadius;
}
// A circle line. Can also be used to make a torus by subtracting the smaller radius of the torus.
float fCircle(vec3 p, float r) {
float l = length(p.xz) - r;
return length(vec2(p.y, l));
}
// A circular disc with no thickness (i.e. a cylinder with no height).
// Subtract some value to make a flat disc with rounded edge.
float fDisc(vec3 p, float r) {
float l = length(p.xz) - r;
return l < 0. ? abs(p.y) : length(vec2(p.y, l));
}
// Hexagonal prism, circumcircle variant
float fHexagonCircumcircle(vec3 p, vec2 h) {
vec3 q = abs(p);
return max(q.y - h.y, max(q.x*sqrt(3.)*0.5 + q.z*0.5, q.z) - h.x);
//this is mathematically equivalent to this line, but less efficient:
//return max(q.y - h.y, max(dot(vec2(cos(PI/3), sin(PI/3)), q.zx), q.z) - h.x);
}
// Hexagonal prism, incircle variant
float fHexagonIncircle(vec3 p, vec2 h) {
return fHexagonCircumcircle(p, vec2(h.x*sqrt(3.)*0.5, h.y));
}
// Cone with correct distances to tip and base circle. Y is up, 0 is in the middle of the base.
float fCone(vec3 p, float radius, float height) {
vec2 q = vec2(length(p.xz), p.y);
vec2 tip = q - vec2(0, height);
vec2 mantleDir = normalize(vec2(height, radius));
float mantle = dot(tip, mantleDir);
float d = max(mantle, -q.y);
float projected = dot(tip, vec2(mantleDir.y, -mantleDir.x));
// distance to tip
if ((q.y > height) && (projected < 0.)) {
d = max(d, length(tip));
}
// distance to base ring
if ((q.x > radius) && (projected > length(vec2(height, radius)))) {
d = max(d, length(q - vec2(radius, 0)));
}
return d;
}
////////////////////////////////////////////////////////////////
//
// DOMAIN MANIPULATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that modifies the domain is named pSomething.
//
// Many operate only on a subset of the three dimensions. For those,
// you must choose the dimensions that you want manipulated
// by supplying e.g. <p.x> or <p.zx>
//
// <inout p> is always the first argument and modified in place.
//
// Many of the operators partition space into cells. An identifier
// or cell index is returned, if possible. This return value is
// intended to be optionally used e.g. as a random seed to change
// parameters of the distance functions inside the cells.
//
// Unless stated otherwise, for cell index 0, <p> is unchanged and cells
// are centered on the origin so objects don't have to be moved to fit.
//
//
////////////////////////////////////////////////////////////////
// Rotate around a coordinate axis (i.e. in a plane perpendicular to that axis) by angle <a>.
// Read like this: R(p.xz, a) rotates "x towards z".
// This is fast if <a> is a compile-time constant and slower (but still practical) if not.
void pR(inout vec2 p, float a) {
p = cos(a)*p + sin(a)*vec2(p.y, -p.x);
}
// Shortcut for 45-degrees rotation
void pR45(inout vec2 p) {
p = (p + vec2(p.y, -p.x))*sqrt(0.5);
}
// Repeat space along one axis. Use like this to repeat along the x axis:
// <float cell = pMod1(p.x,5);> - using the return value is optional.
float pMod1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Same, but mirror every second cell so they match at the boundaries
float pModMirror1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize,size) - halfsize;
p *= mod(c, 2.0)*2. - 1.;
return c;
}
// Repeat the domain only in positive direction. Everything in the negative half-space is unchanged.
float pModSingle1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
if (p >= 0.)
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Repeat only a few times: from indices <start> to <stop> (similar to above, but more flexible)
float pModInterval1(inout float p, float size, float start, float stop) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p+halfsize, size) - halfsize;
if (c > stop) { //yes, this might not be the best thing numerically.
p += size*(c - stop);
c = stop;
}
if (c <start) {
p += size*(c - start);
c = start;
}
return c;
}
// Repeat around the origin by a fixed angle.
// For easier use, num of repetitions is use to specify the angle.
float pModPolar(inout vec2 p, float repetitions) {
float angle = 2.*PI/repetitions;
float a = atan(p.y, p.x) + angle/2.;
float r = length(p);
float c = floor(a/angle);
a = mod(a,angle) - angle/2.;
p = vec2(cos(a), sin(a))*r;
// For an odd number of repetitions, fix cell index of the cell in -x direction
// (cell index would be e.g. -5 and 5 in the two halves of the cell):
if (abs(c) >= (repetitions/2.)) c = abs(c);
return c;
}
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5,size) - size*0.5;
return c;
}
// Same, but mirror every second cell so all boundaries match
vec2 pModMirror2(inout vec2 p, vec2 size) {
vec2 halfsize = size*0.5;
vec2 c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
p *= mod(c,vec2(2.))*2. - vec2(1);
return c;
}
// Same, but mirror every second cell at the diagonal as well
vec2 pModGrid2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
p *= mod(c,vec2(2.))*2. - vec2(1.);
p -= size/2.;
if (p.x > p.y) p.xy = p.yx;
return floor(c/2.);
}
// Repeat in three dimensions
vec3 pMod3(inout vec3 p, vec3 size) {
vec3 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
return c;
}
// Mirror at an axis-aligned plane which is at a specified distance <dist> from the origin.
float pMirror (inout float p, float dist) {
float s = sgn(p);
p = abs(p)-dist;
return s;
}
// Mirror in both dimensions and at the diagonal, yielding one eighth of the space.
// translate by dist before mirroring.
vec2 pMirrorOctant (inout vec2 p, vec2 dist) {
vec2 s = sgn(p);
pMirror(p.x, dist.x);
pMirror(p.y, dist.y);
if (p.y > p.x)
p.xy = p.yx;
return s;
}
// Reflect space at a plane
float pReflect(inout vec3 p, vec3 planeNormal, float offset) {
float t = dot(p, planeNormal)+offset;
if (t < 0.) {
p = p - (2.*t)*planeNormal;
}
return sgn(t);
}
////////////////////////////////////////////////////////////////
//
// OBJECT COMBINATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// We usually need the following boolean operators to combine two objects:
// Union: OR(a,b)
// Intersection: AND(a,b)
// Difference: AND(a,!b)
// (a and b being the distances to the objects).
//
// The trivial implementations are min(a,b) for union, max(a,b) for intersection
// and max(a,-b) for difference. To combine objects in more interesting ways to
// produce rounded edges, chamfers, stairs, etc. instead of plain sharp edges we
// can use combination operators. It is common to use some kind of "smooth minimum"
// instead of min(), but we don't like that because it does not preserve Lipschitz
// continuity in many cases.
//
// Naming convention: since they return a distance, they are called fOpSomething.
// The different flavours usually implement all the boolean operators above
// and are called fOpUnionRound, fOpIntersectionRound, etc.
//
// The basic idea: Assume the object surfaces intersect at a right angle. The two
// distances <a> and <b> constitute a new local two-dimensional coordinate system
// with the actual intersection as the origin. In this coordinate system, we can
// evaluate any 2D distance function we want in order to shape the edge.
//
// The operators below are just those that we found useful or interesting and should
// be seen as examples. There are infinitely more possible operators.
//
// They are designed to actually produce correct distances or distance bounds, unlike
// popular "smooth minimum" operators, on the condition that the gradients of the two
// SDFs are at right angles. When they are off by more than 30 degrees or so, the
// Lipschitz condition will no longer hold (i.e. you might get artifacts). The worst
// case is parallel surfaces that are close to each other.
//
// Most have a float argument <r> to specify the radius of the feature they represent.
// This should be much smaller than the object size.
//
// Some of them have checks like "if ((-a < r) && (-b < r))" that restrict
// their influence (and computation cost) to a certain area. You might
// want to lift that restriction or enforce it. We have left it as comments
// in some cases.
//
// usage example:
//
// float fTwoBoxes(vec3 p) {
// float box0 = fBox(p, vec3(1));
// float box1 = fBox(p-vec3(1), vec3(1));
// return fOpUnionChamfer(box0, box1, 0.2);
// }
//
////////////////////////////////////////////////////////////////
// The "Chamfer" flavour makes a 45-degree chamfered edge (the diagonal of a square of size <r>):
float fOpUnionChamfer(float a, float b, float r) {
return min(min(a, b), (a - r + b)*sqrt(0.5));
}
// Intersection has to deal with what is normally the inside of the resulting object
// when using union, which we normally don't care about too much. Thus, intersection
// implementations sometimes differ from union implementations.
float fOpIntersectionChamfer(float a, float b, float r) {
return max(max(a, b), (a + r + b)*sqrt(0.5));
}
// Difference can be built from Intersection or Union:
float fOpDifferenceChamfer (float a, float b, float r) {
return fOpIntersectionChamfer(a, -b, r);
}
// The "Round" variant uses a quarter-circle to join the two objects smoothly:
float fOpUnionRound(float a, float b, float r) {
vec2 u = max(vec2(r - a,r - b), vec2(0));
return max(r, min (a, b)) - length(u);
}
float fOpIntersectionRound(float a, float b, float r) {
vec2 u = max(vec2(r + a,r + b), vec2(0));
return min(-r, max (a, b)) + length(u);
}
float fOpDifferenceRound (float a, float b, float r) {
return fOpIntersectionRound(a, -b, r);
}
// The "Columns" flavour makes n-1 circular columns at a 45 degree angle:
float fOpUnionColumns(float a, float b, float r, float n) {
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.x -= sqrt(2.)/2.*r;
p.x += columnradius*sqrt(2.);
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
// At this point, we have turned 45 degrees and moved at a point on the
// diagonal that we want to place the columns on.
// Now, repeat the domain along this direction and place a circle.
pMod1(p.y, columnradius*2.);
float result = length(p) - columnradius;
result = min(result, p.x);
result = min(result, a);
return min(result, b);
} else {
return min(a, b);
}
}
float fOpDifferenceColumns(float a, float b, float r, float n) {
a = -a;
float m = min(a, b);
//avoid the expensive computation where not needed (produces discontinuity though)
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/n/2.0;
columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.y += columnradius;
p.x -= sqrt(2.)/2.*r;
p.x += -columnradius*sqrt(2.)/2.;
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
pMod1(p.y,columnradius*2.);
float result = -length(p) + columnradius;
result = max(result, p.x);
result = min(result, a);
return -min(result, b);
} else {
return -m;
}
}
float fOpIntersectionColumns(float a, float b, float r, float n) {
return fOpDifferenceColumns(a,-b,r, n);
}
// The "Stairs" flavour produces n-1 steps of a staircase:
// much less stupid version by paniq
float fOpUnionStairs(float a, float b, float r, float n) {
float s = r/n;
float u = b-r;
return min(min(a,b), 0.5 * (u + a + abs ((mod (u - a + s, 2. * s)) - s)));
}
// We can just call Union since stairs are symmetric.
float fOpIntersectionStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, -b, r, n);
}
float fOpDifferenceStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, b, r, n);
}
// Similar to fOpUnionRound, but more lipschitz-y at acute angles
// (and less so at 90 degrees). Useful when fudging around too much
// by MediaMolecule, from Alex Evans' siggraph slides
float fOpUnionSoft(float a, float b, float r) {
float e = max(r - abs(a - b), 0.);
return min(a, b) - e*e*0.25/r;
}
// produces a cylindical pipe that runs along the intersection.
// No objects remain, only the pipe. This is not a boolean operator.
float fOpPipe(float a, float b, float r) {
return length(vec2(a, b)) - r;
}
// first object gets a v-shaped engraving where it intersect the second
float fOpEngrave(float a, float b, float r) {
return max(a, (a + r - abs(b))*sqrt(0.5));
}
// first object gets a capenter-style groove cut out
float fOpGroove(float a, float b, float ra, float rb) {
return max(a, min(a + ra, rb - abs(b)));
}
// first object gets a capenter-style tongue attached
float fOpTongue(float a, float b, float ra, float rb) {
return min(a, max(a - ra, abs(b) - rb));
}
////// End of library
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
vec3 applyFog(in vec3 color, in float distance) {
float fogAmount = 1.0 - exp(-distance * 0.01);
vec3 fogColor = vec3(0.17, 0.16, 0.24);
return mix( color, fogColor, fogAmount );
}
float opExtrusion( in vec3 p, in float sdf, in float h )
{
vec2 w = vec2( sdf, abs(p.z) - h);
return min(max(w.x,w.y),0.0) + length(max(w,0.0));
}
float sdCog2d(vec2 pos) {
float r = length(pos)*2.;
float a = atan(pos.y,pos.x);
float f = 1. - smoothstep(-0.2, .8, sin(a * 12.))*0.14;
f = smoothstep(f,f + 2.,r);
return f;
}
float sdCog(vec3 pos, float angle) {
pos.xy *= Rot(angle);
float d1 = opExtrusion(pos, sdCog2d(pos.xy), 0.15);
float d2 = fCapsule(pos - vec3(0.,0., -0.5), vec3(0., 0.0, 0.), vec3(0., 0., 1.), 0.2);
return 0.8 * fOpDifferenceRound(d1,d2,0.1)-0.02;}
// Scene
vec2 mapScene(in vec3 p) {
float d = 1e10;
float dGround = p.y + 1.5;
d = min(d, dGround);
float c1 = sdCog(p+vec3(1., 0., 0.), u_time);
d = min(d, c1);
float c2 = sdCog(p+vec3(0.5, -.87, 0.), -u_time);
d = min(d, c2);
float c3 = sdCog(p+vec3(0.5, .87, 0.), -u_time);
d = min(d, c3);
float mat = 0.;
if ( d == c1) mat = 1.;
if ( d == c2) mat = 2.;
if ( d == c3) mat = 3.;
return vec2(d, mat);
}
vec2 castRay(vec3 ro, vec3 rd) {
float t = 0.0;
float mat = 0.;
for(int i=0; i < 100; i++) {
vec3 p = ro + rd * t;
vec2 res = mapScene(p);
t += res.x;
mat = res.y;
if (t > 20. || res.x < abs(0.0001*t) ) break;
}
if (t > 20.) t = -1.0;
return vec2(t, mat);
}
float castShadow(vec3 ro, vec3 rd) {
float res = 1.0;
float t = 0.001;
for(int i = 0; i < 100; i++) {
vec3 pos = ro + t* rd;
float h = mapScene(pos).x;
res = min(res, 10.0*h/t);
if (abs(h) < (0.001*t) ) break;
t += h;
if (t > 20.) break;
}
return clamp(res,0., 1.);
}
vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.001, 0.);
vec3 n = vec3( mapScene(pos+e.xyy).x - mapScene(pos-e.xyy).x,
mapScene(pos+e.yxy).x - mapScene(pos-e.yxy).x,
mapScene(pos+e.yyx).x - mapScene(pos-e.yyx).x
);
return normalize(n);
}
vec3 fresnel( vec3 F0, vec3 h, vec3 l ) {
return F0 + ( 1.0 - F0 ) * pow( clamp( 1.0 - dot( h, l ), 0.0, 1.0 ), 5.0 );
}
vec3 shading(vec3 v, vec3 n, vec3 dir, float material) {
float shininess = 1.;
vec3 final = vec3( 0.0 );
vec3 ref = reflect( dir, n );
vec3 Ks = vec3( 0.5 );
vec3 Kd = vec3( 1.0 );
vec3 outMaterial = vec3(0.1686, 0.1686, 0.1686);
if (material == 0.) {
outMaterial = vec3(0.1412, 0.1412, 0.1412);
shininess = 11.1;
} else if (material == 1.) {
outMaterial = vec3(0.1765, 1.1961, 0.2275);
shininess = 31.;
} else if (material == 2.) {
outMaterial = vec3(1.1765, 0.1961, 0.2275);
shininess = 21.;
} else if (material == 3.) {
outMaterial = vec3(0.1765, 0.1961, 1.2275);
shininess = 21.;
}
// light 0
{
vec3 light_pos = vec3( -2.,.3, 10. );
vec3 light_color = vec3(0.71, 0.51, 0.72) * 5.;
vec3 vl = normalize( light_pos - v );
vec3 diffuse = Kd * vec3( max( 0.0, dot( vl, n ) ) );
vec3 specular = vec3( max( 0.0, dot( vl, ref ) ) );
vec3 F = fresnel( Ks, normalize( vl - dir ), vl );
specular = pow( specular, vec3( shininess ) );
final += outMaterial * specular * light_color * mix( diffuse, specular, F );
}
// light 1
{
vec3 light_pos = vec3( 5.0, 5.0, -20.0 );
vec3 light_color = vec3(0.14, 0.36, 0.83)* 7.;
vec3 vl = normalize( light_pos - v );
vec3 diffuse = Kd * vec3( max( 0.0, dot( vl, n ) ) );
vec3 specular = vec3( max( 0.0, dot( vl, ref ) ) );
vec3 F = fresnel( Ks, normalize( vl - dir ), vl );
specular = pow( specular, vec3( shininess ) );
final += outMaterial * specular * light_color * mix( diffuse, specular, F );
}
{
vec3 SUN_DIR = vec3(0. , .4, 1.);
float sun_dif = clamp(dot(n, SUN_DIR), 0., 1.);
float shadow = castShadow(v + n*0.02, SUN_DIR);
final += outMaterial * vec3(1.1,1.2, 1.5) * sun_dif * sun_dif * shadow;
}
{
vec3 SUN_DIR = vec3(0. , .6, -1.);
float sun_dif = clamp(dot(n, SUN_DIR), 0., 1.);
final += outMaterial * vec3(0.0353, 0.2667, 0.4784) * sun_dif;
}
// final += texture( iChannel0, ref ).rgb * fresnel( Ks, n, -dir );
// vec3 col = vec3(0.4)* ref.x;
//vec3 col = vec3(0.0588, 0.0588, 0.1216);// - vec3(0.149, 0.0863, 0.2314) * v.x;
//final += col * fresnel( vec3(.5), ref, -dir );
return final;
}
void main()
{
vec2 p = (2.0 * gl_FragCoord.xy - u_resolution.xy) / u_resolution.y;
float angle = u_time*0.4;
// camera
vec3 ta = vec3(0.0, 0., 1.0);
vec3 ro = ta + vec3(2., 0., 4.); // + vec3(4.*sin(angle), cos(angle), 4.*cos(angle)); // *cos(angle))
vec3 ww = normalize(ta-ro);
vec3 uu = normalize(cross(ww, vec3(0.,1.0, 0.))); // vec3 = pitch, yaw, pan
vec3 vv = normalize(cross(uu,ww));
vec3 rd = normalize(p.x * uu + p.y*vv + ww * 2.0); // camera
// global light
vec3 col = vec3(0.1451, 0.1098, 0.1608) - vec3(0.9725, 0.5176, 0.0) *rd.y;
vec2 t = castRay(ro, rd);
if (t.x > 0.) {
vec3 pos = ro + rd * t.x;
vec3 nor = calcNormal(pos);
col = shading(pos, nor, rd , t.y);
// apply fog
col = applyFog(col, t.x);
}
gl_FragColor = vec4( pow( col, vec3(1.0/1.3) ), 1.0 );
}

View File

@ -6,15 +6,15 @@
#
# Note about spaces in path names:
#
# Any file name/path that includes $(PROGRAM_DIR) must be enclosed in quotes, like
# "$(PROGRAM_DIR)\Tools\Crinkler\crinkler.exe" or "$(PROGRAM_DIR)\Libs", because
# Any file name/path that includes $(PROGRAM_DIR) must be enclosed in quotes, like
# "$(PROGRAM_DIR)\Tools\Crinkler\crinkler.exe" or "$(PROGRAM_DIR)\Libs", because
# PROGRAM_DIR might contain spaces.
#
#
# Paths that are relative to the project directory, don't have to be enclosed in quotes,
# because Compofiller Studio changes the current directory to the project directory.
# All you have to do is make sure the file names don't contain spaces.
#
VISUALS_USE_TIME_UNIFORM_DEFINE=-DUSE_TIME_UNIFORM=$(USE_TIME_UNIFORM)
VISUALS_TIME_UNIFORM_NAME_DEFINE=-DTIME_UNIFORM_NAME=$(TIME_UNIFORM_NAME)
VISUALS_USE_RESOLUTION_UNIFORM_DEFINE=-DUSE_RESOLUTION_UNIFORM=$(USE_RESOLUTION_UNIFORM)
@ -39,7 +39,7 @@ VISUALS_ASM_OPTS=$(VISUALS_USE_TIME_UNIFORM_DEFINE) $(VISUALS_USE_RESOLUTION_UNI
-DTEXT_FONT_WEIGHT=$(TEXT_FONT_WEIGHT) \
-DTEXT_FONT_ORIENTATION=$(TEXT_FONT_ORIENTATION) \
-DTEXT_FONT_ESCAPEMENT=$(TEXT_FONT_ESCAPEMENT) \
-DTEXT_FONT_WIDTH=$(TEXT_FONT_WIDTH) \
-DTEXT_FONT_WIDTH=$(TEXT_FONT_WIDTH) \
-DTEXT_CHARACTER_EXTRA_SPACING=$(TEXT_CHARACTER_EXTRA_SPACING) \
-DTEXTS_UNIFORM_NAME=$(TEXTS_UNIFORM_NAME) \
-DUSE_TEXTS=$(USE_TEXTS) -DUSE_TEXTS_UNIFORM=$(USE_TEXTS_UNIFORM) \
@ -47,7 +47,7 @@ VISUALS_ASM_OPTS=$(VISUALS_USE_TIME_UNIFORM_DEFINE) $(VISUALS_USE_RESOLUTION_UNI
# this doesn't need to go to the assembler anymore, because the shader goes via PreprocessShader.exe to a hard-coded file name
# -DSHADER_FILE=$(QUOTE)$(SHADER_FILE)$(QUOTE)
# -DSHADER_FILE=$(QUOTE)$(SHADER_FILE)$(QUOTE)
# We force 16 bit output. This prevents non-working audio and crash, when a 32 bit float format song is given.
@ -80,7 +80,7 @@ DEBUG_LINKER_COMMON_LIBS_PARAMS=-l kernel32 -l user32
DEBUG_LINKER_AUDIO_LIBS_PARAMS=-l winmm $(DEBUG_LINKER_COMMON_LIBS_PARAMS)
# for visuals DLL
DEBUG_LINKER_VISUALS_LIBS_PARAMS=$(DEBUG_LINKER_COMMON_LIBS_PARAMS) -l gdi32 -l opengl32
DEBUG_LINKER_VISUALS_LIBS_PARAMS=$(DEBUG_LINKER_COMMON_LIBS_PARAMS) -l gdi32 -l opengl32
########## EXE linker things ###########
@ -89,7 +89,7 @@ ifeq ($(EXE_LINKER_PROGRAM),Crinkler)
# Crinkler settings
# Linker for building standalone EXE files for running
FINAL_LINKER_EXE="$(PROGRAM_DIR)\Tools\Crinkler\crinkler.exe"
FINAL_LINKER_OPTS=/SUBSYSTEM:WINDOWS /ENTRY:t /COMPMODE:SLOW /HASHSIZE:200 /HASHTRIES:50 /ORDERTRIES:$(CRINKLER_ORDERTRIES) \
FINAL_LINKER_OPTS=/SUBSYSTEM:WINDOWS /ENTRY:t /COMPMODE:VERYSLOW /HASHTRIES:1000 /ORDERTRIES:$(CRINKLER_ORDERTRIES) \
/UNSAFEIMPORT /LIBPATH:$(LIB_PATH) /REPORT:crinkler_report.html /PROGRESSGUI
FINAL_LINKER_OUT_OPT=/OUT:
FINAL_LINKER_GENERAL_LIBS_PARAMS=kernel32.lib user32.lib
@ -100,7 +100,7 @@ else
# GNU ld settings
FINAL_LINKER_EXE="$(PROGRAM_DIR)\Tools\Linker\ld.exe"
FINAL_LINKER_OPTS=-e t -L $(LIB_PATH)
FINAL_LINKER_OUT_OPT=-o
FINAL_LINKER_OUT_OPT=-o
FINAL_LINKER_GENERAL_LIBS_PARAMS=-l kernel32 -l user32
FINAL_LINKER_AUDIO_LIBS_PARAMS=-l winmm
FINAL_LINKER_VISUALS_LIBS_PARAMS=-l gdi32 -l opengl32

View File

@ -1,17 +1,17 @@
; Compofiller Studio by Yzi
; Wrapper for 4klang.asm, so we can get our debug/test DLL to export the constants.
; Wrapper 4klang.asm, so we can get our debug/test DLL to export the constants.
%include "4klang.asm"
music_sample_rate:
dd SAMPLE_RATE
dd SU_SAMPLE_RATE
music_bpm:
dd __float32__(%[BPM])
dd __float32__(%[SU_BPM])
music_length_samples:
dd MAX_SAMPLES
dd SU_LENGTH_IN_SAMPLES
%macro EXPORT_FUNC 1
export %1

View File

@ -132,7 +132,8 @@ section .text
; the __imp__ versions refer to the corresponding import address table entries
; 4klang
extern __4klang_render@4
extern _su_render_song@4
; General Windows stuff
extern _ExitProcess@4
@ -179,11 +180,13 @@ SetRenderedAudioBufferPtr:
export StartAudioRendererThread
global _StartAudioRendererThread
_StartAudioRendererThread
StartAudioRendererThread:
StartAudioRendererThread:
push 0
push 0
push dword [rendered_audio_buffer_ptr]
push __4klang_render@4
extern _su_load_gmdls@0
call _su_load_gmdls@0
push _su_render_song@4
push 0
push 0
;call _CreateThread@24
@ -380,8 +383,8 @@ StopAudio:
ret
; // _4klang_render(myMuzik);
; CreateThread(0, 0, (LPTHREAD_START_ROUTINE)_4klang_render, myMuzik, 0, 0);
; // _su_render_song(myMuzik);
; CreateThread(0, 0, (LPTHREAD_START_ROUTINE)_su_render_song, myMuzik, 0, 0);
; Sleep(200);
; waveOutOpen( &hWaveOut, WAVE_MAPPER, &pcmFormat, NULL, 0, CALLBACK_NULL );

View File

@ -266,7 +266,7 @@ extern __imp__CreateFontA@56
; SelectObject@8 HGDIOBJ SelectObject(HDC hdc, HGDIOBJ h)
extern _SelectObject@8
extern __imp__SelectObject@8
; EHK<48> SetBkColor@8 COLORREF SetBkColor(HDC hdc, COLORREF color)
; EHK<48> SetBkColor@8 COLORREF SetBkColor(HDC hdc, COLORREF color)
extern _SetBkColor@8
extern __imp__SetBkColor@8
; SetTextColor@8 COLORREF SetTextColor(HDC hdc, COLORREF color)
@ -389,7 +389,9 @@ main:
push 0
push 0
push rendered_audio_data + (AUDIO_DELAY * 4)
push __4klang_render@4
extern _su_load_gmdls@0
call _su_load_gmdls@0
push _su_render_song@4
push 0
push 0
call [__imp__CreateThread@24]
@ -536,7 +538,7 @@ section .cdennn
section .text
; the __imp__ versions refer to the corresponding import address table entries
extern __4klang_render@4
extern _su_render_song@4
extern _CreateThread@24
extern __imp__CreateThread@24

View File

@ -11,3 +11,11 @@ RESOLUTION_Y=720
CRINKLER_ORDERTRIES=4000
OUTPUT_EXE_NAME=release.exe
SHADER_FILE=shader_minified.h
TIME_UNIFORM_NAME='v'
RESOLUTION_UNIFORM_NAME='s'
TEXTS_UNIFORM_NAME='m'
EXE_LINKER_PROGRAM=Crinkler
TIME_BASE=bars
TIME_DIVIDER=79578.945
TIME_DIVIDER_INT=79578

View File

@ -8,4 +8,16 @@ include $(PARENT_CONFIG)
# Visuals
EXE_LINKER_PROGRAM=Crinkler
CRINKLER_ORDERTRIES=100
SHADER_FILE=shader_minified.h
TIME_UNIFORM_NAME='y'
RESOLUTION_UNIFORM_NAME='v'
TEXTS_UNIFORM_NAME='f'
USE_WIDECHAR_TEXTS=1
TIME_DIVIDER=91241.383
TIME_BASE=bars
TIME_DIVIDER_INT=91241
TWO_PASS_RENDERING=0
SECOND_PASS_NEGATIVE_TIME=0
USE_TEXTS=0
USE_TEXTS_UNIFORM=0
CRINKLER_ORDERTRIES=30000

BIN
music/4_funk.xrns Normal file

Binary file not shown.

BIN
music/4k_brass.xrns Normal file

Binary file not shown.

BIN
music/4k_entry.xrns Normal file

Binary file not shown.

283
music/4k_funk.yml Normal file
View File

@ -0,0 +1,283 @@
bpm: 120
rowsperbeat: 8
score:
tracks:
- numvoices: 2
order: [0, 1, 2, 3, 0, 1, 4, 5, 6, 7, 2, 3, 0, 1, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19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 0, 1, 60, 1, 0, 1, 1, 1, 65, 1, 0, 1, 60, 1, 0, 1], [29, 1, 1, 1, 0, 1, 69, 1, 0, 1, 1, 1, 29, 1, 1, 1, 0, 1, 69, 1, 0, 1, 1, 1, 29, 1, 0, 1, 69, 1, 0, 1], [43, 1, 1, 1, 0, 1, 57, 1, 0, 1, 1, 1, 57, 1, 1, 1, 0, 1, 57, 1, 0, 1, 1, 1, 57, 1, 0, 1, 57, 1, 0, 1], [59, 1, 1, 1, 0, 1, 59, 1, 0, 1, 1, 1, 59, 1, 1, 1, 0, 1, 59, 1, 0, 1, 1, 1, 59, 1, 0, 1, 59, 1, 0, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 4, 8, 9, 10, 11, 12, 13, 14, 15, 11, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 4, 8, 9, 10, 11, 12, 13, 14, 15, 11, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 58, 1, 0, 1, 51, 1, 1, 1, 0, 1, 65, 0, 1, 1, 1, 1, 62, 1, 1, 1], [0, 1, 62, 1, 0, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 53, 1, 0, 1, 65, 1, 0, 1, 1, 1, 1, 1], [58, 1, 1, 1, 0, 1, 51, 1, 0, 1, 1, 1, 58, 1, 1, 1, 0, 1, 51, 1, 0, 1, 1, 1, 51, 1, 0, 1, 51, 1, 0, 1], [53, 1, 1, 1, 0, 1, 53, 1, 0, 1, 1, 1, 53, 1, 1, 1, 0, 1, 53, 1, 0, 1, 1, 1, 53, 1, 0, 1, 53, 1, 0, 1], [55, 1, 1, 1, 0, 1, 55, 1, 0, 1, 1, 1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 1, 1, 1, 0, 1, 43, 1, 0, 1, 1, 1, 43, 1, 1, 1, 0, 1, 43, 1, 0, 1, 1, 1, 43, 1, 0, 1, 43, 1, 0, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 0, 1, 2, 4, 5, 6, 7, 8, 5, 6, 7, 9, 5, 6, 7, 8, 5, 6, 7, 10, 0, 1, 2, 3, 0, 1, 2, 4, 0, 1, 2, 3, 0, 1, 2, 4, 5, 6, 7, 8, 5, 6, 7, 9, 5, 6, 7, 8, 5, 6, 7, 10, 0, 1, 2, 3, 0, 1, 2, 4, 0, 1, 2, 3, 0, 1, 2, 11, 12, 13, -1]
patterns: [[43, 1, 1, 1, 1, 1, 55, 1, 0, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 1, 1, 43, 0, 1, 1, 55, 0, 43, 0, 46, 1], [48, 1, 1, 1, 1, 1, 48, 1, 0, 1, 60, 0, 48, 0, 1, 1, 48, 1, 0, 1, 60, 1, 1, 1, 48, 1, 1, 1, 50, 1, 1, 1], [51, 1, 1, 1, 1, 1, 63, 1, 0, 1, 1, 1, 50, 1, 1, 1, 51, 1, 1, 1, 63, 0, 1, 1, 51, 0, 1, 1, 53, 0, 1, 1], [43, 1, 1, 1, 0, 1, 43, 1, 0, 1, 43, 1, 55, 1, 43, 1, 53, 1, 65, 1, 53, 1, 1, 1, 51, 1, 1, 1, 53, 1, 1, 1], [43, 1, 1, 1, 0, 1, 43, 1, 0, 1, 43, 1, 55, 1, 43, 1, 53, 1, 65, 1, 53, 1, 1, 1, 51, 1, 1, 1, 50, 1, 1, 1], [51, 1, 1, 0, 51, 0, 1, 1, 51, 1, 1, 0, 51, 0, 1, 1, 51, 1, 1, 0, 51, 0, 1, 1, 51, 1, 1, 0, 51, 0, 1, 1], [53, 1, 1, 0, 53, 0, 1, 1, 53, 1, 1, 0, 53, 0, 1, 1, 53, 1, 1, 0, 53, 0, 1, 1, 53, 1, 1, 0, 53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1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 2, -1, 3, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 1, -1, -1, 2, -1, -1, -1, 5, 1, -1, -1, 2, -1, -1, -1, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 1, -1, -1, 2, -1, -1, -1, 5, 1, -1, -1, 2, -1, -1, -1, 5, -1, -1, -1]
patterns: [[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, 55, 1, 55, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 53, 1, 53, 1, 1, 1, 53, 1, 50, 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, 47, 1, 48, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 50, 1, 0, 1, 1, 1, 1, 1, 50, 1, 50, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 53, 1, 53, 1, 1, 1, 53, 1, 50, 1, 48, 1]]
rowsperpattern: 32
length: 83
patch:
- name: Clavi
numvoices: 8
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 62, gain: 76, release: 52, stereo: 1, sustain: 66}
- type: oscillator
id: 2
parameters: {color: 64, detune: 68, gain: 84, looplength: 84, loopstart: 290, phase: 0, samplestart: 401297, shape: 64, stereo: 1, transpose: 76, type: 4, unison: 3}
- type: mulp
id: 3
parameters: {stereo: 1}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 96, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 48, outgain: 63, panning: 64, stereo: 1}
- name: FatBass
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 12, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 200
parameters: {amount: 95, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 37, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 126, detune: 64, gain: 128, lfo: 0, phase: 64, shape: 83, stereo: 0, transpose: 64, type: 0, unison: 1}
- type: oscillator
id: 6
parameters: {color: 123, detune: 65, gain: 128, lfo: 0, phase: 64, shape: 69, stereo: 0, transpose: 64, type: 1, unison: 0}
- type: addp
parameters: {stereo: 0}
- type: oscillator
id: 1033
parameters: {color: 62, detune: 64, gain: 128, looplength: 905, loopstart: 6513, phase: 42, samplestart: 1252819, shape: 104, stereo: 0, transpose: 93, type: 4, unison: 0}
- type: filter
id: 1034
parameters: {bandpass: 0, frequency: 69, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
id: 1035
parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 100, stereo: 0}
- type: addp
id: 1032
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 28, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 65, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 10, outgain: 65, stereo: 1}
- name: Kick
numvoices: 1
units:
- type: envelope
id: 1036
parameters: {attack: 0, decay: 101, gain: 112, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1037
parameters: {color: 64, detune: 64, gain: 128, looplength: 1, loopstart: 1034, phase: 0, samplestart: 741926, shape: 95, stereo: 0, transpose: 78, type: 4, unison: 1}
- type: mulp
id: 1038
parameters: {stereo: 0}
- type: filter
id: 1042
parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 60, stereo: 0}
- type: filter
id: 1043
parameters: {bandpass: 0, frequency: 105, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 29, stereo: 0}
- type: pan
id: 1040
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 1041
parameters: {auxgain: 8, outgain: 69, stereo: 1}
- name: snare
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 5, channel: 2, decay: 66, gain: 108, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, damp: 64, detune: 114, dry: 128, feedback: 125, gain: 49, lfo: 0, looplength: 1, loopstart: 4276, notetracking: 0, phase: 0, pregain: 40, samplestart: 560606, shape: 114, stereo: 0, transpose: 86, type: 4, unison: 3}
- type: distort
parameters: {drive: 99, gain: 128, 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: 77, shape: 7, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 1, frequency: 99, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 112, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 125, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 64, stereo: 0}
- type: outaux
parameters: {auxgain: 23, outgain: 93, 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: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 76, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 128, looplength: 1, loopstart: 1343, phase: 0, samplestart: 367477, shape: 62, stereo: 0, transpose: 82, type: 4}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 4
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 86, stereo: 0}
disabled: true
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 99, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
id: 6
parameters: {bandpass: 0, frequency: 61, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 121, stereo: 0}
disabled: true
- type: pan
id: 7
parameters: {panning: 61, stereo: 0}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 101, stereo: 1}
- name: Open hihat
numvoices: 1
units:
- type: envelope
id: 1044
parameters: {attack: 0, decay: 80, gain: 121, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1045
parameters: {color: 64, detune: 64, gain: 95, looplength: 3761, loopstart: 5808, phase: 0, samplestart: 867145, shape: 74, stereo: 0, transpose: 88, type: 4}
- type: mulp
id: 1046
parameters: {stereo: 0}
- type: pan
id: 1048
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 1049
parameters: {auxgain: 0, outgain: 93, stereo: 1}
- name: Crash
numvoices: 1
units:
- type: envelope
id: 1050
parameters: {attack: 0, decay: 78, gain: 116, release: 0, stereo: 1, sustain: 0}
- type: oscillator
id: 1051
parameters: {color: 64, detune: 64, gain: 128, looplength: 5229, loopstart: 2615, phase: 0, samplestart: 433554, shape: 86, stereo: 1, transpose: 76, type: 4, unison: 0}
- type: mulp
id: 1052
parameters: {stereo: 1}
- type: pan
id: 1054
parameters: {panning: 64, stereo: 1}
- type: outaux
id: 1055
parameters: {auxgain: 64, outgain: 64, stereo: 1}
- name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 66, detune: 64, gain: 99, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 64, stereo: 0, transpose: 64, type: 4}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 53, outgain: 128, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 84, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 39, dry: 128, feedback: 106, notetracking: 0, pregain: 38, stereo: 1}
varargs: [1116, 1188, 1276, 1356, 1422, 1492, 1556, 1618, 1140, 1212, 1300, 1380, 1446, 1516, 1580, 1642]
- type: compressor
id: 1056
parameters: {attack: 40, invgain: 56, ratio: 64, release: 67, stereo: 1, threshold: 44}
- type: mulp
id: 1057
parameters: {stereo: 1}
- type: out
id: 9
parameters: {gain: 70, stereo: 1}

BIN
music/4k_house.xrns Normal file

Binary file not shown.

BIN
music/4k_sg.xrns Normal file

Binary file not shown.

BIN
music/4k_sg_v2.xrns Normal file

Binary file not shown.

BIN
music/4k_sg_v3.xrns Normal file

Binary file not shown.

BIN
music/4k_sg_v4.xrns Normal file

Binary file not shown.

BIN
music/4k_sointu.xrns Normal file

Binary file not shown.

BIN
music/4k_teema.xrns Normal file

Binary file not shown.

BIN
music/4k_testiä.xrns Normal file

Binary file not shown.

489
music/4k_trance Normal file
View File

@ -0,0 +1,489 @@
bpm: 137
rowsperbeat: 8
score:
tracks:
- numvoices: 1
order: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, -1, -1]
patterns: [[48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1], [48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 1, 1, 48, 1, 1, 1, 1, 1, 48, 1], [48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 1, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 48, 48, 48], [48, 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]]
- 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, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 1, 57, 1, 57, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 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, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 13, 9, 11, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 11, 8, 8, 16, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 0, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, -1, -1, -1]
patterns: [[1, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 1, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 0], [1, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 1], [0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 1, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 0], [1, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 1], [0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 1, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 55, 1, 0, 1, 53, 0, 52, 1, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 0], [38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1], [40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1], [47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1], [45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1], [43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1], [42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1], [50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1], [49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 0, 1, -1]
patterns: [[59, 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], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1
order: [0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 53, 1], [1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1], [1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 1, 1, 53, 1, 52, 1]]
- numvoices: 1
order: [-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, -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, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 57, 1, 57, 1, 57, 1, 54, 1, 54, 1, 54, 1, 54, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 10, 5, 6, 7, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 21, 20, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 20, 23, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, -1, -1, -1]
patterns: [[50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 0, 50, 1, 0, 1, 50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 0, 50, 0, 50, 1, 50, 1, 1, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 46, 0, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 1, 41, 1, 1, 1, 41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [0, 1, 46, 0, 74, 0, 74, 1, 0, 1, 46, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 74, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [48, 1, 1, 0, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1], [1, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 1, 1, 1, 1, 46, 1, 0, 1, 46, 0, 46, 1, 0, 1, 46, 1, 0, 1, 1, 1, 46, 1, 0, 1, 46, 1, 0, 1, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 1, 0, 1, 41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 0], [50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1], [45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1], [43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [1, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 18, 19, 22, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 23, 22, 24, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 74, 0, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 76, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 77, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [0, 1, 74, 0, 70, 0, 46, 1, 0, 1, 74, 1, 69, 1, 1, 1, 70, 1, 1, 1, 0, 1, 70, 1, 0, 1, 70, 0, 70, 0, 70, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [76, 1, 1, 0, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1], [1, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 0], [69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1], [71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1], [66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1], [67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1], [1, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 17, 18, 21, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 18, 22, 23, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 77, 0, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 79, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 1, 81, 1, 1, 1, 81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [0, 1, 70, 0, 46, 0, 70, 1, 0, 1, 70, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [79, 1, 1, 0, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1], [1, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 1, 0, 1, 81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 0], [78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1], [1, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1]]
- numvoices: 2
order: [-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, 0, 1, 2, 3, 4, 5, 6, -1, 7, 8, 9, 10, 11, 12, 13, -1, 14, 10, 15, 1, 16, 12, 6, -1, 17, 8, 9, 10, 18, 19, 20, -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: [[66, 1, 78, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 67, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 1, 81, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 78, 0, 1, 1, 1, 1], [1, 86, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 85, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 86, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 32
length: 99
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 0, channel: 2, decay: 69, gain: 59, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 106
parameters: {color: 128, detune: 69, gain: 80, lfo: 0, phase: 0, shape: 69, stereo: 0, transpose: 92, type: 0, unison: 2}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 0, damp: 0, decay: 43, dry: 128, feedback: 96, gain: 128, notetracking: 2, pregain: 40, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 127, panning: 64, shape: 105, stereo: 0}
- type: filter
id: 112
parameters: {auxgain: 64, bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, outgain: 64, resonance: 110, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 68, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 12, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 69, stereo: 0}
- type: filter
id: 14
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 33, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 42, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 64, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 122
parameters: {amount: 46, port: 0, sendpop: 1, target: 106}
- name: Plumps
numvoices: 1
units:
- type: envelope
id: 1028
parameters: {attack: 52, channel: 2, decay: 64, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1021
parameters: {color: 48, damp: 64, detune: 64, dry: 128, feedback: 125, gain: 30, looplength: 8934, loopstart: 611, notetracking: 0, phase: 0, pregain: 40, samplestart: 1439167, shape: 78, stereo: 0, transpose: 43, type: 4}
- type: mulp
id: 1022
parameters: {gain: 128, stereo: 0}
- id: 1030
parameters: {}
- type: envelope
id: 1020
parameters: {attack: 37, decay: 67, gain: 40, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1026
parameters: {color: 34, detune: 64, gain: 69, looplength: 1, loopstart: 1730, phase: 0, samplestart: 1710745, shape: 60, stereo: 0, transpose: 58, type: 4, unison: 0}
- type: mulp
id: 1027
parameters: {stereo: 0}
- type: addp
id: 1029
parameters: {stereo: 0}
- type: filter
id: 1031
parameters: {bandpass: 0, frequency: 70, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 91, stereo: 0}
- type: pan
id: 1024
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 1025
parameters: {auxgain: 14, outgain: 128, stereo: 1}
- name: clap
numvoices: 1
units:
- type: envelope
id: 163
parameters: {attack: 62, decay: 72, gain: 25, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 165
parameters: {gain: 128, shape: 10, stereo: 0}
- type: filter
id: 1018
parameters: {bandpass: 0, frequency: 40, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 1, resonance: 67, stereo: 0}
- type: filter
id: 1019
parameters: {bandpass: 1, frequency: 61, highpass: 0, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: mulp
id: 171
parameters: {stereo: 0}
- type: envelope
id: 233
parameters: {attack: 0, decay: 59, gain: 63, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 234
parameters: {color: 64, detune: 64, gain: 128, looplength: 1, loopstart: 2423, phase: 0, samplestart: 641780, shape: 104, stereo: 0, transpose: 64, type: 4}
- type: mulp
id: 236
parameters: {stereo: 0}
- type: addp
id: 173
parameters: {stereo: 0}
- type: distort
parameters: {drive: 112, stereo: 0}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 54, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 77, stereo: 0}
- type: pan
id: 174
parameters: {panning: 60, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 7, outgain: 40, stereo: 1}
- name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 64, detune: 82, gain: 128, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 78, stereo: 0, transpose: 64, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 1017
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 43, outgain: 89, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 83, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 37, 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: 83, type: 4}
- type: mulp
id: 239
parameters: {stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: filter
id: 240
parameters: {bandpass: 0, frequency: 86, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 93, stereo: 1}
- type: pan
id: 7
parameters: {panning: 67, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 11, outgain: 128, stereo: 1}
- name: hihat open
numvoices: 2
units:
- type: envelope
id: 13
parameters: {attack: 0, decay: 77, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 64, looplength: 3761, loopstart: 5808, phase: 0, samplestart: 867145, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 0}
- type: mulp
id: 15
parameters: {stereo: 0}
- type: filter
id: 4
parameters: {bandpass: 1, frequency: 57, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 0, outgain: 59, stereo: 1}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 100, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 0, decay: 84, gain: 64, release: 78, stereo: 1, sustain: 0}
- type: mulp
id: 232
parameters: {stereo: 1}
- type: oscillator
id: 2
parameters: {color: 64, detune: 54, gain: 111, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 87, stereo: 1, transpose: 77, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 1}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 99, outgain: 128, panning: 64, stereo: 1}
- name: bass v3
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 200
parameters: {amount: 95, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 37, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 126, detune: 64, gain: 128, lfo: 0, phase: 64, shape: 83, stereo: 0, transpose: 64, type: 0, unison: 1}
- type: oscillator
id: 6
parameters: {color: 123, detune: 65, gain: 128, lfo: 0, phase: 64, shape: 69, stereo: 0, transpose: 64, type: 1, unison: 0}
- type: addp
parameters: {stereo: 0}
- type: oscillator
id: 1033
parameters: {color: 62, detune: 64, gain: 128, looplength: 905, loopstart: 6513, phase: 42, samplestart: 1252819, shape: 104, stereo: 0, transpose: 93, type: 4, unison: 0}
- type: filter
id: 1034
parameters: {bandpass: 0, frequency: 69, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
id: 1035
parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 100, stereo: 0}
- type: addp
id: 1032
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 28, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 65, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 5, outgain: 31, stereo: 1}
- name: SuperSaw
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 30, decay: 0, gain: 72, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 2
parameters: {color: 128, detune: 44, gain: 128, phase: 68, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 10
parameters: {color: 128, detune: 0, gain: 96, lfo: 0, phase: 37, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 11
parameters: {stereo: 0}
- type: noise
id: 23
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 24
parameters: {stereo: 0}
- type: mulp
id: 17
parameters: {stereo: 0}
- id: 18
parameters: {}
- type: envelope
id: 12
parameters: {attack: 20, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 13
parameters: {color: 128, detune: 86, gain: 128, phase: 47, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 14
parameters: {color: 128, detune: 110, gain: 93, lfo: 0, phase: 35, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 28
parameters: {stereo: 0}
- type: noise
id: 27
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 15
parameters: {stereo: 0}
- type: mulp
id: 26
parameters: {stereo: 0}
- type: delay
parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0}
varargs: [69]
- type: pan
parameters: {panning: 56, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 85, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 19
parameters: {bandpass: 1, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 111, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 7, outgain: 24, stereo: 1}
- name: Trance bells
comment: |-
Generic pluck generator
Use oscillator type, color and shape to alter the sound properties
numvoices: 4
units:
- type: envelope
id: 163
parameters: {attack: 12, decay: 86, gain: 46, release: 78, stereo: 0, sustain: 57}
- type: envelope
id: 215
parameters: {attack: 26, decay: 89, gain: 82, release: 86, stereo: 0, sustain: 82}
- type: mulp
id: 216
parameters: {stereo: 0}
- type: oscillator
id: 164
parameters: {color: 64, detune: 64, gain: 128, lfo: 0, looplength: 1945, loopstart: 1315, phase: 128, samplestart: 1069972, shape: 64, stereo: 0, transpose: 69, type: 4, unison: 0}
- type: oscillator
id: 165
parameters: {color: 26, detune: 67, gain: 34, lfo: 0, phase: 0, shape: 68, stereo: 0, transpose: 76, type: 1, unison: 2}
- type: addp
id: 166
parameters: {stereo: 0}
- type: mulp
id: 214
parameters: {stereo: 0}
- type: envelope
id: 1005
parameters: {attack: 0, decay: 82, gain: 128, release: 78, stereo: 0, sustain: 128}
- type: oscillator
id: 1002
parameters: {color: 65, detune: 60, gain: 74, looplength: 1645, loopstart: 3820, phase: 0, samplestart: 551786, shape: 70, stereo: 0, transpose: 83, type: 4, unison: 1}
- parameters: {}
disabled: true
- type: mulp
parameters: {stereo: 0}
- type: delay
id: 1004
parameters: {damp: 22, dry: 67, feedback: 16, notetracking: 0, pregain: 67, stereo: 0}
varargs: [4533]
- type: xch
id: 1006
parameters: {stereo: 0}
- type: addp
id: 1003
parameters: {stereo: 0}
- type: filter
id: 217
parameters: {bandpass: 1, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 58, stereo: 0}
- type: filter
id: 218
parameters: {bandpass: 0, frequency: 92, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 168
parameters: {panning: 61, stereo: 0}
- type: delay
id: 169
parameters: {damp: 44, dry: 128, feedback: 91, notetracking: 0, pregain: 69, stereo: 1}
varargs: [14990, 22310, 20568, 33814]
- type: outaux
id: 172
parameters: {auxgain: 22, outgain: 23, stereo: 1}
- type: loadnote
id: 219
parameters: {stereo: 0}
- type: send
id: 220
parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0}
- name: Piano
numvoices: 5
units:
- type: envelope
id: 1007
parameters: {attack: 19, decay: 90, gain: 128, release: 63, stereo: 1, sustain: 47}
- type: oscillator
id: 1008
parameters: {color: 61, detune: 62, gain: 114, looplength: 1339, loopstart: 9176, phase: 0, samplestart: 982589, shape: 58, stereo: 1, transpose: 72, type: 4, unison: 1}
- type: mulp
id: 1009
parameters: {stereo: 1}
- type: pan
id: 1011
parameters: {panning: 57, stereo: 1}
- type: filter
id: 1015
parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 95, stereo: 1}
- type: compressor
parameters: {attack: 46, invgain: 89, ratio: 101, release: 77, stereo: 1, threshold: 12}
- type: mulp
id: 1014
parameters: {stereo: 1}
- type: filter
id: 1016
parameters: {bandpass: 0, frequency: 58, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 1}
- type: delay
id: 1010
parameters: {damp: 106, dry: 97, feedback: 0, notetracking: 2, pregain: 28, stereo: 1}
varargs: [12, 18]
- type: outaux
id: 1012
parameters: {auxgain: 5, outgain: 56, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 16, dry: 115, feedback: 111, notetracking: 0, pregain: 57, 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}

BIN
music/4k_trance.xrns Normal file

Binary file not shown.

470
music/4k_trance.yml Normal file
View File

@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 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 1], [57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 1, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 57, 57, 1, 57, 1, 57, 1, 57, 1, 57, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 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, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 13, 9, 11, 8, 9, 10, 11, 12, 13, 9, 14, 15, 11, 10, 11, 12, 11, 8, 8, 16, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, 0, 1, 2, 3, 4, 5, 2, 6, 0, 1, 2, 3, 4, 5, 2, 7, -1, -1, -1]
patterns: [[1, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 1, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 0], [1, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 1], [0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 46, 1, 0, 1, 46, 1, 58, 0, 46, 1, 0, 1, 46, 0, 58, 0, 58, 0], [1, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 1], [0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 41, 1, 0, 1, 41, 1, 53, 0, 41, 1, 0, 1, 41, 0, 53, 0, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 55, 1, 0, 1, 53, 0, 52, 1, 53, 0], [0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 48, 1, 0, 1, 48, 1, 60, 0, 48, 1, 0, 1, 48, 0, 60, 0, 60, 0], [38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1, 38, 1, 38, 1, 50, 1], [40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1, 40, 1, 40, 1, 52, 1], [47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1, 47, 1, 47, 1, 59, 1], [45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1, 45, 1, 45, 1, 57, 1], [43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1, 43, 1, 43, 1, 55, 1], [42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1, 42, 1, 42, 1, 54, 1], [50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1, 50, 1, 50, 1, 62, 1], [49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1, 49, 1, 49, 1, 61, 1], [0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 38, 1, 0, 1, 38, 0, 50, 0, 50, 1]]
- numvoices: 2
order: [-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 2, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1,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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, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 57, 1, 57, 1, 57, 1, 57, 1, 54, 1, 54, 1, 54, 1, 54, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 10, 5, 6, 7, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 21, 20, 17, 18, 19, 20, 21, 20, 21, 20, 22, 18, 19, 20, 21, 20, 20, 23, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, 11, 12, 13, 3, 14, 15, 6, 7, 11, 12, 13, 3, 14, 15, 6, 16, -1, -1, -1]
patterns: [[50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 0, 50, 1, 0, 1, 50, 0, 50, 0, 1, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 0, 50, 0, 50, 1, 50, 1, 1, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 46, 0, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 46, 0, 46, 1, 0, 1, 46, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 1, 41, 1, 1, 1, 41, 1, 1, 1, 0, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [0, 1, 46, 0, 74, 0, 74, 1, 0, 1, 46, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 74, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 1, 0, 1, 50, 1], [0, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 1, 50, 1, 1, 1, 50, 1, 1, 1, 0, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [48, 1, 1, 0, 1, 1, 48, 1, 0, 1, 48, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1], [1, 1, 1, 1, 50, 0, 50, 1, 0, 1, 50, 0, 50, 1, 0, 1, 50, 1, 0, 1, 1, 1, 50, 1, 0, 1, 50, 0, 50, 0, 50, 1], [0, 1, 1, 1, 1, 1, 46, 1, 0, 1, 46, 0, 46, 1, 0, 1, 46, 1, 0, 1, 1, 1, 46, 1, 0, 1, 46, 1, 0, 1, 46, 1], [0, 1, 1, 1, 1, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 1, 0, 1, 1, 1, 48, 1, 0, 1, 48, 0, 48, 0, 48, 1], [41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 1, 0, 1, 41, 1, 0, 1, 1, 1, 41, 1, 0, 1, 41, 0, 41, 0, 41, 1], [76, 0, 76, 0, 76, 0, 76, 1, 0, 1, 48, 1, 70, 1, 1, 1, 76, 1, 1, 1, 0, 1, 48, 1, 0, 1, 48, 1, 48, 0, 79, 0], [50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1, 50, 0, 50, 0, 50, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1, 47, 0, 47, 0, 47, 1, 1, 1], [45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1], [43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1, 43, 0, 43, 0, 43, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [1, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1, 45, 0, 45, 0, 45, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 18, 19, 22, 16, 17, 18, 18, 19, 18, 19, 18, 20, 21, 18, 18, 19, 23, 22, 24, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 74, 0, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 76, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 77, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [0, 1, 74, 0, 70, 0, 46, 1, 0, 1, 74, 1, 69, 1, 1, 1, 70, 1, 1, 1, 0, 1, 70, 1, 0, 1, 70, 0, 70, 0, 70, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 1], [0, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 1, 72, 1, 1, 1, 74, 1, 1, 1, 0, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [76, 1, 1, 0, 1, 1, 76, 1, 0, 1, 76, 1, 76, 1, 1, 1, 76, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1], [1, 1, 1, 1, 74, 0, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 0, 74, 0, 72, 1], [0, 1, 1, 1, 1, 1, 74, 1, 0, 1, 74, 0, 72, 1, 0, 1, 74, 1, 0, 1, 1, 1, 74, 1, 0, 1, 74, 1, 0, 1, 72, 1], [0, 1, 1, 1, 1, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 1, 0, 1, 1, 1, 76, 1, 0, 1, 76, 0, 76, 0, 76, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 67, 1], [72, 0, 72, 0, 72, 0, 48, 1, 0, 1, 72, 1, 74, 1, 1, 1, 72, 1, 1, 1, 0, 1, 76, 1, 0, 1, 76, 1, 74, 0, 48, 0], [69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1, 69, 0, 69, 0, 69, 1, 1, 1], [71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1, 71, 0, 71, 0, 71, 1, 1, 1], [66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1, 66, 0, 66, 0, 66, 1, 1, 1], [67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1, 67, 0, 67, 0, 67, 1, 1, 1], [52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1, 52, 0, 52, 0, 52, 1, 1, 1], [73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1, 73, 0, 73, 0, 73, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1, 64, 0, 64, 0, 64, 1, 1, 1], [1, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1]]
- numvoices: 1
order: [0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 2, 3, 9, 5, 6, 7, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 17, 18, 21, 16, 17, 18, 19, 18, 17, 18, 17, 20, 17, 18, 19, 18, 18, 22, 23, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, 10, 11, 12, 3, 13, 14, 6, 7, 10, 11, 12, 3, 13, 14, 6, 15, -1, -1, -1]
patterns: [[77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 77, 0, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 79, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 1, 81, 1, 1, 1, 81, 1, 1, 1, 0, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [0, 1, 70, 0, 46, 0, 70, 1, 0, 1, 70, 1, 46, 1, 1, 1, 46, 1, 1, 1, 0, 1, 46, 1, 0, 1, 46, 0, 46, 0, 46, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 1], [0, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 1, 76, 1, 1, 1, 77, 1, 1, 1, 0, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [79, 1, 1, 0, 1, 1, 79, 1, 0, 1, 79, 1, 79, 1, 1, 1, 79, 1, 1, 1, 0, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1], [1, 1, 1, 1, 77, 0, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 0, 77, 0, 76, 1], [0, 1, 1, 1, 1, 1, 77, 1, 0, 1, 77, 0, 76, 1, 0, 1, 77, 1, 0, 1, 1, 1, 77, 1, 0, 1, 77, 1, 0, 1, 76, 1], [0, 1, 1, 1, 1, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 1, 0, 1, 1, 1, 79, 1, 0, 1, 79, 0, 79, 0, 79, 1], [81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 1, 0, 1, 81, 1, 0, 1, 1, 1, 81, 1, 0, 1, 81, 0, 81, 0, 72, 1], [48, 0, 48, 0, 48, 0, 72, 1, 0, 1, 76, 1, 48, 1, 1, 1, 48, 1, 1, 1, 0, 1, 72, 1, 0, 1, 72, 1, 77, 0, 76, 0], [78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1, 78, 0, 78, 0, 78, 1, 1, 1], [81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1, 81, 0, 81, 0, 81, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1], [83, 0, 83, 0, 83, 1, 1, 1, 83, 0, 83, 0, 83, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1, 79, 0, 79, 0, 79, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1, 85, 0, 85, 0, 85, 1, 1, 1], [86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1], [1, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1, 86, 0, 86, 0, 86, 1, 1, 1]]
- numvoices: 2
order: [-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, 0, 1, 2, 3, 4, 5, 6, -1, 7, 8, 9, 10, 11, 12, 13, -1, 14, 10, 15, 1, 16, 12, 6, -1, 17, 8, 9, 10, 18, 19, 20, -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: [[66, 1, 78, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 67, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 1, 81, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [74, 1, 86, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 1, 85, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [71, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [69, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 74, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 1, 1, 1, 0, 1, 1, 1], [64, 1, 76, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 66, 1, 1, 0, 1, 1, 1, 1], [74, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 74, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [74, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2
order: [-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, 0, -1, -1, -1, 1, 2, 3, -1, 4, -1, -1, -1, 5, 6, 7, -1, 8, -1, -1, -1, 9, 6, 3, -1, 10, -1, -1, -1, 11, 12, 13, -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: [[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, 79, 0, 1, 1, 1, 1], [1, 83, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 81, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 0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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 32
length: 99
patch:
- name: kick edm 2
comment: Suggested note to play G-2 to C-3
numvoices: 1
units:
- type: envelope
id: 105
parameters: {attack: 0, channel: 2, decay: 69, gain: 80, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 106
parameters: {color: 128, detune: 69, gain: 80, lfo: 0, phase: 0, shape: 69, stereo: 0, transpose: 89, type: 0, unison: 2}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 0, damp: 0, decay: 43, dry: 128, feedback: 96, gain: 128, notetracking: 2, pregain: 40, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 127, panning: 64, shape: 105, stereo: 0}
- type: filter
id: 112
parameters: {auxgain: 64, bandpass: 0, frequency: 87, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 0, outgain: 64, resonance: 110, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 68, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 12, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 69, stereo: 0}
- type: filter
id: 14
parameters: {bandpass: 0, frequency: 12, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 33, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 42, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 62, decay: 76, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: send
id: 122
parameters: {amount: 46, port: 0, sendpop: 1, target: 106}
- name: snare edm 2
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 5, channel: 2, decay: 66, gain: 108, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, damp: 64, detune: 114, dry: 128, feedback: 125, gain: 49, lfo: 0, looplength: 1, loopstart: 4276, notetracking: 0, phase: 0, pregain: 40, samplestart: 560606, shape: 114, stereo: 0, transpose: 86, type: 4, unison: 3}
- type: distort
parameters: {drive: 99, gain: 128, 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: 77, shape: 7, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 1, frequency: 99, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 112, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 125, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 52, stereo: 0}
- type: outaux
parameters: {auxgain: 14, outgain: 71, 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: 69, 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: 101, 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: distort
parameters: {drive: 112, stereo: 0}
- type: filter
id: 5
parameters: {bandpass: 0, frequency: 54, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 77, stereo: 0}
- type: pan
id: 174
parameters: {panning: 60, stereo: 0}
- type: outaux
id: 161
parameters: {auxgain: 21, outgain: 17, stereo: 1}
- name: bass v3
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 200
parameters: {amount: 93, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 39, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 75, detune: 74, gain: 58, lfo: 0, phase: 64, shape: 103, stereo: 0, transpose: 76, type: 2, unison: 2}
- type: oscillator
id: 6
parameters: {color: 57, detune: 65, gain: 128, lfo: 0, phase: 71, shape: 57, stereo: 0, transpose: 64, type: 2, unison: 2}
- type: addp
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 37, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 72, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 100, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 86, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 5, outgain: 31, stereo: 1}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 8, decay: 100, gain: 128, release: 0, stereo: 1, sustain: 0}
- type: envelope
id: 231
parameters: {attack: 0, decay: 84, gain: 64, release: 78, stereo: 1, sustain: 0}
- type: mulp
id: 232
parameters: {stereo: 1}
- type: oscillator
id: 2
parameters: {color: 64, detune: 54, gain: 111, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 87, stereo: 1, transpose: 77, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 1}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 99, outgain: 128, panning: 64, stereo: 1}
- name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 37, 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: 127, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: pan
id: 7
parameters: {panning: 67, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 11, outgain: 128, stereo: 1}
- name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 64, detune: 82, gain: 128, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 78, stereo: 0, transpose: 64, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 1017
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 43, outgain: 89, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 83, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}
- name: SuperSaw
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 30, decay: 0, gain: 72, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 2
parameters: {color: 128, detune: 44, gain: 128, phase: 68, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 10
parameters: {color: 128, detune: 0, gain: 96, lfo: 0, phase: 37, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 11
parameters: {stereo: 0}
- type: noise
id: 23
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 24
parameters: {stereo: 0}
- type: mulp
id: 17
parameters: {stereo: 0}
- id: 18
parameters: {}
- type: envelope
id: 12
parameters: {attack: 20, decay: 0, gain: 64, release: 64, stereo: 0, sustain: 48}
- type: oscillator
id: 13
parameters: {color: 128, detune: 86, gain: 128, phase: 47, shape: 64, stereo: 0, transpose: 64, type: 1, unison: 3}
- type: oscillator
id: 14
parameters: {color: 128, detune: 110, gain: 93, lfo: 0, phase: 35, shape: 64, stereo: 0, transpose: 76, type: 1, unison: 3}
- type: addp
id: 28
parameters: {stereo: 0}
- type: noise
id: 27
parameters: {gain: 37, shape: 50, stereo: 0}
- type: addp
id: 15
parameters: {stereo: 0}
- type: mulp
id: 26
parameters: {stereo: 0}
- type: delay
parameters: {damp: 0, dry: 0, feedback: 0, notetracking: 0, pregain: 128, stereo: 0}
varargs: [69]
- type: pan
parameters: {panning: 56, stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 85, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: filter
id: 19
parameters: {bandpass: 1, frequency: 128, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 111, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 7, outgain: 24, stereo: 1}
- name: Trance bells
comment: |-
Generic pluck generator
Use oscillator type, color and shape to alter the sound properties
numvoices: 4
units:
- type: envelope
id: 163
parameters: {attack: 12, decay: 86, gain: 46, release: 78, stereo: 0, sustain: 57}
- type: envelope
id: 215
parameters: {attack: 26, decay: 89, gain: 82, release: 86, stereo: 0, sustain: 82}
- type: mulp
id: 216
parameters: {stereo: 0}
- type: oscillator
id: 164
parameters: {color: 64, detune: 64, gain: 128, lfo: 0, looplength: 1945, loopstart: 1315, phase: 128, samplestart: 1069972, shape: 64, stereo: 0, transpose: 69, type: 4, unison: 0}
- type: oscillator
id: 165
parameters: {color: 26, detune: 67, gain: 34, lfo: 0, phase: 0, shape: 68, stereo: 0, transpose: 76, type: 1, unison: 2}
- type: addp
id: 166
parameters: {stereo: 0}
- type: mulp
id: 214
parameters: {stereo: 0}
- type: envelope
id: 1005
parameters: {attack: 0, decay: 82, gain: 128, release: 78, stereo: 0, sustain: 128}
- type: oscillator
id: 1002
parameters: {color: 65, detune: 60, gain: 74, looplength: 1645, loopstart: 3820, phase: 0, samplestart: 551786, shape: 70, stereo: 0, transpose: 83, type: 4, unison: 1}
- parameters: {}
disabled: true
- type: mulp
parameters: {stereo: 0}
- type: delay
id: 1004
parameters: {damp: 22, dry: 67, feedback: 16, notetracking: 0, pregain: 67, stereo: 0}
varargs: [4533]
- type: xch
id: 1006
parameters: {stereo: 0}
- type: addp
id: 1003
parameters: {stereo: 0}
- type: filter
id: 217
parameters: {bandpass: 1, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 58, stereo: 0}
- type: filter
id: 218
parameters: {bandpass: 0, frequency: 92, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 168
parameters: {panning: 61, stereo: 0}
- type: delay
id: 169
parameters: {damp: 44, dry: 128, feedback: 91, notetracking: 0, pregain: 69, stereo: 1}
varargs: [14990, 22310, 20568, 33814]
- type: outaux
id: 172
parameters: {auxgain: 22, outgain: 23, stereo: 1}
- type: loadnote
id: 219
parameters: {stereo: 0}
- type: send
id: 220
parameters: {amount: 82, port: 0, sendpop: 1, stereo: 0, target: 218, unit: 0, voice: 0}
- name: Saw lead
numvoices: 3
units:
- type: envelope
id: 1007
parameters: {attack: 10, decay: 79, gain: 21, release: 73, stereo: 1, sustain: 82}
- type: oscillator
id: 1008
parameters: {color: 37, detune: 72, gain: 82, phase: 0, shape: 84, stereo: 1, transpose: 64, type: 2, unison: 3}
- type: mulp
id: 1009
parameters: {stereo: 1}
- type: pan
id: 1011
parameters: {panning: 56, stereo: 1}
- type: filter
id: 1015
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 55, stereo: 1}
- type: compressor
parameters: {attack: 43, invgain: 94, ratio: 100, release: 61, stereo: 1, threshold: 23}
- type: mulp
id: 1014
parameters: {stereo: 1}
- type: filter
id: 1016
parameters: {bandpass: 0, frequency: 84, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 1}
- type: delay
id: 1010
parameters: {damp: 18, dry: 128, feedback: 63, notetracking: 2, pregain: 41, stereo: 1}
varargs: [32, 32]
- type: outaux
id: 1012
parameters: {auxgain: 0, outgain: 38, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 32, dry: 115, feedback: 122, notetracking: 0, pregain: 57, 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}

BIN
music/4k_trance2.xrns Normal file

Binary file not shown.

BIN
music/4k_uus.4kp Normal file

Binary file not shown.

BIN
music/4k_uusi.xrns Normal file

Binary file not shown.

BIN
music/4k_ver1.xrns Normal file

Binary file not shown.

BIN
music/4k_ver2.xrns Normal file

Binary file not shown.

18
music/Crash909.yml Normal file
View File

@ -0,0 +1,18 @@
name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 79, gain: 64, release: 77, stereo: 1, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 64, detune: 68, gain: 128, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 64, stereo: 1, transpose: 76, 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: 50, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 64, outgain: 64, panning: 64, stereo: 1}

25
music/DiscoTom.yml Normal file
View File

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

50
music/FatBass.yml Normal file
View File

@ -0,0 +1,50 @@
name: bass v3
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 200
parameters: {amount: 95, port: 0, sendpop: 0, target: 170}
- type: send
id: 30
parameters: {amount: 37, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 126, detune: 64, gain: 128, lfo: 0, phase: 64, shape: 83, stereo: 0, transpose: 64, type: 0, unison: 1}
- type: oscillator
id: 6
parameters: {color: 123, detune: 65, gain: 128, lfo: 0, phase: 64, shape: 69, stereo: 0, transpose: 64, type: 1, unison: 0}
- type: addp
parameters: {stereo: 0}
- type: oscillator
id: 1033
parameters: {color: 62, detune: 64, gain: 128, looplength: 905, loopstart: 6513, phase: 42, samplestart: 1252819, shape: 104, stereo: 0, transpose: 93, type: 4, unison: 0}
- type: filter
id: 1034
parameters: {bandpass: 0, frequency: 69, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
id: 1035
parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 100, stereo: 0}
- type: addp
id: 1032
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 28, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 65, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 57, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 5, outgain: 31, stereo: 1}

30
music/Flute.yml Normal file
View File

@ -0,0 +1,30 @@
name: Flute
numvoices: 1
units:
- type: envelope
id: 51
parameters: {attack: 0, decay: 71, gain: 128, release: 69, stereo: 1, sustain: 82}
- type: oscillator
id: 57
parameters: {color: 64, detune: 64, gain: 77, looplength: 80, loopstart: 1948, phase: 0, samplestart: 577066, shape: 64, stereo: 1, transpose: 75, type: 4, unison: 0}
- type: mulp
id: 53
parameters: {stereo: 1}
- type: pan
id: 55
parameters: {panning: 73, stereo: 1}
- type: outaux
id: 56
parameters: {auxgain: 60, outgain: 75, stereo: 1}
- type: envelope
id: 61
parameters: {attack: 86, decay: 0, gain: 86, release: 78, stereo: 0, sustain: 128}
- type: oscillator
id: 59
parameters: {color: 128, detune: 64, gain: 71, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 82, type: 0}
- type: mulp
id: 62
parameters: {stereo: 0}
- type: send
id: 63
parameters: {amount: 89, port: 1, sendpop: 1, stereo: 0, target: 57, unit: 0, voice: 0}

43
music/Pizzicato.yml Normal file
View File

@ -0,0 +1,43 @@
name: Pizzicato
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 67, gain: 64, release: 62, stereo: 0, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 60, detune: 64, gain: 74, looplength: 137, loopstart: 549, phase: 0, samplestart: 1034191, shape: 89, stereo: 0, transpose: 40, type: 4, unison: 0}
- type: distort
id: 17
parameters: {drive: 93, stereo: 0}
disabled: true
- type: oscillator
id: 10
parameters: {color: 59, detune: 63, gain: 67, looplength: 100, loopstart: 942, phase: 0, samplestart: 1633072, shape: 56, stereo: 0, transpose: 55, type: 4, unison: 2}
disabled: true
- type: addp
id: 11
parameters: {stereo: 0}
disabled: true
- type: oscillator
parameters: {color: 64, detune: 63, gain: 128, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 42, stereo: 0, transpose: 65, type: 4, unison: 0}
- type: addp
id: 16
parameters: {stereo: 0}
- type: mulp
id: 14
parameters: {stereo: 0}
- parameters: {}
- type: filter
id: 15
parameters: {bandpass: 1, frequency: 55, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {panning: 64, stereo: 0}
- type: delay
id: 49
parameters: {damp: 98, dry: 128, feedback: 53, notetracking: 0, pregain: 69, stereo: 1}
varargs: [3835, 4533]
- type: outaux
id: 6
parameters: {auxgain: 39, outgain: 58, stereo: 1}

View File

@ -0,0 +1,42 @@
name: Pizzicato
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 74, gain: 64, release: 62, stereo: 0, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 60, detune: 64, gain: 89, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 89, stereo: 0, transpose: 65, type: 4, unison: 0}
- type: oscillator
id: 10
parameters: {color: 59, damp: 0, detune: 63, dry: 128, feedback: 96, gain: 67, looplength: 100, loopstart: 942, notetracking: 2, phase: 0, pregain: 40, samplestart: 1633072, shape: 56, stereo: 0, transpose: 55, type: 4, unison: 2}
disabled: true
- type: addp
id: 11
parameters: {panning: 64, stereo: 0}
disabled: true
- type: oscillator
parameters: {auxgain: 64, color: 64, detune: 63, gain: 128, looplength: 398, loopstart: 2073, outgain: 64, phase: 0, samplestart: 1034961, shape: 42, stereo: 0, transpose: 77, type: 4, unison: 0}
- type: distort
id: 50
parameters: {drive: 64, stereo: 0}
- type: addp
id: 16
parameters: {stereo: 0}
- type: filter
id: 15
parameters: {bandpass: 1, frequency: 47, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: mulp
id: 14
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- parameters: {}
- type: pan
id: 5
parameters: {auxgain: 39, outgain: 58, panning: 64, stereo: 0}
- type: delay
id: 49
parameters: {damp: 98, dry: 128, feedback: 53, notetracking: 0, pregain: 69, stereo: 1}
varargs: [3835, 4533]
- type: outaux
id: 6
parameters: {auxgain: 39, outgain: 58, stereo: 1}

64
music/Strings.yml Normal file
View File

@ -0,0 +1,64 @@
name: Strings
numvoices: 3
units:
- type: envelope
id: 33
parameters: {attack: 58, channel: 2, decay: 93, gain: 128, release: 71, stereo: 0, sustain: 64}
- type: oscillator
id: 19
parameters: {color: 65, damp: 64, detune: 64, dry: 128, feedback: 125, gain: 35, looplength: 9710, loopstart: 251, notetracking: 0, phase: 0, pregain: 40, samplestart: 1448797, shape: 67, stereo: 0, transpose: 79, type: 4, unison: 0}
- type: oscillator
id: 24
parameters: {color: 69, detune: 64, gain: 78, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 64, stereo: 0, transpose: 67, type: 4, unison: 1}
- type: distort
id: 47
parameters: {drive: 64, stereo: 0}
- type: addp
id: 20
parameters: {stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: envelope
id: 46
parameters: {attack: 58, decay: 93, gain: 80, panning: 64, release: 71, stereo: 0, sustain: 64}
- type: oscillator
id: 37
parameters: {auxgain: 35, color: 64, detune: 64, gain: 64, looplength: 9710, loopstart: 251, outgain: 40, phase: 0, samplestart: 1448797, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 1}
- type: oscillator
id: 38
parameters: {color: 128, detune: 58, gain: 68, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 80, stereo: 0, transpose: 67, type: 4, unison: 0}
- type: distort
id: 48
parameters: {drive: 32, stereo: 0}
- type: xch
id: 41
parameters: {stereo: 0}
- type: addp
id: 39
parameters: {stereo: 0}
- type: mulp
id: 35
parameters: {stereo: 0}
- type: filter
id: 45
parameters: {bandpass: 1, frequency: 90, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: outaux
id: 23
parameters: {auxgain: 35, outgain: 40, stereo: 1}
- type: envelope
id: 27
parameters: {attack: 97, decay: 63, gain: 128, release: 61, stereo: 0, sustain: 68}
- type: oscillator
id: 29
parameters: {color: 128, detune: 64, gain: 82, lfo: 1, phase: 0, shape: 35, stereo: 0, transpose: 82, type: 0}
- type: mulp
id: 31
parameters: {stereo: 0}
- id: 28
parameters: {}
- type: send
id: 44
parameters: {amount: 97, port: 1, sendpop: 0, stereo: 0, target: 24, unit: 0, voice: 0}
- type: send
id: 30
parameters: {amount: 35, port: 1, sendpop: 1, stereo: 0, target: 37, unit: 0, voice: 0}

60
music/SuperSaw.yml Normal file
View File

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

BIN
music/ba_reese.4ki Normal file

Binary file not shown.

78
music/ba_reese.yml Normal file
View File

@ -0,0 +1,78 @@
name: ba_reese
numvoices: 1
units:
- type: oscillator
id: 149
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 4, shape: 64, stereo: 1, transpose: 64, type: 1}
- type: send
id: 150
parameters: {amount: 52, port: 1, sendpop: 1, stereo: 1, target: 159}
- type: oscillator
id: 152
parameters: {color: 54, detune: 42, gain: 128, lfo: 1, phase: 55, shape: 63, stereo: 1, transpose: 41, type: 0}
- type: send
id: 153
parameters: {amount: 75, port: 1, sendpop: 0, stereo: 1, target: 160}
- type: send
id: 154
parameters: {amount: 59, port: 3, sendpop: 1, stereo: 1, target: 160}
- type: oscillator
id: 156
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 1, transpose: 74, type: 0}
- type: send
id: 157
parameters: {amount: 69, port: 1, sendpop: 1, stereo: 1, 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: 12, 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: 1, transpose: 40, type: 0, unison: 0}
- type: send
id: 192
parameters: {amount: 71, port: 0, sendpop: 1, stereo: 1, target: 190, unit: 0, voice: 0}
- type: oscillator
id: 197
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 1, transpose: 40, type: 0}
- type: send
id: 198
parameters: {amount: 86, port: 0, sendpop: 1, stereo: 1, target: 196, unit: 0, voice: 0}

BIN
music/ba_trana.4ki Normal file

Binary file not shown.

48
music/ba_trana.yml Normal file
View File

@ -0,0 +1,48 @@
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: 85, 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: 54, invgain: 61, ratio: 70, release: 59, stereo: 1, threshold: 29}
- type: mulp
id: 187
parameters: {stereo: 1}
- type: outaux
id: 184
parameters: {auxgain: 40, outgain: 58, stereo: 1}

22
music/hihat Normal file
View File

@ -0,0 +1,22 @@
name: hihat
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 37, 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: 83, type: 4}
- type: mulp
id: 239
parameters: {stereo: 1}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: filter
id: 240
parameters: {bandpass: 0, frequency: 86, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 93, stereo: 1}
- type: pan
id: 7
parameters: {panning: 67, stereo: 1}
- type: outaux
id: 11
parameters: {auxgain: 11, outgain: 128, stereo: 1}

BIN
music/hihat.4ki Normal file

Binary file not shown.

BIN
music/kick.4ki Normal file

Binary file not shown.

BIN
music/ky_sine.4ki Normal file

Binary file not shown.

23
music/open hihat Normal file
View File

@ -0,0 +1,23 @@
name: hihat open
numvoices: 2
units:
- type: envelope
id: 13
parameters: {attack: 0, decay: 77, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: oscillator
parameters: {color: 64, detune: 64, gain: 64, looplength: 3761, loopstart: 5808, phase: 0, samplestart: 867145, shape: 64, stereo: 0, transpose: 79, type: 4, unison: 0}
- type: mulp
id: 15
parameters: {stereo: 0}
- type: filter
id: 4
parameters: {bandpass: 1, frequency: 57, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 122, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 0, outgain: 59, stereo: 1}

33
music/piano Normal file
View File

@ -0,0 +1,33 @@
name: Piano
numvoices: 5
units:
- type: envelope
id: 1007
parameters: {attack: 19, decay: 90, gain: 128, release: 63, stereo: 1, sustain: 47}
- type: oscillator
id: 1008
parameters: {color: 61, detune: 62, gain: 114, looplength: 1339, loopstart: 9176, phase: 0, samplestart: 982589, shape: 58, stereo: 1, transpose: 72, type: 4, unison: 1}
- type: mulp
id: 1009
parameters: {stereo: 1}
- type: pan
id: 1011
parameters: {panning: 57, stereo: 1}
- type: filter
id: 1015
parameters: {bandpass: 0, frequency: 108, highpass: 0, lowpass: 1, negbandpass: 1, neghighpass: 1, resonance: 95, stereo: 1}
- type: compressor
parameters: {attack: 46, invgain: 89, ratio: 101, release: 77, stereo: 1, threshold: 12}
- type: mulp
id: 1014
parameters: {stereo: 1}
- type: filter
id: 1016
parameters: {bandpass: 0, frequency: 58, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 1}
- type: delay
id: 1010
parameters: {damp: 106, dry: 97, feedback: 0, notetracking: 2, pregain: 28, stereo: 1}
varargs: [12, 18]
- type: outaux
id: 1012
parameters: {auxgain: 5, outgain: 56, stereo: 1}

BIN
music/snare.4ki Normal file

Binary file not shown.

38
music/snare.yml Normal file
View File

@ -0,0 +1,38 @@
name: snare edm 2 (sample)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 5, channel: 2, decay: 66, gain: 108, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 64, damp: 64, detune: 114, dry: 128, feedback: 125, gain: 49, lfo: 0, looplength: 1, loopstart: 4276, notetracking: 0, phase: 0, pregain: 40, samplestart: 560606, shape: 114, stereo: 0, transpose: 86, type: 4, unison: 3}
- type: distort
parameters: {drive: 99, gain: 128, 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: 77, shape: 7, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 1, frequency: 99, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 112, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 125, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 52, stereo: 0}
- type: outaux
parameters: {auxgain: 14, outgain: 71, 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}

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}

424
music/song.yml Normal file
View File

@ -0,0 +1,424 @@
bpm: 165
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]]
- 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]]
- 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]]
- 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]]
- 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]]
rowsperpattern: 16
length: 52
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
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}
- 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}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 28, decay: 45, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 102, shape: 84, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 93, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 63, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 75, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 87, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 66, 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}
- type: filter
id: 15
parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0}
- id: 203
parameters: {}
- 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}
- type: envelope
id: 119
parameters: {attack: 71, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 74}
- type: envelope
id: 120
parameters: {attack: 49, decay: 71, gain: 128, release: 0, stereo: 0, sustain: 121}
- type: mulp
id: 121
parameters: {stereo: 0}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- id: 204
parameters: {}
- 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}
- type: mulp
id: 130
parameters: {stereo: 0}
- type: filter
id: 131
parameters: {bandpass: 0, frequency: 87, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- 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}
- 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: envelope
id: 148
parameters: {attack: 23, decay: 85, gain: 119, release: 38, stereo: 0, sustain: 113}
- type: pop
id: 188
parameters: {stereo: 0}
- 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: 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: 0}
- type: xch
id: 195
parameters: {stereo: 0}
- type: filter
id: 196
parameters: {bandpass: 0, frequency: 94, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 78, stereo: 0}
- 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}
- 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}
- id: 202
parameters: {}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 77, dry: 128, feedback: 114, notetracking: 0, pregain: 50, 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}

299
music/song_flute Normal file
View File

@ -0,0 +1,299 @@
bpm: 100
rowsperbeat: 4
score:
tracks:
- numvoices: 1
order: [0]
patterns: [[72, 0]]
rowsperpattern: 16
length: 1
patch:
- name: Strings
numvoices: 5
units:
- type: envelope
id: 33
parameters: {attack: 57, channel: 2, decay: 85, gain: 71, release: 67, stereo: 0, sustain: 62}
- type: oscillator
id: 19
parameters: {color: 65, damp: 64, detune: 64, dry: 128, feedback: 125, gain: 35, looplength: 9710, loopstart: 251, notetracking: 0, phase: 0, pregain: 40, samplestart: 1448797, shape: 67, stereo: 0, transpose: 91, type: 4, unison: 0}
- type: oscillator
id: 24
parameters: {color: 69, detune: 64, gain: 78, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 65, stereo: 0, transpose: 79, type: 4, unison: 0}
- type: distort
id: 47
parameters: {drive: 64, stereo: 0}
- type: addp
id: 20
parameters: {stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: envelope
id: 46
parameters: {attack: 57, decay: 87, gain: 71, panning: 64, release: 70, stereo: 0, sustain: 50}
- type: oscillator
id: 37
parameters: {auxgain: 35, color: 64, detune: 64, gain: 64, looplength: 9710, loopstart: 251, outgain: 40, phase: 0, samplestart: 1448797, shape: 64, stereo: 0, transpose: 91, type: 4, unison: 1}
- type: oscillator
id: 38
parameters: {color: 128, detune: 64, gain: 68, looplength: 10741, loopstart: 284, phase: 0, samplestart: 1351767, shape: 80, stereo: 0, transpose: 79, type: 4, unison: 0}
- type: distort
id: 48
parameters: {drive: 32, stereo: 0}
- type: xch
id: 41
parameters: {stereo: 0}
- type: addp
id: 39
parameters: {stereo: 0}
- type: mulp
id: 35
parameters: {stereo: 0}
- type: filter
id: 45
parameters: {bandpass: 1, frequency: 92, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 1}
- type: outaux
id: 23
parameters: {auxgain: 25, outgain: 27, stereo: 1}
- name: Pizzicato
numvoices: 4
units:
- type: envelope
id: 1
parameters: {attack: 10, decay: 70, gain: 59, release: 72, stereo: 0, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 60, detune: 64, gain: 74, looplength: 398, loopstart: 2073, phase: 0, samplestart: 1034961, shape: 81, stereo: 0, transpose: 77, type: 4, unison: 2}
- type: oscillator
parameters: {auxgain: 64, color: 64, detune: 64, gain: 128, looplength: 398, loopstart: 2073, outgain: 64, phase: 0, samplestart: 1034961, shape: 42, stereo: 0, transpose: 77, type: 4, unison: 0}
- type: addp
id: 16
parameters: {stereo: 0}
- type: filter
id: 15
parameters: {bandpass: 1, frequency: 47, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: mulp
id: 14
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- parameters: {}
- type: pan
id: 5
parameters: {auxgain: 39, outgain: 58, panning: 64, stereo: 0}
- type: delay
id: 49
parameters: {damp: 98, dry: 128, feedback: 53, notetracking: 0, pregain: 69, stereo: 1}
varargs: [5230, 4533]
- type: outaux
id: 6
parameters: {auxgain: 39, outgain: 58, stereo: 1}
- name: Flute
numvoices: 3
units:
- type: envelope
id: 51
parameters: {attack: 39, decay: 67, gain: 82, release: 71, stereo: 1, sustain: 87}
- type: oscillator
id: 1037
parameters: {color: 128, detune: 65, gain: 71, phase: 40, shape: 108, stereo: 1, transpose: 88, type: 0, unison: 0}
- type: mulp
id: 53
parameters: {stereo: 1}
- type: delay
parameters: {damp: 0, dry: 128, feedback: 78, notetracking: 2, pregain: 66, stereo: 1}
varargs: [32, 72]
- type: pan
id: 55
parameters: {panning: 73, stereo: 1}
- type: outaux
id: 56
parameters: {auxgain: 72, outgain: 75, stereo: 1}
- type: envelope
id: 61
parameters: {attack: 95, decay: 0, gain: 82, release: 89, stereo: 0, sustain: 92}
- type: oscillator
id: 59
parameters: {color: 128, detune: 64, gain: 128, lfo: 1, phase: 0, shape: 64, stereo: 0, transpose: 81, type: 0}
- type: mulp
id: 62
parameters: {stereo: 0}
- type: send
id: 1038
parameters: {amount: 89, port: 1, sendpop: 1, stereo: 0, target: 1037, unit: 0, voice: 0}
- name: FatBass
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 20, decay: 71, gain: 128, release: 74, stereo: 0, sustain: 40}
- type: send
id: 30
parameters: {amount: 37, port: 3, sendpop: 1, target: 400, voice: 0}
- type: envelope
id: 21
parameters: {attack: 40, decay: 65, gain: 74, release: 71, stereo: 0, sustain: 77}
- type: oscillator
id: 400
parameters: {color: 126, detune: 64, gain: 128, lfo: 0, phase: 64, shape: 64, stereo: 0, transpose: 52, type: 0, unison: 2}
- type: oscillator
id: 6
parameters: {color: 118, detune: 64, gain: 128, lfo: 0, phase: 75, shape: 61, stereo: 0, transpose: 64, type: 1, unison: 1}
- type: addp
parameters: {stereo: 0}
- type: oscillator
id: 1033
parameters: {color: 62, detune: 64, gain: 128, looplength: 905, loopstart: 6513, phase: 42, samplestart: 1252819, shape: 104, stereo: 0, transpose: 93, type: 4, unison: 0}
- type: filter
id: 1034
parameters: {bandpass: 0, frequency: 69, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
id: 1035
parameters: {bandpass: 0, frequency: 50, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 100, stereo: 0}
- type: addp
id: 1032
parameters: {stereo: 0}
- type: mulp
id: 22
parameters: {stereo: 0}
- type: filter
id: 170
parameters: {bandpass: 0, frequency: 52, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
disabled: true
- type: filter
parameters: {bandpass: 0, frequency: 94, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 18
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 19
parameters: {auxgain: 5, outgain: 31, stereo: 1}
- name: Instr
numvoices: 1
units:
- type: envelope
id: 1039
parameters: {attack: 0, decay: 43, gain: 128, release: 50, stereo: 0, sustain: 89}
- type: oscillator
id: 1040
parameters: {color: 42, detune: 42, gain: 128, looplength: 1, loopstart: 1034, phase: 0, samplestart: 741926, shape: 72, stereo: 0, transpose: 79, type: 4}
- type: mulp
id: 1041
parameters: {stereo: 0}
- type: pan
id: 1043
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 1044
parameters: {auxgain: 0, outgain: 124, stereo: 1}
- name: snare edm 2 (sample-st)
comment: 'Suggested range: E-2 to C-3'
numvoices: 1
units:
- type: envelope
parameters: {attack: 14, decay: 68, gain: 110, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 200
parameters: {color: 48, detune: 52, gain: 53, lfo: 0, looplength: 1, loopstart: 4276, phase: 0, samplestart: 560606, shape: 81, stereo: 0, transpose: 76, type: 4}
- parameters: {}
- 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: 39, shape: 2, stereo: 0}
- type: mulp
parameters: {stereo: 0}
- type: filter
id: 201
parameters: {bandpass: 0, frequency: 110, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: filter
parameters: {bandpass: 0, frequency: 118, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 112, stereo: 0}
- type: addp
parameters: {stereo: 0}
- type: pan
parameters: {panning: 59, stereo: 0}
- type: outaux
parameters: {auxgain: 8, outgain: 128, stereo: 1}
- type: envelope
parameters: {attack: 38, decay: 49, gain: 128, release: 0, stereo: 0, sustain: 0}
disabled: true
- type: send
parameters: {amount: 70, port: 0, sendpop: 1, target: 200}
disabled: true
- 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: hihat closed
numvoices: 1
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 61, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: envelope
id: 13
parameters: {attack: 18, decay: 62, gain: 94, release: 0, stereo: 0, sustain: 0}
- type: mulp
id: 14
parameters: {stereo: 0}
- type: noise
id: 2
parameters: {gain: 63, shape: 52, stereo: 0}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 4
parameters: {bandpass: 1, frequency: 116, highpass: 1, lowpass: 0, negbandpass: 1, neghighpass: 0, resonance: 98, stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 119, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 0, outgain: 59, stereo: 1}
- type: noise
id: 10
parameters: {gain: 9, shape: 65, stereo: 0}
- type: hold
parameters: {holdfreq: 0, stereo: 0}
- type: send
id: 11
parameters: {amount: 20, port: 0, sendpop: 1, stereo: 0, target: 4, unit: 0, voice: 0}
- name: Crash909
numvoices: 2
units:
- type: envelope
id: 1
parameters: {attack: 0, decay: 79, gain: 64, release: 77, stereo: 1, sustain: 0}
- type: oscillator
id: 2
parameters: {color: 64, detune: 68, gain: 128, looplength: 5676, loopstart: 2615, phase: 0, samplestart: 433554, shape: 64, stereo: 1, transpose: 76, 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: 50, pregain: 40, stereo: 1}
- type: outaux
id: 6
parameters: {auxgain: 64, outgain: 64, panning: 64, stereo: 1}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 25, dry: 128, feedback: 125, notetracking: 0, pregain: 30, 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}

396
music/song_optimized.yml Normal file
View File

@ -0,0 +1,396 @@
bpm: 165
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]]
- 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]]
- 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]]
- 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]]
- 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]]
rowsperpattern: 16
length: 52
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
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}
- 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}
- type: mulp
id: 126
parameters: {stereo: 0}
- type: envelope
id: 110
parameters: {attack: 28, decay: 45, gain: 128, release: 0, stereo: 0, sustain: 0}
- type: noise
id: 111
parameters: {gain: 102, shape: 84, stereo: 0}
- type: filter
id: 112
parameters: {bandpass: 0, frequency: 93, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 63, stereo: 0}
- type: filter
id: 113
parameters: {bandpass: 0, frequency: 75, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 0, resonance: 87, stereo: 0}
- type: mulp
id: 10
parameters: {stereo: 0}
- type: addp
id: 127
parameters: {stereo: 0}
- type: filter
id: 12
parameters: {bandpass: 0, frequency: 11, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 66, 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}
- type: filter
id: 15
parameters: {bandpass: 0, frequency: 13, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 54, stereo: 0}
- type: pan
id: 114
parameters: {panning: 64, stereo: 0}
- type: outaux
id: 118
parameters: {auxgain: 0, outgain: 128, stereo: 1}
- type: envelope
id: 119
parameters: {attack: 71, decay: 128, gain: 128, release: 0, stereo: 0, sustain: 74}
- type: envelope
id: 120
parameters: {attack: 49, decay: 71, gain: 128, release: 0, stereo: 0, sustain: 121}
- type: mulp
id: 121
parameters: {stereo: 0}
- type: send
id: 122
parameters: {amount: 0, port: 0, sendpop: 1, target: 106}
- 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}
- type: mulp
id: 130
parameters: {stereo: 0}
- type: filter
id: 131
parameters: {bandpass: 0, frequency: 87, highpass: 1, lowpass: 0, negbandpass: 0, neghighpass: 0, resonance: 128, stereo: 0}
- 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}
- type: pan
id: 134
parameters: {panning: 61, stereo: 0}
- type: outaux
id: 11
parameters: {auxgain: 0, outgain: 45, stereo: 1}
- name: ba_reese
numvoices: 1
units:
- type: envelope
id: 148
parameters: {attack: 23, decay: 85, gain: 119, release: 38, stereo: 0, sustain: 113}
- type: pop
id: 188
parameters: {stereo: 0}
- 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: 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: 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: 93, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 74, stereo: 0}
- type: xch
id: 195
parameters: {stereo: 0}
- type: filter
id: 196
parameters: {bandpass: 0, frequency: 94, highpass: 1, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 78, stereo: 0}
- 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}
- 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}
- name: Global
numvoices: 1
units:
- type: in
id: 7
parameters: {channel: 2, stereo: 1}
- type: delay
id: 8
parameters: {damp: 77, dry: 128, feedback: 114, notetracking: 0, pregain: 50, 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}

BIN
music/sounds_v1.4kp Normal file

Binary file not shown.

BIN
music/sounds_v2.4kp Normal file

Binary file not shown.

27
music/tom Normal file
View File

@ -0,0 +1,27 @@
name: DiscoTom
numvoices: 1
units:
- type: envelope
id: 900
parameters: {attack: 1, decay: 74, gain: 64, release: 0, stereo: 0, sustain: 0}
- type: oscillator
id: 1001
parameters: {color: 64, detune: 82, gain: 128, looplength: 104, loopstart: 831, phase: 0, samplestart: 1543725, shape: 78, stereo: 0, transpose: 64, type: 4, unison: 0}
- type: mulp
id: 3
parameters: {stereo: 0}
- type: filter
id: 1017
parameters: {bandpass: 0, frequency: 82, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 128, stereo: 0}
- type: pan
id: 5
parameters: {damp: 0, dry: 128, feedback: 96, notetracking: 2, panning: 64, pregain: 40, stereo: 0}
- type: outaux
id: 6
parameters: {auxgain: 43, outgain: 89, panning: 64, stereo: 1}
- type: envelope
id: 7
parameters: {attack: 1, decay: 78, gain: 64, release: 74, stereo: 0, sustain: 36}
- type: send
id: 8
parameters: {amount: 83, port: 0, sendpop: 1, stereo: 0, target: 1001, unit: 0, voice: 0}

416
patterns.dbg Normal file
View File

@ -0,0 +1,416 @@
Instrument0:
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, 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, 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, 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, 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, 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, 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, 57, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, 57, 57, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, 57, 57, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, 57, 57, 57, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 57, HLD, HLD, HLD, 57, 57, HLD, HLD, 57, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,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LD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, 46, 46, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, 46, 46, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, 46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 46, 46, HLD, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0,
Instrument2:
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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD, 48, HLD, 48, HLD, HLD, HLD, 48, HLD,
HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0,
Instrument3:
50, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
48, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 48, HLD, 50, HLD, 53, HLD,
43, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 43, HLD, 45, HLD, 46, HLD, 48, HLD,
46, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 48, HLD, 50, HLD,
52, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 45, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
50, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 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, 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,
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 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, 0, 0, 0, 0, 0, 0, 0, 0,
Instrument4:
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 72, 0,
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,
62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 65, 0, 69, 0, 65, 0, 64, 0, 62, 0, 64, 0, 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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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD,
48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD,
46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD,
43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD,
50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD,
48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD,
46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD,
43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD,
50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD,
48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD,
46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD,
43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD,
50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD, 50, 0, 50, HLD,
48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD, 48, 0, 48, HLD,
46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD, 46, 0, 46, HLD,
43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, HLD, 43, 0, 43, 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,
Instrument6:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

998
petrinshader.glsl Normal file
View File

@ -0,0 +1,998 @@
precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
uniform sampler2D texture_sampler;
uniform sampler2D texts;
struct Ray {
vec3 rd;
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);
}
////////////////////////////////////////////////////////////////
//
// HG_SDF
//
// GLSL LIBRARY FOR BUILDING SIGNED DISTANCE BOUNDS
//
// version 2021-07-28
//
// Check https://mercury.sexy/hg_sdf for updates
// and usage examples. Send feedback to spheretracing@mercury.sexy.
//
// Brought to you by MERCURY https://mercury.sexy/
//
//
//
// Released dual-licensed under
// Creative Commons Attribution-NonCommercial (CC BY-NC)
// or
// MIT License
// at your choice.
//
// SPDX-License-Identifier: MIT OR CC-BY-NC-4.0
//
// /////
////////////////////////////////////////////////////////////////
//
// HELPER FUNCTIONS/MACROS
//
////////////////////////////////////////////////////////////////
const float PI = 3.14159265;
const float TAU = (2.*PI);
const float PHI = sqrt(5.)*0.5 + 0.5;
// Sign function that doesn't return 0
float sgn(float x) {
return (x < 0. )? -1. : 1.;
}
vec2 sgn(vec2 v) {
return vec2((v.x<0.)?-1.:1., (v.y<0.)?-1.:1.);
}
float square (float x) {
return x*x;
}
vec2 square (vec2 x) {
return x*x;
}
vec3 square (vec3 x) {
return x*x;
}
float lengthSqr(vec3 x) {
return dot(x, x);
}
// Maximum/minumum elements of a vector
float vmax(vec2 v) {
return max(v.x, v.y);
}
float vmax(vec3 v) {
return max(max(v.x, v.y), v.z);
}
float vmax(vec4 v) {
return max(max(v.x, v.y), max(v.z, v.w));
}
float vmin(vec2 v) {
return min(v.x, v.y);
}
float vmin(vec3 v) {
return min(min(v.x, v.y), v.z);
}
float vmin(vec4 v) {
return min(min(v.x, v.y), min(v.z, v.w));
}
////////////////////////////////////////////////////////////////
//
// PRIMITIVE DISTANCE FUNCTIONS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that is a distance function is called fSomething.
// The first argument is always a point in 2 or 3-space called <p>.
// Unless otherwise noted, (if the object has an intrinsic "up"
// side or direction) the y axis is "up" and the object is
// centered at the origin.
//
////////////////////////////////////////////////////////////////
float fSphere(vec3 p, float r) {
return length(p) - r;
}
// Plane with normal n (n is normalized) at some distance from the origin
float fPlane(vec3 p, vec3 n, float distanceFromOrigin) {
return dot(p, n) + distanceFromOrigin;
}
// Cheap Box: distance to corners is overestimated
float fBoxCheap(vec3 p, vec3 b) { //cheap box
return vmax(abs(p) - b);
}
// Box: correct distance to corners
float fBox(vec3 p, vec3 b) {
vec3 d = abs(p) - b;
return length(max(d, vec3(0))) + vmax(min(d, vec3(0)));
}
// Same as above, but in two dimensions (an endless box)
float fBox2Cheap(vec2 p, vec2 b) {
return vmax(abs(p)-b);
}
float fBox2(vec2 p, vec2 b) {
vec2 d = abs(p) - b;
return length(max(d, vec2(0.))) + vmax(min(d, vec2(0.)));
}
// Endless "corner"
float fCorner (vec2 p) {
return length(max(p, vec2(0.))) + vmax(min(p, vec2(0.)));
}
// Cylinder standing upright on the xz plane
float fCylinder(vec3 p, float r, float height) {
float d = length(p.xz) - r;
d = max(d, abs(p.y) - height);
return d;
}
// Capsule: A Cylinder with round caps on both sides
float fCapsule(vec3 p, float r, float c) {
return mix(length(p.xz) - r, length(vec3(p.x, abs(p.y) - c, p.z)) - r, step(c, abs(p.y)));
}
// Distance to line segment between <a> and <b>, used for fCapsule() version 2below
float fLineSegment(vec3 p, vec3 a, vec3 b) {
vec3 ab = b - a;
float t = clamp( dot(p - a, ab) / dot(ab, ab), 0., 1. );
return length((ab*t + a) - p);
}
// Capsule version 2: between two end points <a> and <b> with radius r
float fCapsule(vec3 p, vec3 a, vec3 b, float r) {
return fLineSegment(p, a, b) - r;
}
// Torus in the XZ-plane
float fTorus(vec3 p, float smallRadius, float largeRadius) {
return length(vec2(length(p.xz) - largeRadius, p.y)) - smallRadius;
}
// A circle line. Can also be used to make a torus by subtracting the smaller radius of the torus.
float fCircle(vec3 p, float r) {
float l = length(p.xz) - r;
return length(vec2(p.y, l));
}
// A circular disc with no thickness (i.e. a cylinder with no height).
// Subtract some value to make a flat disc with rounded edge.
float fDisc(vec3 p, float r) {
float l = length(p.xz) - r;
return l < 0. ? abs(p.y) : length(vec2(p.y, l));
}
// Hexagonal prism, circumcircle variant
float fHexagonCircumcircle(vec3 p, vec2 h) {
vec3 q = abs(p);
return max(q.y - h.y, max(q.x*sqrt(3.)*0.5 + q.z*0.5, q.z) - h.x);
//this is mathematically equivalent to this line, but less efficient:
//return max(q.y - h.y, max(dot(vec2(cos(PI/3), sin(PI/3)), q.zx), q.z) - h.x);
}
// Hexagonal prism, incircle variant
float fHexagonIncircle(vec3 p, vec2 h) {
return fHexagonCircumcircle(p, vec2(h.x*sqrt(3.)*0.5, h.y));
}
// Cone with correct distances to tip and base circle. Y is up, 0 is in the middle of the base.
float fCone(vec3 p, float radius, float height) {
vec2 q = vec2(length(p.xz), p.y);
vec2 tip = q - vec2(0, height);
vec2 mantleDir = normalize(vec2(height, radius));
float mantle = dot(tip, mantleDir);
float d = max(mantle, -q.y);
float projected = dot(tip, vec2(mantleDir.y, -mantleDir.x));
// distance to tip
if ((q.y > height) && (projected < 0.)) {
d = max(d, length(tip));
}
// distance to base ring
if ((q.x > radius) && (projected > length(vec2(height, radius)))) {
d = max(d, length(q - vec2(radius, 0)));
}
return d;
}
////////////////////////////////////////////////////////////////
//
// DOMAIN MANIPULATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that modifies the domain is named pSomething.
//
// Many operate only on a subset of the three dimensions. For those,
// you must choose the dimensions that you want manipulated
// by supplying e.g. <p.x> or <p.zx>
//
// <inout p> is always the first argument and modified in place.
//
// Many of the operators partition space into cells. An identifier
// or cell index is returned, if possible. This return value is
// intended to be optionally used e.g. as a random seed to change
// parameters of the distance functions inside the cells.
//
// Unless stated otherwise, for cell index 0, <p> is unchanged and cells
// are centered on the origin so objects don't have to be moved to fit.
//
//
////////////////////////////////////////////////////////////////
// Rotate around a coordinate axis (i.e. in a plane perpendicular to that axis) by angle <a>.
// Read like this: R(p.xz, a) rotates "x towards z".
// This is fast if <a> is a compile-time constant and slower (but still practical) if not.
void pR(inout vec2 p, float a) {
p = cos(a)*p + sin(a)*vec2(p.y, -p.x);
}
// Shortcut for 45-degrees rotation
void pR45(inout vec2 p) {
p = (p + vec2(p.y, -p.x))*sqrt(0.5);
}
// Repeat space along one axis. Use like this to repeat along the x axis:
// <float cell = pMod1(p.x,5);> - using the return value is optional.
float pMod1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Same, but mirror every second cell so they match at the boundaries
float pModMirror1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize,size) - halfsize;
p *= mod(c, 2.0)*2. - 1.;
return c;
}
// Repeat the domain only in positive direction. Everything in the negative half-space is unchanged.
float pModSingle1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
if (p >= 0.)
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Repeat only a few times: from indices <start> to <stop> (similar to above, but more flexible)
float pModInterval1(inout float p, float size, float start, float stop) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p+halfsize, size) - halfsize;
if (c > stop) { //yes, this might not be the best thing numerically.
p += size*(c - stop);
c = stop;
}
if (c <start) {
p += size*(c - start);
c = start;
}
return c;
}
// Repeat around the origin by a fixed angle.
// For easier use, num of repetitions is use to specify the angle.
float pModPolar(inout vec2 p, float repetitions) {
float angle = 2.*PI/repetitions;
float a = atan(p.y, p.x) + angle/2.;
float r = length(p);
float c = floor(a/angle);
a = mod(a,angle) - angle/2.;
p = vec2(cos(a), sin(a))*r;
// For an odd number of repetitions, fix cell index of the cell in -x direction
// (cell index would be e.g. -5 and 5 in the two halves of the cell):
if (abs(c) >= (repetitions/2.)) c = abs(c);
return c;
}
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5,size) - size*0.5;
return c;
}
// Same, but mirror every second cell so all boundaries match
vec2 pModMirror2(inout vec2 p, vec2 size) {
vec2 halfsize = size*0.5;
vec2 c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
p *= mod(c,vec2(2.))*2. - vec2(1);
return c;
}
// Same, but mirror every second cell at the diagonal as well
vec2 pModGrid2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
p *= mod(c,vec2(2.))*2. - vec2(1.);
p -= size/2.;
if (p.x > p.y) p.xy = p.yx;
return floor(c/2.);
}
// Repeat in three dimensions
vec3 pMod3(inout vec3 p, vec3 size) {
vec3 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
return c;
}
// Mirror at an axis-aligned plane which is at a specified distance <dist> from the origin.
float pMirror (inout float p, float dist) {
float s = sgn(p);
p = abs(p)-dist;
return s;
}
// Mirror in both dimensions and at the diagonal, yielding one eighth of the space.
// translate by dist before mirroring.
vec2 pMirrorOctant (inout vec2 p, vec2 dist) {
vec2 s = sgn(p);
pMirror(p.x, dist.x);
pMirror(p.y, dist.y);
if (p.y > p.x)
p.xy = p.yx;
return s;
}
// Reflect space at a plane
float pReflect(inout vec3 p, vec3 planeNormal, float offset) {
float t = dot(p, planeNormal)+offset;
if (t < 0.) {
p = p - (2.*t)*planeNormal;
}
return sgn(t);
}
////////////////////////////////////////////////////////////////
//
// OBJECT COMBINATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// We usually need the following boolean operators to combine two objects:
// Union: OR(a,b)
// Intersection: AND(a,b)
// Difference: AND(a,!b)
// (a and b being the distances to the objects).
//
// The trivial implementations are min(a,b) for union, max(a,b) for intersection
// and max(a,-b) for difference. To combine objects in more interesting ways to
// produce rounded edges, chamfers, stairs, etc. instead of plain sharp edges we
// can use combination operators. It is common to use some kind of "smooth minimum"
// instead of min(), but we don't like that because it does not preserve Lipschitz
// continuity in many cases.
//
// Naming convention: since they return a distance, they are called fOpSomething.
// The different flavours usually implement all the boolean operators above
// and are called fOpUnionRound, fOpIntersectionRound, etc.
//
// The basic idea: Assume the object surfaces intersect at a right angle. The two
// distances <a> and <b> constitute a new local two-dimensional coordinate system
// with the actual intersection as the origin. In this coordinate system, we can
// evaluate any 2D distance function we want in order to shape the edge.
//
// The operators below are just those that we found useful or interesting and should
// be seen as examples. There are infinitely more possible operators.
//
// They are designed to actually produce correct distances or distance bounds, unlike
// popular "smooth minimum" operators, on the condition that the gradients of the two
// SDFs are at right angles. When they are off by more than 30 degrees or so, the
// Lipschitz condition will no longer hold (i.e. you might get artifacts). The worst
// case is parallel surfaces that are close to each other.
//
// Most have a float argument <r> to specify the radius of the feature they represent.
// This should be much smaller than the object size.
//
// Some of them have checks like "if ((-a < r) && (-b < r))" that restrict
// their influence (and computation cost) to a certain area. You might
// want to lift that restriction or enforce it. We have left it as comments
// in some cases.
//
// usage example:
//
// float fTwoBoxes(vec3 p) {
// float box0 = fBox(p, vec3(1));
// float box1 = fBox(p-vec3(1), vec3(1));
// return fOpUnionChamfer(box0, box1, 0.2);
// }
//
////////////////////////////////////////////////////////////////
// The "Chamfer" flavour makes a 45-degree chamfered edge (the diagonal of a square of size <r>):
float fOpUnionChamfer(float a, float b, float r) {
return min(min(a, b), (a - r + b)*sqrt(0.5));
}
// Intersection has to deal with what is normally the inside of the resulting object
// when using union, which we normally don't care about too much. Thus, intersection
// implementations sometimes differ from union implementations.
float fOpIntersectionChamfer(float a, float b, float r) {
return max(max(a, b), (a + r + b)*sqrt(0.5));
}
// Difference can be built from Intersection or Union:
float fOpDifferenceChamfer (float a, float b, float r) {
return fOpIntersectionChamfer(a, -b, r);
}
// The "Round" variant uses a quarter-circle to join the two objects smoothly:
float fOpUnionRound(float a, float b, float r) {
vec2 u = max(vec2(r - a,r - b), vec2(0));
return max(r, min (a, b)) - length(u);
}
float fOpIntersectionRound(float a, float b, float r) {
vec2 u = max(vec2(r + a,r + b), vec2(0));
return min(-r, max (a, b)) + length(u);
}
float fOpDifferenceRound (float a, float b, float r) {
return fOpIntersectionRound(a, -b, r);
}
// The "Columns" flavour makes n-1 circular columns at a 45 degree angle:
float fOpUnionColumns(float a, float b, float r, float n) {
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.x -= sqrt(2.)/2.*r;
p.x += columnradius*sqrt(2.);
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
// At this point, we have turned 45 degrees and moved at a point on the
// diagonal that we want to place the columns on.
// Now, repeat the domain along this direction and place a circle.
pMod1(p.y, columnradius*2.);
float result = length(p) - columnradius;
result = min(result, p.x);
result = min(result, a);
return min(result, b);
} else {
return min(a, b);
}
}
float fOpDifferenceColumns(float a, float b, float r, float n) {
a = -a;
float m = min(a, b);
//avoid the expensive computation where not needed (produces discontinuity though)
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/n/2.0;
columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.y += columnradius;
p.x -= sqrt(2.)/2.*r;
p.x += -columnradius*sqrt(2.)/2.;
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
pMod1(p.y,columnradius*2.);
float result = -length(p) + columnradius;
result = max(result, p.x);
result = min(result, a);
return -min(result, b);
} else {
return -m;
}
}
float fOpIntersectionColumns(float a, float b, float r, float n) {
return fOpDifferenceColumns(a,-b,r, n);
}
// The "Stairs" flavour produces n-1 steps of a staircase:
// much less stupid version by paniq
float fOpUnionStairs(float a, float b, float r, float n) {
float s = r/n;
float u = b-r;
return min(min(a,b), 0.5 * (u + a + abs ((mod (u - a + s, 2. * s)) - s)));
}
// We can just call Union since stairs are symmetric.
float fOpIntersectionStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, -b, r, n);
}
float fOpDifferenceStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, b, r, n);
}
// Similar to fOpUnionRound, but more lipschitz-y at acute angles
// (and less so at 90 degrees). Useful when fudging around too much
// by MediaMolecule, from Alex Evans' siggraph slides
float fOpUnionSoft(float a, float b, float r) {
float e = max(r - abs(a - b), 0.);
return min(a, b) - e*e*0.25/r;
}
// produces a cylindical pipe that runs along the intersection.
// No objects remain, only the pipe. This is not a boolean operator.
float fOpPipe(float a, float b, float r) {
return length(vec2(a, b)) - r;
}
// first object gets a v-shaped engraving where it intersect the second
float fOpEngrave(float a, float b, float r) {
return max(a, (a + r - abs(b))*sqrt(0.5));
}
// first object gets a capenter-style groove cut out
float fOpGroove(float a, float b, float ra, float rb) {
return max(a, min(a + ra, rb - abs(b)));
}
// first object gets a capenter-style tongue attached
float fOpTongue(float a, float b, float ra, float rb) {
return min(a, max(a - ra, abs(b) - rb));
}
//#endSection End of library
// https://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl
// golden_noise
float noise(in vec2 xy, in float seed){
return fract(tan(distance(xy*PHI, xy)*seed)*xy.x);
}
vec3 rnd23(vec2 p)
{
vec3 p3 = fract(p.xyx * vec3(.1031, .1030, .0973));
p3 += dot(p3, p3.yxz+33.33);
return fract((p3.xxy+p3.yzz)*p3.zyx);
}
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
float opExtrusion( in vec3 p, in float sdf, in float h )
{
vec2 w = vec2( sdf, abs(p.z) - h);
return min(max(w.x,w.y),0.0) + length(max(w,0.0));
}
float sdCog2d(vec2 pos) {
float r = length(pos)*2.;
float a = atan(pos.y,pos.x);
float f = 1. - smoothstep(-0.2, .8, sin(a * 12.))*0.14;
f = smoothstep(f,f + 2.,r);
return f;
}
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 sdCapsule( vec3 p, vec3 a, vec3 b, float r )
{
vec3 pa = p - a, ba = b - a;
float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 );
return length( pa - ba*h ) - r;
}
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) {
vec3 po = pos;
po.xz *= Rot(angle);
po.yz *= Rot(angle);
pR(po.yz, PI/2.);
float d1 = fHexagonCircumcircle(po, vec2(0.5+i, .1));
float d2 = fHexagonCircumcircle(po, vec2(0.2+i, .1));
return fOpDifferenceRound(d1,d2,0.1);
}
float sdCylinder(vec3 p, vec3 a, vec3 b, float r)
{
vec3 ba = b - a;
vec3 pa = p - a;
float baba = dot(ba,ba);
float paba = dot(pa,ba);
float x = length(pa*baba-ba*paba) - r*baba;
float y = abs(paba-baba*0.5)-baba*0.5;
float x2 = x*x;
float y2 = y*y*baba;
float d = (max(x,y)<0.0)?-min(x2,y2):(((x>0.0)?x2:0.0)+((y>0.0)?y2:0.0));
return sign(d)*sqrt(abs(d))/baba;
}
float sdPlane( vec3 p, vec4 n )
{
// n must be normalized
return dot(p,n.xyz) + n.w;
}
// Scene
vec2 mapScene(in vec3 p) {
float mat = 0.;
float d = 1e9;
float dGround = sdPlane(p, vec4(0., 1.0, 0., 5.));
// d = min(d, dGround);
vec3 po = p;
//po.y += sin(u_time);
// pMod3(po, vec3(3.));
po.xy *= scale(vec2(1.1));
const float num = 2.;
for (float i = 1.; i <= num; i++) {
// pos.z += i*.1;
float a = sdHex(po,i*0.35, u_time + abs( 2. + 0.4 * sin(u_time)) * i*3.1415/num);
d = min(d,a);
if (d == a) mat = 1. + mod(i,3.);
}
float b = fSphere(p, 0.5);
d = min(d, b);
if (d == b) {
mat = 1.;
}
//float c2 = sdText(p, u_time);
//d = min(d, c2);
//if ( d == c2) mat = 4.;
/*
float c3 = fBox(p+vec3(0.5, .0, 0.), vec3(1., 1.,1.));
d = min(d, c3);
if ( d == c3) mat = 1.;
float c1= fBox(p+vec3(-2., 0, -2.), vec3(1., 1.,1.));
d = min(d, c1);
if (d == c1) mat = 3.;
*/
return vec2(d, mat);
}
vec3 castRay(vec3 ro, vec3 rd, inout vec3 pos) {
float t = 0.;
float mat = 0.;
float hit = 0.;
for(int i=0; i < 150; i++) {
pos = ro + rd * t;
vec2 res = mapScene(pos);
t += res.x;
mat = res.y;
if (t > 100.) break;
if (res.x < abs(0.001*t) ) {
hit = 1.;
break;
}
}
if (t > 100.) t = 0.;
return vec3(t, mat, hit);
}
float softshadow( in vec3 ro, in vec3 rd, float mint, float maxt, float w )
{
float res = 1.0;
float t = mint;
for( int i=0; i<40; i++ )
{
if (t > maxt) break;
float h = mapScene(ro + t*rd).x;
res = min( res, h/(w*t) );
t += clamp(h, 0.05, 0.50);
if(res < -1.0) break;
}
res = max(res,-1.0);
return 0.25 * (1.0+res)*(1.0+res)*(2.0-res);
}
float castShadow(vec3 ro, vec3 rd) {
float res = 1.0;
float t = 0.001;
for(int i = 0; i < 40; i++) {
float h = mapScene(ro + t* rd).x;
res = min(res, 10.0*h/t);
if (abs(h) < (0.001*t) ) break;
t += h;
if (t > 20.) break;
}
return clamp(res,0., 1.);
}
vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.001, 0.);
vec3 n = vec3( mapScene(pos+e.xyy).x - mapScene(pos-e.xyy).x,
mapScene(pos+e.yxy).x - mapScene(pos-e.yxy).x,
mapScene(pos+e.yyx).x - mapScene(pos-e.yyx).x
);
return normalize(n);
}
vec3 fresnel( vec3 F0, vec3 h, vec3 l ) {
return F0 + ( 1.0 - F0 ) * pow( clamp( 1.0 - dot( h, l ), 0.0, 1.0 ), 5.0 );
}
vec3 addPointLight(vec3 light_pos, vec3 light_color, float shininess, vec3 v, vec3 dir, vec3 n, float occ) {
vec3 Ks = vec3( .5454 );
vec3 Kd = vec3( 1. );
vec3 ref = reflect( dir, n);
vec3 vl = normalize( v );
vec3 diffuse = Kd * vec3( max( 0.0, dot( vl, n ) ) );
vec3 specular = vec3( max( 0.0, dot( vl, ref ) ) );
vec3 F = fresnel( Ks, normalize( vl - dir ), vl );
float shadow = softshadow(v+n*0.02,light_pos, .01, 30., 8.);
//float shadow = castShadow(v + n*0.02, light_pos);
//float shadow = 1.;
specular = pow( specular, vec3( shininess )) * occ;
return light_color * mix( diffuse, specular, F ) * shadow * occ;
}
float getAmbientOcc(vec3 p, vec3 n) {
float occ = 0.;
float weight = 1.;
for (int i = 0; i < 8; i++) {
float len = 0.01 + 0.02 * float(i*i);
float dist = mapScene(p+n*len).x;
occ += (len - dist) * weight;
weight *=0.85;
}
return 1.0 - clamp(0.6 * occ, 0., 1.);
}
vec3 shading(vec3 v, vec3 n, vec3 dir, float material) {
float shininess = 0.;
float occ = getAmbientOcc(v,n);
vec3 outMaterial = vec3(0.0, 0.0, 0.0);
if (material == 0.) {
outMaterial = vec3(0.4667, 0.4667, 0.4667);
shininess = 10.;
} else if (material == 1.) {
outMaterial = vec3(0.6275, 0.1569, 0.9412);
shininess = 1.;
} else if (material == 2.) {
outMaterial = vec3(0.0314, 0.0314, 0.0314);
shininess = 100.;
} else if (material == 3.) {
outMaterial = vec3(0.5451, 0.5451, 0.5451);
shininess = 1.0;
} else if (material == 4.) {
outMaterial = vec3(0.9961, 1.0, 0.9922);
shininess = .3;
}
vec3 lights = vec3(0.);
lights += addPointLight(vec3( 2., 0., 2. ),vec3(0.12, 0.43, 0.77)*4., shininess, v, dir, n, occ);
lights += addPointLight(vec3( -2., -2., -5. ),vec3(0.27, 0.65, 0.46)*3., shininess, v, dir, n, occ);
//lights += addPointLight(vec3( 2., 1.0, 1.0 ),vec3(0.01, 1.0, 0.09)*2., shininess, v,dir,n,occ );
vec3 lightDir = vec3( 0. , 1., 6.);
float sun_dif = clamp(dot(n, lightDir), 0., 1.);
float shadow = softshadow(v+n*0.01,lightDir, .01, 30., 18.);
//lights += vec3(0.6431, 0.7804, 0.8588) *sun_dif*shadow*occ;
float ind = clamp( dot( n, normalize(lightDir*vec3(.0,-1.0,-1.0)) ), 0.0, 1.0 );
lights += vec3(0.1255, 0.1255, 0.1255) * ind; // * occ;
return outMaterial * max(vec3(0.), lights);
}
vec3 postProcess(vec3 col) {
// float random = noise(gl_FragCoord.xy, 0.01+u_time);
// float random2 = noise(gl_FragCoord.xy, .2+u_time);
//col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither
// Normalized pixel coordinates (from 0 to 1)
vec2 screenCoord = gl_FragCoord.xy/u_resolution.xy;
// Vignette
float radius = 0.8;
float d = smoothstep(radius, radius-0.4, length(screenCoord-vec2(0.5)));
col = mix(col, col * d, .9);
// Contrast
float constrast = .5;
col = mix(col, smoothstep(0.0, 1.0, col), constrast);
// Colour mapping
col *= vec3(1.0, 1.0, 1.0);
col = pow( col, vec3(1.0/2.2) ); // gamma
// fade in at the beginning
//col*=vec3(clamp((u_time-1.8)*0.5,0., 1.));
// fade out at the end
// col*=vec3(clamp((120.-u_time)*.35, 0., 1.));
return col;
}
vec3 getCameraRayDir(vec2 uv, vec3 camPos, vec3 camTarget)
{
// Calculate camera's "orthonormal basis", i.e. its transform matrix components
vec3 camForward = normalize(camTarget-camPos );
vec3 camRight = normalize(cross(vec3(.0, 1.0, 0.0), camForward));
vec3 camUp = normalize(cross(camForward, camRight));
float fov = 0.7;
vec3 vDir = normalize(uv.x * camRight + uv.y * camUp + camForward * fov);
return vDir;
}
vec3 getCameraRayDir2(vec2 uv, vec3 camPos, vec3 lookAt, float zoom){
vec3 f = normalize(lookAt - camPos);
vec3 r = cross(vec3(0.0,1.0,0.0),f);
vec3 u = cross(f,r);
vec3 c=camPos+f*zoom;
vec3 i=c+uv.x*r+uv.y*u;
return normalize(i-camPos);
}
vec3 getCameraFov(vec2 uv, vec3 camPos, vec3 camTarget) {
vec3 camForward = normalize(camTarget-camPos);
vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camForward));
vec3 camUp = normalize(cross(camForward,camRight));
float fov = 1.7;
// Depth of field
float dof = .3;
vec2 h = vec2( noise(gl_FragCoord.xy, u_time*0.1));
vec3 voff = sqrt(h.x)*(camRight*sin(h.y*6.283)+camUp*cos(h.y*6.283))*dof;
voff -=camTarget;
float focusdistance = 50.;
return normalize(uv.x * camRight + uv.y * camUp + fov * camForward + voff * fov/focusdistance);
}
vec3 applyFog(vec3 col, float t, vec3 rd, vec3 lightDir, float b ) {
float fogAmount = 1.0 - exp(-t*b);
float sunAmount = max( dot(rd, lightDir), 0. );
vec3 fogColor = mix( vec3(0.1529, 0.1137, 0.2), // blue
vec3(0.2588, 0.1765, 0.3529), // yellow
pow(sunAmount,1.0) );
return mix( col, fogColor, fogAmount );
}
vec3 render(vec2 uv) {
bool useDof = !true;
float angle = -2.4 +u_time*0.4;
//angle = 0.;
// camera
vec3 camPos = vec3( 0., 0., -2.);
vec3 camTarget = vec3(0., 0., 0.);
vec3 rayDir;
if (useDof) {
rayDir = getCameraFov(uv, camPos, camTarget);
} else {
rayDir = getCameraRayDir2(uv, camPos, camTarget, 1.0);
}
vec3 col = vec3(0.0471, 0.0471, 0.0471);
//vec3 col = vec3(0.0314, 0.0118, 0.1255) + rayDir.y * 0.4;
vec3 hitPos = vec3(0.);
vec3 t = castRay(camPos, rayDir, hitPos);
if (t.z > 0.) {
vec3 nor = calcNormal(hitPos);
col = shading(hitPos, nor, rayDir, t.y);
float fogAmount = 0.03;
//col = col*exp(-t.x*fogAmount) + applyFog(col, t.x, rayDir, vec3(-1., .0, 1.), fogAmount) * (1.0-exp(-t.x*fogAmount));
col = applyFog(col, t.x, rayDir, vec3(0., .3, 1.), fogAmount);
nor = calcNormal(hitPos);
vec3 rayDir2 = normalize(reflect(rayDir, nor));
vec3 rayOrigin = hitPos + (rayDir2 * 0.1);
vec3 t2 = castRay(rayOrigin, rayDir2,hitPos);
if (t2.z > 0.) {
hitPos = rayOrigin + rayDir*0.01;
nor = calcNormal(hitPos);
col = .2 * shading(hitPos, nor, rayDir2 , t2.y);
}
}
return col;
}
void main()
{
vec3 finalColor = vec3(0.);
const float AA_SIZE = 1.;
float count = 0.0;
/*
for (float aaY = 0.0; aaY < AA_SIZE; aaY++) {
for (float aaX = 0.0; aaX < AA_SIZE; aaX++) {
finalColor += render(getUV(vec2( aaX, aaY)));
count += 1.0;
}
}
finalColor /= count; */
finalColor += render(getUV(vec2( 0.,0.)));
finalColor = postProcess(finalColor);
gl_FragColor = vec4(finalColor, 1.);
}

23
readme.txt Normal file
View File

@ -0,0 +1,23 @@
__ .__ ________ __
_/ |_| |__ ____ / _____/_____ _/ |_ ____
\ __\ | \_/ __ \ / \ ___\__ \\ __\/ __ \
| | | Y \ ___/ \ \_\ \/ __ \| | \ ___/
|__| |___| /\___ > \______ /____ /__| \___ >
\/ \/ \/ \/ \/
4k intro for Assembly 2024 by the WildLochs
WD, Pulzar, Reaby
Windows, GLSL, Compofiller Studio, Sointu, Crinkler
Thanks
Inigo Quilez, The Art of Code, SimonDev, kishimisu,
shadertoy.com, sizecoding.org
Special thanks
pestis / brainlez Coders!, Yzi/Fit
Water displacement inspired from
"Seascape" by Alexander Alekseev aka TDM - 2014
https://www.shadertoy.com/view/Ms2SD1
License Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 Unported

174
sea.frag Normal file
View File

@ -0,0 +1,174 @@
#ifdef GL_ES
precision mediump float;
#endif
#define MAX_STEPS 100
#define MAX_DIST 80.
#define SURF_DIST .001
#define TAU 6.283185
#define PI 3.141592
//#define SUN_DIR vec3(0.5, 0.4, 2.)
#define FOG_DENSITY 0.02
uniform vec2 u_resolution;
uniform float u_time;
struct Obj {
float distance; // distance map
int material; // material Id
};
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
float sdBox(vec3 p, vec3 s) {
p = abs(p)-s;
return length(max(p, 0.))+min(max(p.x, max(p.y, p.z)), 0.);
}
vec3 applyFog(in vec3 color, in float distance) {
float fogAmount = 1.0 - exp(-distance*FOG_DENSITY);
vec3 fogColor = vec3(0.1, 0.18, 0.43);
return mix( color, fogColor, fogAmount );
}
vec3 translate(vec3 p) {
p.xy *= Rot(u_time*0.4);
p.yz *= Rot(u_time*0.4);
return p;
}
float opExtrusion( in vec3 p, in float sdf, in float h )
{
vec2 w = vec2( sdf, abs(p.z) - h);
return min(max(w.x,w.y),0.0) + length(max(w,0.0));
}
vec2 opRevolution( in vec3 p, float w )
{
return vec2( length(p.xz) - w, p.y );
}
vec4 opElongate( in vec3 p, in vec3 h )
{
vec3 q = abs(p)-h;
return vec4( max(q,0.0), min(max(q.x,max(q.y,q.z)),0.0) );
}
// Scene
Obj mapScene(vec3 p) {
vec3 p0 = p;
float dGround = p.y - 0.5*(sin(0.4*p.x+u_time*1.)+sin(1.0*p.z+u_time*1.));
dGround *=0.8;
Obj ground = Obj(dGround, 0);
p0.y = dGround + 0.1;
float d1 = length(p0) - 0.3;
Obj ob1 = Obj(d1, 1);
if (ground.distance > ob1.distance) return ob1;
return ground;
}
Obj castRay(vec3 ro, vec3 rd) {
float t = 0.0;
Obj res = Obj(-1., -1);
for(int i=0; i<MAX_STEPS; i++) {
vec3 p = ro + rd * t;
res = mapScene(p);
t += res.distance;
if (t > MAX_DIST || res.distance < abs(SURF_DIST*t) ) break;
}
if (t > MAX_DIST) t = -1.0;
res.distance = t;
return res;
}
float castShadow(vec3 ro, vec3 rd) {
float res = 1.0;
float t = 0.0001;
for(int i=0; i<MAX_STEPS; i++) {
vec3 pos = ro + t* rd;
float h = mapScene(pos).distance;
res = min(res, 10.0*h/t);
if (abs(h) < (0.001*t) ) break;
t += h;
if (t > 20.) break;
}
return clamp(res,0., 1.);
}
vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.0001, 0.);
vec3 n = vec3( mapScene(pos+e.xyy).distance - mapScene(pos-e.xyy).distance,
mapScene(pos+e.yxy).distance - mapScene(pos-e.yxy).distance,
mapScene(pos+e.yyx).distance - mapScene(pos-e.yyx).distance
);
return normalize(n);
}
void main()
{
vec2 p = (2.0 * gl_FragCoord.xy - u_resolution.xy) / u_resolution.y;
float angle = u_time*0.2;
angle = 4.6; // comment to rotate
// camera
vec3 ta = vec3(0.0, .5, 0.0);
vec3 ro = ta + vec3(1.*sin(angle), .7, 2.); // *cos(angle))
vec3 ww = normalize(ta-ro);
vec3 uu = normalize(cross(ww, vec3(0,1,0)));
vec3 vv = normalize(cross(uu,ww));
vec3 rd = normalize(p.x * uu + p.y*vv + 1.3*ww); // camera
// global light
vec3 col = vec3(0.1216, 0.2863, 0.5529) - 0.5*rd.y;
Obj t = castRay(ro, rd);
if (t.distance > 0.) {
vec3 pos = ro + rd * t.distance;
vec3 nor = calcNormal(pos);
// vec3 r = reflect(rd, nor);
vec3 outMaterial = vec3(0.1255, 0.1176, 0.1176);
if (t.material == 0) {
outMaterial = vec3(0.0039, 0.2235, 0.4) + sin(t.distance)*0.1;
} else if (t.material == 1) {
outMaterial = vec3(0.8392, 0.0118, 0.0118);
}
vec3 SUN_DIR = vec3(0.5+sin(u_time*0.1), 0.4, 2.0+sin(u_time*0.2)*0.5);
float sun_dif = clamp(dot(nor, SUN_DIR), 0., 1.);
float sun_sha = castShadow(pos + nor*0.02, SUN_DIR);
float sky_dif = clamp(0.5 + 0.5 * dot(nor, vec3(0.,1.,0.)), 0., 1.);
float bounce_dif = clamp(0.5 + 0.5 * dot(nor, vec3(.7,.5, 0.)), 0., 1.);
// format color + what to apply
col = outMaterial * vec3(2.0,1.5, .2) * sun_dif * sun_dif * sun_sha;
col += outMaterial * vec3(0.0196, 0.2078, 0.4196) * sky_dif;
col += outMaterial * vec3(0.051, 0.0588, 0.5686) * bounce_dif;
// apply fog
col = applyFog(col, t.distance);
}
col = pow(col, vec3(.4545)); // gamma correction
gl_FragColor = vec4(col,1.0);
}

192
sea.glsl Normal file
View File

@ -0,0 +1,192 @@
/*
* "Seascape" by Alexander Alekseev aka TDM - 2014
* License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
* Contact: tdmaav@gmail.com
*/
precision mediump float;
const int NUM_STEPS = 8;
const float PI = 3.141592;
const float EPSILON = 1e-3;
uniform float u_time;
uniform vec2 u_resolution;
#define EPSILON_NRM (0.1 / u_resolution.x)
//#define AA
// sea
const int ITER_GEOMETRY = 3;
const int ITER_FRAGMENT = 5;
const float SEA_HEIGHT = 0.6;
const float SEA_CHOPPY = 4.0;
const float SEA_SPEED = 0.8;
const float SEA_FREQ = 0.16;
const vec3 SEA_BASE = vec3(0.0,0.09,0.18);
const vec3 SEA_WATER_COLOR = vec3(0.8,0.9,0.6)*0.6;
#define SEA_TIME (1.0 + u_time * SEA_SPEED)
const mat2 octave_m = mat2(1.6,1.2,-1.2,1.6);
// math
mat3 fromEuler(vec3 ang) {
vec2 a1 = vec2(sin(ang.x),cos(ang.x));
vec2 a2 = vec2(sin(ang.y),cos(ang.y));
vec2 a3 = vec2(sin(ang.z),cos(ang.z));
mat3 m;
m[0] = vec3(a1.y*a3.y+a1.x*a2.x*a3.x,a1.y*a2.x*a3.x+a3.y*a1.x,-a2.y*a3.x);
m[1] = vec3(-a2.y*a1.x,a1.y*a2.y,a2.x);
m[2] = vec3(a3.y*a1.x*a2.x+a1.y*a3.x,a1.x*a3.x-a1.y*a3.y*a2.x,a2.y*a3.y);
return m;
}
float hash( vec2 p ) {
float h = dot(p,vec2(127.1,311.7));
return fract(sin(h)*43758.5453123);
}
float noise( in vec2 p ) {
vec2 i = floor( p );
vec2 f = fract( p );
vec2 u = f*f*(3.0-2.0*f);
return -1.0+2.0*mix( mix( hash( i + vec2(0.0,0.0) ),
hash( i + vec2(1.0,0.0) ), u.x),
mix( hash( i + vec2(0.0,1.0) ),
hash( i + vec2(1.0,1.0) ), u.x), u.y);
}
float specular(vec3 normal,vec3 lightPos,vec3 rayOrigin,float specular) {
float nrm = (specular + 8.0) / (PI * 8.0);
return pow(max(dot(reflect(rayOrigin,normal),lightPos),0.0),specular) * nrm;
}
// sky
vec3 getSkyColor(vec3 e) {
e.y = (max(e.y,0.0)*0.8+0.2)*0.8;
return vec3(pow(1.0-e.y,2.0), 1.0-e.y, 0.6+(1.0-e.y)*0.4) * 1.1;
}
// sea
float sea_octave(vec2 uv, float choppy) {
uv += noise(uv);
vec2 wv = 1.0-abs(sin(uv));
vec2 swv = abs(cos(uv));
wv = mix(wv,swv,wv);
return pow(1.0-pow(wv.x * wv.y,0.65),choppy);
}
float map(vec3 p) {
float freq = SEA_FREQ;
float amp = SEA_HEIGHT;
float choppy = SEA_CHOPPY;
vec2 uv = p.xz; uv.x *= 0.75;
float d, h = 0.0;
for(int i = 0; i < ITER_GEOMETRY; i++) {
d = sea_octave((uv+SEA_TIME)*freq,choppy);
d += sea_octave((uv-SEA_TIME)*freq,choppy);
h += d * amp;
uv *= octave_m; freq *= 1.9; amp *= 0.22;
choppy = mix(choppy,1.0,0.2);
}
return p.y - h;
}
float map_detailed(vec3 p) {
float freq = SEA_FREQ;
float amp = SEA_HEIGHT;
float choppy = SEA_CHOPPY;
vec2 uv = p.xz; uv.x *= 0.75;
float d, h = 0.0;
for(int i = 0; i < ITER_FRAGMENT; i++) {
d = sea_octave((uv+SEA_TIME)*freq,choppy);
d += sea_octave((uv-SEA_TIME)*freq,choppy);
h += d * amp;
uv *= octave_m; freq *= 1.9; amp *= 0.22;
choppy = mix(choppy,1.0,0.2);
}
return p.y - h;
}
// lighting
float diffuse(vec3 n,vec3 l,float p) {
return pow(dot(n,l) * 0.4 + 0.6,p);
}
vec3 getSeaColor(vec3 p, vec3 n, vec3 l, vec3 eye, vec3 dist) {
float fresnel = clamp(1.0 - dot(n,-eye), 0.0, 1.0);
fresnel = min(pow(fresnel,5.0), 0.5);
vec3 reflected = vec3(0., 0.5,0.9); //getSkyColor(reflect(eye,n));
vec3 refracted = SEA_BASE + diffuse(n,l,60.0) * SEA_WATER_COLOR * 0.2;
vec3 color = mix(refracted,reflected,fresnel);
color += SEA_WATER_COLOR * (p.y - SEA_HEIGHT) * 0.18 ;// * atten;
//color += vec3(specular(n,l,eye,80.0));
return color;
}
// tracing
vec3 getNormal(vec3 p, float eps) {
vec3 n;
n.y = map_detailed(p);
n.x = map_detailed(vec3(p.x+eps,p.y,p.z)) - n.y;
n.z = map_detailed(vec3(p.x,p.y,p.z+eps)) - n.y;
n.y = eps;
return normalize(n);
}
float heightMapTracing(vec3 ori, vec3 dir, out vec3 p) {
float tm = 0.0;
float tx = 1000.0;
float hx = map(ori + dir * tx);
if(hx > 0.0) {
p = ori + dir * tx;
return tx;
}
float hm = map(ori + dir * tm);
float tmid = 0.0;
for(int i = 0; i < NUM_STEPS; i++) {
tmid = mix(tm,tx, hm/(hm-hx));
p = ori + dir * tmid;
float hmid = map(p);
if(hmid < 0.0) {
tx = tmid;
hx = hmid;
} else {
tm = tmid;
hm = hmid;
}
}
return tmid;
}
vec3 getPixel(in vec2 coord, float time) {
vec2 uv = coord / u_resolution.xy;
uv = uv * 2.0 - 1.0;
uv.x *= u_resolution.x / u_resolution.y;
// ray
vec3 ang = vec3(sin(time*3.0)*0.1,sin(time)*0.2+0.3,time);
vec3 ori = vec3(0.0,3.5,time*5.0);
vec3 dir = normalize(vec3(uv.xy,-2.0)); dir.z += length(uv) * 0.14;
dir = normalize(dir) * fromEuler(ang);
// tracing
vec3 p;
heightMapTracing(ori,dir,p);
vec3 dist = p - ori;
vec3 n = getNormal(p, dot(dist,dist) * EPSILON_NRM);
vec3 light = normalize(vec3(0.0,1.0,0.8));
// color
return mix(
getSkyColor(dir),
getSeaColor(p,n,light,dir,dist),
pow(smoothstep(0.0,-0.02,dir.y),0.2));
}
// main
void main() {
vec3 color = getPixel(gl_FragCoord.xy, u_time);
// post
gl_FragColor = vec4(pow(color,vec3(0.65)), 1.0);
}

View File

@ -1,314 +1,428 @@
// Compofiller Studio by Yzi 2018
//
// Default template shader
/* uses some snippets from:
* "Seascape" by Alexander Alekseev aka TDM - 2014
* License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
* Contact: tdmaav@gmail.com
*/
// This shader program is executed in the GPU (or a CPU-based emulation) for
// every pixel (i.e. "fragment" in OpenGL jargon) of every frame.
//precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
const float PI = 22./7.;
// The "uniforms" are the same (i.e. uniform) for all pixels/fragments of the frame,
// and they come from the main program.
uniform float time;
uniform vec2 resolution;
vec3 no(vec3 v) { return normalize(v); }
float cl(float a, float b, float c) { return clamp(a,b,c); }
// If you choose to save some bytes and not use either of these uniforms, you have to
// do some additional tricks.
// * time : if you uncheck "[ ] Use time uniform" checkbox, time is in gl_Color.y (green component)
// * resolution : if you uncheck "[ ] Use resolution uniform" checkbox, you'll have to hard-code the resolution manually
// The uniform-less version could look like this, 88200.0 being the time divider
//float time = gl_Color.y * 256.0 * (65536.0 / 88200.0);
//vec2 resolution = vec2(1280.0, 720.0);
// Uncomment this to use the texture-based features
uniform sampler2D texture_sampler;
// Uncomment this to use the texture-based features
uniform sampler2D texts;
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// Created by S. Guillitte 2015
float zoom=1.;
vec2 cmul( vec2 a, vec2 b ) { return vec2( a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x ); }
vec2 csqr( vec2 a ) { return vec2( a.x*a.x - a.y*a.y, 2.*a.x*a.y ); }
mat2 rot(float a) {
return mat2(cos(a),sin(a),-sin(a),cos(a));
// Rotate
mat2 rot2D(float angle) {
float s = sin(angle), c = cos(angle);
return mat2(c, -s, s, c);
}
vec2 iSphere( in vec3 ro, in vec3 rd, in vec4 sph )//from iq
float smax( float a, float b, float k )
{
vec3 oc = ro - sph.xyz;
float b = dot( oc, rd );
float c = dot( oc, oc ) - sph.w*sph.w;
float h = b*b - c;
if( h<0.0 ) return vec2(-1.0);
h = sqrt(h);
return vec2(-b-h, -b+h );
float h = max(k-abs(a-b),0.0);
return max(a, b) + h*h*0.25/k;
}
float map(in vec3 p) {
float res = 0.;
vec3 c = p;
for (int i = 0; i < 10; ++i) {
p =.7*abs(p)/dot(p,p) -.7;
p.yz= csqr(p.yz);
p=p.zxy;
res += exp(-19. * abs(dot(p,c)));
}
return res/2.;
}
vec3 raymarch( in vec3 ro, vec3 rd, vec2 tminmax )
float hash(vec2 p, int algo)
{
float t = tminmax.x;
float dt = .02;
//float dt = .2 - .195*cos(iTime*.05);//animated
vec3 col= vec3(0.);
float c = 0.;
for( int i=0; i<64; i++ )
{
t+=dt*exp(-2.*c);
if(t>tminmax.y)break;
c = map(ro+t*rd);
col = .99*col+ .08*vec3(c*c, c, c*c*c);//green
//col = .99*col+ .08*vec3(c*c*c, c*c, c);//blue
}
if (algo == 1) {
float h = dot(p,vec2(127.1,311.7));
return fract(sin(h)*43758.5453123);
}
p = 50. * fract( p*0.3183099);
return fract( p.x*p.y*(p.x+p.y) );
}
float noise(vec2 p, float scale, int a)
{
vec2 i = floor( p ),
f = fract( p ),
u = f*f*(3.-2.*f);
float sc = scale;
if (a == 1) sc = 2.;
return -scale+sc*mix( mix( hash( i + vec2(0.), a),
hash( i + vec2(1.0,0.0), a ), u.x),
mix( hash( i + vec2(0.0,1.0), a),
hash( i + vec2(1.), a), u.x), u.y);
}
/////////////////
// GEOMETRY //
/////////////////
/*float sdSphere(vec3 p, float r) {
return length(p)-r;
}*/
float sdCappedCylinder( vec3 p, float h, float r )
{
vec2 d = abs(vec2(length(p.xy),p.z)) - vec2(r,h);
return min(max(d.x,d.y),0.0) + length(max(d,0.0));
}
float sdBox2(vec3 p, vec3 b) {
vec3 q = abs(p) - b;
return length(max(q,0.)) + min(max(q.x,max(q.y,q.z)),0.);
}
float sdTriPrism( vec3 p, vec2 h, float rot )
{
p.xy *= rot2D(rot);
vec3 q = abs(p);
return max(q.z-h.y,max(q.x*.866025+p.y*.5,-p.y)-h.x*.5);
}
//////////////////
// ANIMATION //
//////////////////
// POSITIONS
//const vec3 glyph1Pos = vec3(1.7,-1.1,0.0);
//const vec3 glyph2Pos = vec3(2.0,0.0,0.0);
//const vec3 glyph4Pos = vec3(0.0,2.0,0.0)
//const vec3 glyph6Pos = vec3(1.5 * -1.,1.4,0.0);
//const vec3 glyph7Pos = vec3(1.7 * -1.,-1.1,0.0);
// DELAYS
float STARTDELAY = 9., glow = 0.;
// COLORS
vec3
glyph3Pos = vec3(1.5,1.4,0.0),
glyph5Pos = vec3(-1.5,1.4,0.0),
fogColor1 = vec3(0.49, 0.18, 0.49), // fog color1
fogColor2 = vec3(0.93, 0.37, 0.16), // fog color2
indirColor = vec3(0.29, 0.28, 0.33), // indirect light color
light1Color = vec3(0.82, 0.5, 0.9),
light2Color = vec3(0.79, 0.66, 0.43),
chevronColor = vec3(0.46, 0.0, 0.9),
SEA_BASE = vec3(0.0, 0.1, 0.3),
SEA_WATER_COLOR =vec3(0.11, 0.16, 0.18);
// with duration d, startTime s and speed up with timeFact
float timedSine(vec3 i) {
return min((u_time - i.y)*i.z, i.x*PI);
}
float calcFactor (float startTime)
{
return STARTDELAY + STARTDELAY*cl(sin(timedSine(vec3(1.5, startTime, 4.)) * 0.06), -.9, .9);
}
// Animate ring movements
vec3 ringAnim(vec3 p) {
for (float i = 0.; i < 7.; i++) {
float rotateDelay = STARTDELAY + (i * 2.), o=1.;
if(u_time > rotateDelay) {
if(mod(i,2.) >= 1.) o = -1.;
p.xy *= rot2D(calcFactor(rotateDelay)*o);
}
}
return p;
}
// Animate prism movements
float prismAnim(vec2 i) {
if(u_time >= i.y) {
i.x += (.045*cl(sin((timedSine(vec3(3., i.y, 40.)) * .4)),-.8, .8));
}
return i.x;
}
//////////////
// SCENE //
//////////////
float sea_octave(vec2 uv, float choppy) {
uv += noise(uv, 1., 1);
vec2 wv = 1.0-abs(sin(uv));
vec2 swv = abs(cos(uv));
wv = mix(wv,swv,wv);
return pow(1.0-pow(wv.x * wv.y,0.65),choppy);
}
vec3 map(vec3 p, int displace)
{
float mat = 0., glo = 1e3,
// Ring boxes
an = PI/12.,
step,
anRot = floor(atan(p.y,p.x)/an + .5)*an;
vec3 q = p;
q.xy = rot2D(anRot)*q.xy;
float d = length(max(abs(q.xy - vec2(1.8,0.))-vec2(0.24,0.14),0.)) - .02,
// Main ring
d2 = abs(length(p.xy) - 1.8) - .2;
d = min(d,d2);
// Inner ring
d2 = abs(length(p.xy) - 1.75) - .08;
d2 = smax( d2, abs(p.z - .1)-.04, .005 );
d = max(-d2,d);
// Depth slice rings
d = smax( d, abs(p.z)-.1, .02 );
//Rotating glyphs
vec3 p2 = ringAnim(p), q2=p2;
an = PI/16.;
q2.xy = rot2D(floor((atan(p2.y,p2.x)/an) + .5)*an)*q2.xy;
d2 = sdBox2( q2.xyz - vec3(1.75,0.,0.), vec3(.04, .14, .05) ) - .02 + noise(p.xy*100.,1e-3,0);
d = min(d, d2);
if (d==d2) mat = 6.;
// Gate Base
d2 = 1e3;
float stepDist = 1.5, h = 0.0, d3, choppy=4., freq=0.6, amp=.2;
for(int i = 0; i < 4; i++) {
step = sdBox2(vec3(p.x,p.y+stepDist+0.05,p.z), vec3(2., .2,stepDist)) - .05;
d2 = min(d2, step);
stepDist += .2;
}
d2 += noise(p.xz * 50.+200., .01, 0) - noise (p.yz*2.+1.5, 0.15,0);
d = min(d, d2);
if (d==d2) mat = 2.0;
if (displace == 1) {
vec2 uv = p.xy;
for(int i = 0; i < 4; i++) {
d3 = sea_octave((uv+u_time)*freq,choppy);
d3 += sea_octave((uv-u_time)*freq,choppy);
h += d3 * amp;
uv *= mat2(1.6,1.2,-1.2,1.6); freq *= 1.9; amp *= 0.22;
choppy = mix(choppy,1.0,0.4);
}
}
d2 = max(-sdCappedCylinder(p, 2.0, min((2.0 - (u_time - 23.0)*3.),2.3)), sdCappedCylinder(p, .025, 1.6) - h*0.15);
d2 = max(d2, sdCappedCylinder ( p, 0.3, 1.7));
d = min(d, d2);
if (d==d2) {
mat = 1.0;
}
// sand
d2 = (p.y +3.7) + noise((vec2((p.x),(p.z*.44-40.))*.04)+100., 20., 0) + .25*sin(p.z*.5+u_time);
d = min(d,d2);
if (d==d2) mat = 3.0;
// Prisms
for(float i = 0.; i < 8.; i++ ) {
an = 24.67 / (PI * 2.); // sector size
q = p;
anRot = an + (i+1.) * PI / 4.;
// Nudge first and the last prism out of the ground
if (i == 1.) anRot += .2;
if (i == 7.) anRot -= .2;
q.xy = rot2D(anRot) * q.xy;
float rotateDelay = STARTDELAY + (i - 1.) * 2. + 1.5;
// We can now call each prism by it's index
// draw all except the middle bottom prism
if (i > 0.) {
q.x -= 1.95;
vec3 q2 = q; // new point for movable parts
if(u_time > rotateDelay) q2.x = prismAnim(vec2(q2.x, rotateDelay));
float prismTop = sdTriPrism(vec3(q.x - .06, q.y, q.z), vec2(.1,.15), .5) -.01;
d2 = max(-sdTriPrism(vec3(q2.x - .14, q2.y - 0. , q2.z), vec2(.22), .5) - .01 , sdTriPrism(vec3(q2.x, q2.y, q2.z ), vec2(.2,.12), .5) - .02);
d2 = min(d2, prismTop);
d = min(d, d2);
// glyph locking thing material
if (d == d2) mat = 4.;
// glyph locking prism material
if( d == prismTop) if(u_time > rotateDelay + .2) {
mat = 5.;
glo = min(d2, prismTop);
}
}
}
return vec3( d, mat, glo);
}
////////////////
// DRAWING //
////////////////
float rayMarch(vec3 ro, vec3 rd, int a) {
vec3 d;
float t = 0.; // total distance travelled
// Raymarching
for (int i = 0; i < 100; i++) {
d = map(ro + rd * t, 0); // Get distance to objects
if (a==0&&d.z<0.3) glow += 0.05/(1.0 + 10.*pow(d.z, .5));
t += d.x; // "march" the ray
if (d.x < 1e-3 || t > 400.) break;
}
return t;
}
vec3 getNormal(vec3 p) {
vec2 e = vec2(.01, 0.);
vec3 n = map(p, 1).x - vec3(
map(p-e.xyy,1).x,
map(p-e.yxy,1).x,
map(p-e.yyx,1).x);
return no(n);
}
float getLight(vec3 p, vec3 lightPos, float intensity, float shadow, vec3 n) {
vec3 l = no(lightPos - p);
float dif = cl(dot(n, l), 0., intensity),
d = rayMarch(p+n*.0025, l, 1);
if(d<length(lightPos-p)) dif *= shadow;
return dif;
}
// lighting
float diffuse(vec3 n,vec3 l,float p) {
return pow(dot(n,l) * 0.4 + 0.6,p);
}
float specular(vec3 normal,vec3 lightPos,vec3 rayOrigin,float specular) {
float nrm = (specular + 8.0) / (PI * 8.0);
return pow(max(dot(reflect(rayOrigin,normal),lightPos),0.0),specular) * nrm;
}
vec3 getSeaColor(vec3 p, vec3 n, vec3 l, vec3 eye) {
vec3 color = SEA_BASE + diffuse(n,l,60.0) * SEA_WATER_COLOR * 0.3;
color -= vec3(0.73, 0.15, 0.66) * pow(clamp(1.-dot(n, -eye), 0., 1.), .7);
color += vec3(specular(n,l,eye,60.0))*0.2;
return color;
}
vec3 applyFog(vec3 col, float t, vec3 rd, vec3 lightDir, float b ) {
vec3 fogColor = mix( fogColor1, // blue
fogColor2, // yellow
pow(max( dot(rd, lightDir), 0.) ,8.));
return mix( col, fogColor, 1.0 - exp(-t*b) );
}
vec3 getCameraRayDir(vec2 uv, vec3 p, vec3 l, float z)
{
vec3 f = no(l-p),
r = no(cross(vec3(0.,1.,0.), f)),
u = cross(f,r),
c = f*z,
i = c + uv.x*r + uv.y*u,
d = no(i);
return d;
}
vec3 postProcess(vec3 col) {
// Vignette
//col *= smoothstep(0.9, 0.5, length(gl_FragCoord.xy/u_resolution.xy-vec2(.5)));
// Colour mapping
col *= vec3(.9, 0.8, 0.7);
// gamma
col = pow( col, vec3(.45) );
// Contrast = a
col = smoothstep(0., 1., col);
// fade out at the end
col += 1.0 - vec3(cl((31. - u_time)*.5, 0., 1.0));
return col;
}
void CoolSphere( out vec4 fragColor, in vec2 fragCoord )
vec3 cameraPos()
{
float time = time;
vec2 q = fragCoord.xy / resolution.xy;
vec2 p = -1.0 + 2.0 * q;
p.x *= resolution.x/resolution.y;
vec2 m = vec2(0.);
m-=.5;
// camera
vec3 ro = zoom*vec3(4.);
ro.yz*=rot(m.y);
ro.xz*=rot(m.x+ 0.1*time);
vec3 ta = vec3( 0.0 , 0.0, 0.0 );
vec3 ww = normalize( ta - ro );
vec3 uu = normalize( cross(ww,vec3(0.0,1.0,0.0) ) );
vec3 vv = normalize( cross(uu,ww));
vec3 rd = normalize( p.x*uu + p.y*vv + 4.0*ww );
vec2 tmm = iSphere( ro, rd, vec4(0.,0.,0.,2.) );
// raymarch
vec3 col = raymarch(ro,rd,tmm);
if (tmm.x<0.)col = texture2D(texture_sampler, rd).rgb;
else {
vec3 nor=(ro+tmm.x*rd)/2.;
nor = reflect(rd, nor);
float fre = pow(.5+ clamp(dot(nor,rd),0.0,1.0), 3. )*1.3;
col += texture2D(texture_sampler, nor).rgb * fre;
// first zoom in to the gate
vec3 cPos = vec3(0., cl(6.-u_time,2.,6.), cl((100.-u_time*11.),6.,100.));
if (u_time > 7.5) cPos += vec3(0., cl(7.5-u_time,-1.,0.), 0.);
// close up shot for 1st glyph lock
if (u_time > 10.5) cPos = vec3(2.,-1.,1.);
// zoom away for 2nd glyph animation
if (u_time > 12.) cPos = vec3(-1., -.7, 4.);
if (u_time > 13.5) {
cPos = vec3(0., 0., 4.);
cPos.yz *= rot2D(-0.6-(cos(u_time-15.))*0.2);
cPos.xz *= rot2D(sin((u_time-16.5)*0.3));
}
if (u_time > 19.5)
{
cPos = vec3(3., -.7, 4.);
}
if (u_time > 21.8) {
cPos.yz *= rot2D(((1.-cos(u_time-21.8))*-0.025));
cPos.xz *= rot2D(sin((u_time-21.8)*0.07));
}
// shade
col = .5 *(log(1.+col));
col = clamp(col,0.,1.);
fragColor = vec4( col, 1.0 );
return cPos;
}
vec3 cameraPointAt() {
vec3 p = vec3(0., -.5, 0.);
// look at 1st glyph
if (u_time > 10.5) p = vec3(1.7,-1.1,0.);
// look gate at distance
if(u_time > 12.) p = vec3(0.);
if(u_time > 13.5) p = mix(glyph3Pos,glyph5Pos, (u_time-13.5)*0.13);
if(u_time > 19.5) p = vec3(0.);
return p;
}
float bar = time; // this is just a coding nicety to highlight that in some calculations we want musical time ... you wouldn't want to have this in a real prod's final version
// --- noise from procedural pseudo-Perlin (better but not so nice derivatives) ---------
// ( adapted from IQ )
// flash screen with glyph color when it is locked
vec3 colorFlashesAnim(vec3 col) {
if(u_time > 10.75) {
float x = smoothstep(sin(timedSine(vec3(.8, 10.75, 8.)*2.)), -1.,.8);
col = mix(col, chevronColor * (x * 1.4), x *.76);
}
return col;
}
float gTime = 0.;
float sdBox( vec3 p, vec3 b )
vec3 addSpecular(vec3 nor, vec3 rod, float amount, float phong)
{
vec3 q = abs(p) - b;
return length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0);
return vec3(specular(nor,no(vec3(0.0,0.3,0.8)),no(rod),pow(10.,phong)))*amount;
}
float box(vec3 pos, float scale) {
pos *= scale;
float base = sdBox(pos, vec3(.4,.4,.1)) /1.5;
pos.xy *= 5.;
pos.y -= 3.5;
pos.xy *= rot(.75);
float result = -base;
return result;
}
float box_set(vec3 pos, float time) {
vec3 pos_origin = pos;
pos = pos_origin;
pos .y += sin(gTime * 0.4) * 2.5;
pos.xy *= rot(.8);
float box1 = box(pos,2. - abs(sin(gTime * 0.4)) * 1.5);
pos = pos_origin;
pos .y -=sin(gTime * 0.4) * 2.5;
pos.xy *= rot(.8);
float box2 = box(pos,2. - abs(sin(gTime * 0.4)) * 1.5);
pos = pos_origin;
pos .x +=sin(gTime * 0.4) * 2.5;
pos.xy *= rot(.8);
float box3 = box(pos,2. - abs(sin(gTime * 0.4)) * 1.5);
pos = pos_origin;
pos .x -=sin(gTime * 0.4) * 2.5;
pos.xy *= rot(.8);
float box4 = box(pos,2. - abs(sin(gTime * 0.4)) * 1.5);
pos = pos_origin;
pos.xy *= rot(.8);
float box5 = box(pos,.5) * 6.;
pos = pos_origin;
float box6 = box(pos,.5) * 6.;
float result = max(max(max(max(max(box1,box2),box3),box4),box5),box6);
return result;
}
float map(vec3 pos, float time) {
vec3 pos_origin = pos;
float box_set1 = box_set(pos, time);
return box_set1;
}
void mainImage2( out vec4 fragColor, in vec2 fragCoord ) {
vec2 p = (fragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);
vec3 ro = vec3(0., -0.2 ,time * 4.);
vec3 ray = normalize(vec3(p, 1.5));
ray.xy = ray.xy * rot(sin(time * .03) * 5.);
ray.yz = ray.yz * rot(sin(time * .05) * .2);
float t = 0.1;
vec3 col = vec3(0.);
float ac = 0.0;
for (int i = 0; i < 99; i++){
vec3 pos = ro + ray * t;
pos = mod(pos-2., 4.) -2.;
gTime = time -float(i) * 0.01;
float d = map(pos, time);
d = max(abs(d), 0.01);
ac += exp(-d*23.);
t += d* 0.55;
}
col = vec3(ac * 0.02);
col +=vec3(0.,0.2 * abs(sin(time)),0.5 + sin(time) * 0.2);
fragColor = vec4(col ,1.0 - t * (0.02 + 0.02 * sin (time)));
}
float noise3( vec3 x ) {
vec3 p = floor(x),f = fract(x);
f = f*f*(3.-2.*f); // or smoothstep // to make derivative continuous at borders
#define hash3(p) fract(sin(1e3*dot(p,vec3(1,57,-13.7)))*4375.5453) // rand
return mix( mix(mix( hash3(p+vec3(0,0,0)), hash3(p+vec3(1,0,0)),f.x), // triilinear interp
mix( hash3(p+vec3(0,1,0)), hash3(p+vec3(1,1,0)),f.x),f.y),
mix(mix( hash3(p+vec3(0,0,1)), hash3(p+vec3(1,0,1)),f.x),
mix( hash3(p+vec3(0,1,1)), hash3(p+vec3(1,1,1)),f.x),f.y), f.z);
}
#define noise(x) (noise3(x)+noise3(x+11.5)) / 2. // pseudoperlin improvement from foxes idea
void mainImage3( out vec4 O, vec2 U ) // ------------ draw isovalues
{
vec2 R = resolution.xy;
float n = noise(vec3(U*8./R.y, .1*time)),
v = sin(6.28*10.*n),
t = time;
v = smoothstep(1.,0., .5*abs(v)/fwidth(v));
O = mix( exp(-33./R.y )* texture2D( texture_sampler, (U+vec2(1,sin(t)))/R), // .97
.5+.5*sin(12.*n+vec4(0,2.1,-2.1,0)),
v );
}
/* "Vortex" by @kishimisu (2024) - https://www.shadertoy.com/view/MX33Dr
It eventually leads somewhere...
[388 → 378 chars by @Xor]
*/
#define R mat2(cos(vec4(0,11,33,0)
void mainImage(out vec4 O, vec2 F) {
vec2 V = resolution;
vec3 o;
float r = time;
float t= .1;
float e,x;
for (O *= e; e++ < 40.;
o.y += t*t*.09,
o.z = mod(o.z + r, .2) - .1,
x = t*.06 - r*.2,
o.x = fract(
o.xy *= R+floor(((atan(o.y, o.x) - x) / .314) +0.5) * .314 + x))
).x - .8,
t += x = length(o)*.5 - .014,
O += (1. + cos(t*.5 + r + vec4(0,1,2,0)))
* (.3 + sin(3.*t + r*5.)/4.)
/ (8. + x*4e2)
)
o = t * normalize(vec3((F+F-V.xy)*R+r*.15)),V.y));
}
void main(void)
vec3 sceneGate(vec2 uv)
{
float abstime = abs(time);
vec3 l;
if (abstime < 10.0)
CoolSphere(gl_FragColor, gl_FragCoord.xy);
else if (abstime < 15.0)
{
mainImage2(gl_FragColor, gl_FragCoord.xy);
}
else if (abstime < 20.0)
{
mainImage(gl_FragColor, gl_FragCoord.xy);
}
else
{
mainImage3(gl_FragColor, gl_FragCoord.xy);
}
vec2 texttop = vec2(0., -.35), pt = (gl_FragCoord.xy / resolution) - texttop;
if (pt.y > 0.)
l = gl_FragColor + texture2D(texts, pt);
// Initialization
vec3 ro = cameraPos(),
rd = getCameraRayDir(uv, ro, cameraPointAt(), cl((28.-u_time)*-2.,2.,25.)),
col = vec3(0.);
float d = rayMarch(ro, rd,0), mat = 0.;
gl_FragColor = vec4(l * (1.0), 1.0);
if (d < 200.) {
// Lighting
vec3 p = ro + rd * d,
n = getNormal(p);
mat = map(p,0).y;
// Light 1 Arguments
// 1: Ray starting point
// 2: Light position
// 3: Light intensity
// 4: Shadow intensity
// Lights
col += light1Color * getLight(p, vec3( 10., 15., 25.), 1., .2,n);
col += light2Color * getLight(p, vec3( 4., 2., -15.), 1., 1.,n);
// indirect lightning -> vec3 in normalize is light direction
col += indirColor * cl( dot( n, no(vec3(0. , 1., 10.))), 0., 1.);
if(mat==0.)
col *= vec3(0.2, 0.3, 0.3) + addSpecular(n,rd,.5, 2.);
if(mat==1.)
col = getSeaColor(p, n, no(vec3(0.0,0.3,0.8)),no(rd));
if(mat==2.)
col *= vec3(.8, .8, .5);
if(mat==3.)
col *= vec3(.8, .8, .5) + noise(p.xz*500.+1e5, .3,0);
if(mat==4.)
col *= vec3(0.0, 0.08, 0.11) + addSpecular(n,rd,0.3,0.7);
if(mat ==5.)
col = chevronColor*0.4;// * pow(cl(1. -dot(n, -rd), 0., 1.), .3);
if(mat == 6.)
col *= vec3(0.01, 0.04, 0.06) + addSpecular(n,rd,.1, 2.5);
}
col += glow * chevronColor*3.0;
return postProcess(colorFlashesAnim(applyFog(col, d, rd, vec3(0., -.1, -1.), .01)));
}
void main() {
gl_FragColor = vec4(sceneGate( (gl_FragCoord.xy * 2. - u_resolution.xy) / u_resolution.y), 1.);
}

146
shader2d.frag Normal file
View File

@ -0,0 +1,146 @@
#ifdef GL_ES
precision mediump float;
#endif
const float PI = 3.14159265;
uniform vec2 u_resolution;
uniform float u_time;
vec3 palette(float t) {
vec3 a = vec3(0.5, 0.5, 0.5);
vec3 b = vec3(1.0, 1.0, 1.0);
vec3 c = vec3(1.0, 1.0, 1.0);
vec3 d = vec3(0.0, 0.6666, 0.3333);
return a + b * cos(6.28318 * (c*t+d));
}
mat2 rotate(float angle){
return mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
}
float star(vec2 position, float radius, float sides){
float a = atan(position.x, position.y);
float slice = PI * 2. / sides;
return 1. - step(radius, cos(floor(-2.0 + a / slice) * slice - a));
}
float polygon(vec2 position, float radius, float sides){
float a = atan(position.x, position.y);
float slice = PI * 2.0 / sides;
return 1. - step(radius, cos(floor(0.5 + a / slice) * slice - a) * length(position));
}
float sdSphere(vec3 p, float s) {
return length(p) - s; // renders sphere
}
float sdBox(vec3 p, vec3 b) {
vec3 q = abs(p) - b;
return length(max(q,0.0)) + min(max(q.x,max(q.y, q.z)), 0.);
}
/** smooth minimum */
float smin( float a, float b, float k) {
float h = max(k-abs(a-b), 0.)/k;
return min(a,b) - h*h*h*k*(1./6.);
}
vec3 rot3d(vec3 p, vec3 axis, float angle) {
return mix(dot(axis,p)*axis, p, cos(angle)) + cross(axis, p ) * sin(angle);
}
mat2 rot2d(float angle) {
float s = sin(angle);
float c = cos(angle);
return mat2(c,-s,s,c);
}
// distance to scene
float getDist(vec3 p) {
// vec3 pos = vec3(sin(u_time)*1.2, 0., -.7);
// float sphere = sdSphere(p - pos, 1.);
// float scale = 10.;
// mod(p, 1.) == fract(p)... no gap
//p.z += u_time;
//p = fract(p) - 0.5;
//p.xy *= rot2d(u_time);
//p.yz *= rot2d(u_time);
float box = sdSphere(p-vec3(0.,0., -1.), .3);
float ground = p.y + 0.5;
return min(ground, box);
//return min(ground, min(sphere, box)); // normal union
/**
other functions are:
substract: return max(-d1, d2);
intersetion: return max(d1, d2);
*/
}
vec3 getNormal(vec3 p) {
float d = getDist(p);
vec2 e = vec2(.01, 0.);
vec3 n = d - vec3(
getDist(p-e.xyy),
getDist(p-e.yxy),
getDist(p-e.yyx)
);
return normalize(n);
}
float rayMarch(vec3 ro, vec3 rd) {
float t = 0.; // total distance travelled
// raymarching
for (int i = 0; i < 100; i++) {
vec3 p = ro + rd * t; // position at the ray
// p.xy *= rot2d(-u_time);
// p.xy *= rot2d(2. * sin(u_time + t *.2));
//p.y += sin(t)*0.6;
//p.x += cos(t)*0.6;
float d = getDist(p); // current distance to scene
t +=d; // "march" of the ray
if (t > 100. || d < 0.01 ) break; // stop if ray hits, or distance too long
}
return t;
}
float getLight(vec3 p, vec3 lightPos) {
vec3 l = normalize(lightPos - p);
vec3 n = getNormal(p);
float dif = clamp(dot(n,l), 0., 1.);
float d = rayMarch(p + n*0.02,l);
if (d<length(lightPos-p)) dif *= 0.3;
return dif;
}
void main() {
vec2 uv = (gl_FragCoord.xy * 2. - u_resolution.xy) / u_resolution.y;
vec3 ro = vec3(0., 0., -2.); // ray origin
float fov = .9;
vec3 rd = normalize(vec3(uv * fov, 1.));
vec3 col = vec3(0.); // final pixel color
float d = rayMarch(ro, rd);
vec3 p = ro + rd * d;
float dif = getLight(p, vec3(5.*sin(u_time), 7., 4.*cos(u_time)));
col = vec3(dif);
//col = vec3(d*0.1);
gl_FragColor = vec4(col, 1.);
}

288
shader_minified.h Normal file
View File

@ -0,0 +1,288 @@
// Generated with Shader Minifier 1.4.0 (https://github.com/laurentlb/Shader_Minifier/)
#ifndef SHADER_MINIFIED_H_
# define SHADER_MINIFIED_H_
# define VAR_u_resolution "v"
# define VAR_u_time "y"
const char *__temp_cleaned_shader_glsl =
"uniform vec2 v;"
"uniform float y;"
"const float m=22./7.;"
"vec3 f(vec3 y)"
"{"
"return normalize(y);"
"}"
"float f(float v,float f,float y)"
"{"
"return clamp(v,f,y);"
"}"
"mat2 n(float v)"
"{"
"float f=sin(v);"
"v=cos(v);"
"return mat2(v,-f,f,v);"
"}"
"float n(float v,float y,float m)"
"{"
"float z=max(m-abs(v-y),0.);"
"return max(v,y)+z*z*.25/m;"
"}"
"float f(vec2 v,int y)"
"{"
"if(y==1)"
"{"
"float y=dot(v,vec2(127.1,311.7));"
"return fract(sin(y)*43758.5453123);"
"}"
"v=50.*fract(v*.3183099);"
"return fract(v.x*v.y*(v.x+v.y));"
"}"
"float x(vec2 v,float y,int m)"
"{"
"vec2 s=floor(v);"
"v=fract(v);"
"v=v*v*(3.-2.*v);"
"float z=y;"
"if(m==1)"
"z=2.;"
"return-y+z*mix(mix(f(s+vec2(0),m),f(s+vec2(1,0),m),v.x),mix(f(s+vec2(0,1),m),f(s+vec2(1),m),v.x),v.y);"
"}"
"float s(vec3 v,float y,float m)"
"{"
"vec2 f=abs(vec2(length(v.xy),v.z))-vec2(m,y);"
"return min(max(f.x,f.y),0.)+length(max(f,0.));"
"}"
"float n(vec3 v,vec3 y)"
"{"
"v=abs(v)-y;"
"return length(max(v,0.))+min(max(v.x,max(v.y,v.z)),0.);"
"}"
"float s(vec3 v,vec2 y)"
"{"
"v.xy*=n(.5);"
"vec3 m=abs(v);"
"return max(m.z-y.y,max(m.x*.866025+v.y*.5,-v.y)-y.x*.5);"
"}"
"float z=0.;"
"vec3 d=vec3(1.5,1.4,0),i=vec3(-1.5,1.4,0),a=vec3(.49,.18,.49),p=vec3(.93,.37,.16),c=vec3(.29,.28,.33),l=vec3(.82,.5,.9),r=vec3(.79,.66,.43),C=vec3(.46,0,.9),F=vec3(0,.1,.3),K=vec3(.11,.16,.18);"
"float s(vec3 v)"
"{"
"return min((y-v.y)*v.z,v.x*m);"
"}"
"vec3 x(vec3 v)"
"{"
"for(float i=0.;i<7.;i++)"
"{"
"float m=9.+i*2.,z=1.;"
"if(y>m)"
"{"
"if(mod(i,2.)>=1.)"
"z=-1.;"
"v.xy*=n((9.+9.*f(sin(s(vec3(1.5,m,4))*.06),-.9,.9))*z);"
"}"
"}"
"return v;"
"}"
"float t(vec2 v)"
"{"
"if(y>=v.y)"
"v.x+=.045*f(sin(s(vec3(3,v.y,40))*.4),-.8,.8);"
"return v.x;"
"}"
"float t(vec2 v,float y)"
"{"
"v+=x(v,1.,1);"
"vec2 f=1.-abs(sin(v));"
"v=abs(cos(v));"
"f=mix(f,v,f);"
"return pow(1.-pow(f.x*f.y,.65),y);"
"}"
"vec3 x(vec3 v,int f)"
"{"
"float z=0.,i=1e3,r=m/12.,p,a=floor(atan(v.y,v.x)/r+.5)*r;"
"vec3 c=v;"
"c.xy=n(a)*c.xy;"
"float d=length(max(abs(c.xy-vec2(1.8,0))-vec2(.24,.14),0.))-.02,l=abs(length(v.xy)-1.8)-.2;"
"d=min(d,l);"
"l=n(abs(length(v.xy)-1.75)-.08,abs(v.z-.1)-.04,.005);"
"d=n(max(-l,d),abs(v.z)-.1,.02);"
"vec3 C=x(v),K=C;"
"r=m/16.;"
"K.xy=n(floor(atan(C.y,C.x)/r+.5)*r)*K.xy;"
"l=n(K.xyz-vec3(1.75,0,0),vec3(.04,.14,.05))-.02+x(v.xy*1e2,.001,0);"
"d=min(d,l);"
"if(d==l)"
"z=6.;"
"l=1e3;"
"float F=1.5,e=0.,b,g=4.,E=.6,D=.2;"
"for(int i=0;i<4;i++)"
"p=n(vec3(v.x,v.y+F+.05,v.z),vec3(2,.2,F))-.05,l=min(l,p),F+=.2;"
"l+=x(v.xz*50.+2e2,.01,0)-x(v.yz*2.+1.5,.15,0);"
"d=min(d,l);"
"if(d==l)"
"z=2.;"
"if(f==1)"
"{"
"vec2 f=v.xy;"
"for(int i=0;i<4;i++)"
"b=t((f+y)*E,g)+t((f-y)*E,g),e+=b*D,f*=mat2(1.6,1.2,-1.2,1.6),E*=1.9,D*=.22,g=mix(g,1.,.4);"
"}"
"l=max(max(-s(v,2.,min(2.-(y-23.)*3.,2.3)),s(v,.025,1.6)-e*.15),s(v,.3,1.7));"
"d=min(d,l);"
"if(d==l)"
"z=1.;"
"l=v.y+3.7+x(vec2(v.x,v.z*.44-40.)*.04+1e2,20.,0)+.25*sin(v.z*.5+y);"
"d=min(d,l);"
"if(d==l)"
"z=3.;"
"for(float f=0.;f<8.;f++)"
"{"
"r=24.67/(m*2.);"
"c=v;"
"a=r+(f+1.)*m/4.;"
"if(f==1.)"
"a+=.2;"
"if(f==7.)"
"a-=.2;"
"c.xy=n(a)*c.xy;"
"float p=9.+(f-1.)*2.+1.5;"
"if(f>0.)"
"{"
"c.x-=1.95;"
"vec3 v=c;"
"if(y>p)"
"v.x=t(vec2(v.x,p));"
"float f=s(vec3(c.x-.06,c.yz),vec2(.1,.15))-.01;"
"l=min(max(-s(vec3(v.x-.14,v.yz),vec2(.22))-.01,s(vec3(v),vec2(.2,.12))-.02),f);"
"d=min(d,l);"
"if(d==l)"
"z=4.;"
"if(d==f)"
"if(y>p+.2)"
"z=5.,i=min(l,f);"
"}"
"}"
"return vec3(d,z,i);"
"}"
"float t(vec3 v,vec3 y,int f)"
"{"
"vec3 m;"
"float i=0.;"
"for(int r=0;r<100;r++)"
"{"
"m=x(v+y*i,0);"
"if(f==0&&m.z<.3)"
"z+=.05/(1.+10.*pow(m.z,.5));"
"i+=m.x;"
"if(m.x<.001||i>4e2)"
"break;"
"}"
"return i;"
"}"
"vec3 w(vec3 v)"
"{"
"vec2 y=vec2(.01,0);"
"return f(x(v,1).x-vec3(x(v-y.xyy,1).x,x(v-y.yxy,1).x,x(v-y.yyx,1)));"
"}"
"float f(vec3 v,vec3 y,float m,vec3 d)"
"{"
"float i=1.;"
"vec3 l=f(y-v);"
"i=f(dot(d,l),0.,i);"
"float z=t(v+d*.0025,l,1);"
"if(z<length(y-v))"
"i*=m;"
"return i;"
"}"
"float n(vec3 v,vec3 y,vec3 f,float l)"
"{"
"return pow(max(dot(reflect(f,v),y),0.),l)*((l+8.)/(m*8.));"
"}"
"vec3 s(vec3 v,vec3 y,vec3 f,vec3 m)"
"{"
"return F+pow(dot(y,f)*.4+.6,60.)*K*.3-vec3(.73,.15,.66)*pow(clamp(1.-dot(y,-m),0.,1.),.7)+vec3(n(y,f,m,60.))*.2;"
"}"
"vec3 t(vec2 v,vec3 y,vec3 i,float m)"
"{"
"y=f(i-y);"
"i=f(cross(vec3(0,1,0),y));"
"return f(y*m+v.x*i+v.y*cross(y,i));"
"}"
"vec3 f()"
"{"
"vec3 v=vec3(0,f(6.-y,2.,6.),f(1e2-y*11.,6.,1e2));"
"if(y>7.5)"
"v+=vec3(0,f(7.5-y,-1.,0.),0);"
"if(y>10.5)"
"v=vec3(2,-1,1);"
"if(y>12.)"
"v=vec3(-1,-.7,4);"
"if(y>13.5)"
"v=vec3(0,0,4),v.yz*=n(-.6-cos(y-15.)*.2),v.xz*=n(sin((y-16.5)*.3));"
"if(y>19.5)"
"v=vec3(3,-.7,4);"
"if(y>21.8)"
"v.yz*=n((1.-cos(y-21.8))*-.025),v.xz*=n(sin((y-21.8)*.07));"
"return v;"
"}"
"vec3 n()"
"{"
"vec3 v=vec3(0,-.5,0);"
"if(y>10.5)"
"v=vec3(1.7,-1.1,0);"
"if(y>12.)"
"v=vec3(0);"
"if(y>13.5)"
"v=mix(d,i,(y-13.5)*.13);"
"if(y>19.5)"
"v=vec3(0);"
"return v;"
"}"
"vec3 h(vec3 v)"
"{"
"if(y>10.75)"
"{"
"float f=smoothstep(sin(s(vec3(.8,10.75,8)*2.)),-1.,.8);"
"v=mix(v,f*1.4*C,f*.76);"
"}"
"return v;"
"}"
"vec3 h(vec3 v,vec3 y,float m,float l)"
"{"
"return vec3(n(v,f(vec3(0,.3,.8)),f(y),pow(10.,l)))*m;"
"}"
"vec3 e(vec2 v)"
"{"
"vec3 m=f(),d=t(v,m,n(),f((28.-y)*-2.,2.,25.)),i=vec3(0);"
"float K=t(m,d,0),g=0.;"
"if(K<2e2)"
"{"
"vec3 v=m+d*K,y=w(v);"
"g=x(v,0).y;"
"i+=l*f(v,vec3(10,15,25),.2,y);"
"i+=r*f(v,vec3(4,2,-15),1.,y);"
"i+=c*f(dot(y,f(vec3(0,1,10))),0.,1.);"
"if(g==0.)"
"i*=vec3(.2,.3,.3)+h(y,d,.5,2.);"
"if(g==1.)"
"i=s(v,y,f(vec3(0,.3,.8)),f(d));"
"if(g==2.)"
"i*=vec3(.8,.8,.5);"
"if(g==3.)"
"i*=vec3(.8,.8,.5)+x(v.xz*5e2+1e5,.3,0);"
"if(g==4.)"
"i*=vec3(0,.08,.11)+h(y,d,.3,.7);"
"if(g==5.)"
"i=C*.4;"
"if(g==6.)"
"i*=vec3(.01,.04,.06)+h(y,d,.1,2.5);"
"}"
"i+=z*C*3.;"
"return smoothstep(0.,1.,pow(h(mix(i,mix(a,p,pow(max(dot(d,vec3(0,-.1,-1)),0.),8.)),1.-exp(-K*.01)))*vec3(.9,.8,.7),vec3(.45)))+1.-vec3(f((31.-y)*.5,0.,1.));"
"}"
"void main()"
"{"
"gl_FragColor=vec4(e((gl_FragCoord.xy*2.-v.xy)/v.y),1);"
"}";
#endif // SHADER_MINIFIED_H_

444
shader_new.glsl Normal file
View File

@ -0,0 +1,444 @@
precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
uniform sampler2D texture_sampler;
uniform sampler2D texts;
// Rotate
mat2 rot2D(float angle) {
float s = sin(angle);
float c = cos(angle);
return mat2(c, -s, s, c);
}
// Exponential smoothing
float smin( float a, float b, float k )
{
k *= 1.0;
float r = exp2(-a/k) + exp2(-b/k);
return -k*log2(r);
}
float smax( float a, float b, float k )
{
float h = max(k-abs(a-b),0.0);
return max(a, b) + h*h*0.25/k;
}
float hash(vec2 p)
{
p = 50.*fract( p*0.3183099);
return fract( p.x*p.y*(p.x+p.y) );
}
float noise( in vec2 p, float scale )
{
vec2 i = floor( p );
vec2 f = fract( p );
vec2 u = f*f*(3.0-2.0*f);
return -scale+scale*mix( mix( hash( i + vec2(0.0,0.0) ),
hash( i + vec2(1.0,0.0) ), u.x),
mix( hash( i + vec2(0.0,1.0) ),
hash( i + vec2(1.0,1.0) ), u.x), u.y);
}
float displacement( vec3 p )
{
return noise(10.*p.xy+u_time, 0.2) + 0.5*noise(10.*(p.xy+2.0)-u_time, 0.2);
}
/////////////////
// GEOMETRY //
/////////////////
float sdCylinder(vec3 p, vec3 a, vec3 b, float r)
{
vec3 ba = b - a;
vec3 pa = p - a;
float baba = dot(ba,ba);
float paba = dot(pa,ba);
float x = length(pa*baba-ba*paba) - r*baba;
float y = abs(paba-baba*0.5)-baba*0.5;
float x2 = x*x;
float y2 = y*y*baba;
float d = (max(x,y)<0.0)?-min(x2,y2):(((x>0.0)?x2:0.0)+((y>0.0)?y2:0.0));
return sign(d)*sqrt(abs(d))/baba;
}
float sdBox( in vec2 p, in vec2 r )
{
return length( max(abs(p)-r,0.0) );
}
float sdBox2(vec3 p, vec3 b) {
vec3 q = abs(p) - b;
return length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0);
}
float sdSphere(vec3 p, float r){
return length(p) -r;
}
float sdTriPrism( vec3 p, vec2 h, float rot )
{
p.xy *= rot2D(rot);
const float k = sqrt(3.0);
h.x *= 0.5*k;
p.xy /= h.x;
p.x = abs(p.x) - 1.0;
p.y = p.y + 1.0/k;
if( p.x+k*p.y>0.0 ) p.xy=vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;
p.x -= clamp( p.x, -2.0, 0.0 );
float d1 = length(p.xy)*sign(-p.y)*h.x;
float d2 = abs(p.z)-h.y;
return length(max(vec2(d1,d2),0.0)) + min(max(d1,d2), 0.);
}
//////////////////
// ANIMATION //
//////////////////
const float TWOPI = 6.28318530718;
// Rotate ring with duration d and startTime s
float ringRotateFunc(float d, float s, float timeFact) {
float maxCycles = d;
float startTime = s;
float phase = ((u_time * timeFact) - startTime) / TWOPI;
phase = min(phase, maxCycles);
return TWOPI * phase;
}
// Animate ring movements
vec3 ringAnim( in vec3 p) {
const float STARTDELAY = 2.0;
float factor = 9.0+9.0*clamp(sin(ringRotateFunc(2.0, 0.0, 1.0) * 0.05), -0.9, 0.9);
// delay start
if( u_time >= STARTDELAY ) {
factor = 9.0+9.0*clamp(sin(ringRotateFunc(2.0, 0.0, 1.0) * 0.05), -0.9, 0.9);
p.xy = rot2D(factor) * p.xy;
}
if(u_time >= 14.0) {
factor = 9.0+9.0*clamp(sin(ringRotateFunc(2.0, 14.0, 1.0) * 0.05), -0.9, 0.9);
p.xy = rot2D(factor * -1.0) * p.xy;
}
return p;
}
// Animate prism movements
float prismAnim(in float x, in float delay) {
if(u_time >= delay) {
x += (0.045*clamp(sin((ringRotateFunc(2.4, delay*10.0, 10.0) * 0.4)),-0.9, 0.9));
}
return x;
}
//////////////
// SCENE //
//////////////
vec2 map(in vec3 p)
{
float mat = 0.;
// Stargate
// Ring boxes
const float an = TWOPI/24.0;
float sector = floor(atan(p.y,p.x)/an + 0.5);
float angrot = sector*an;
vec3 q = p;
q.xy = mat2(cos(angrot),-sin(angrot),
sin(angrot), cos(angrot))*q.xy;
float d = sdBox( q.xy - vec2(1.8,0.0), vec2(0.24,0.14) ) - 0.02;
// Main ring
float d2 = abs(length(p.xy) - 1.8) - 0.2;
d = min(d,d2);
// Inner ring
float d3 = abs(length(p.xy) - 1.75) - 0.08;
d3 = smax( d3, abs(p.z - 0.1)-0.04, 0.005 );
d = max(-d3,d);
// Depth slice rings
d = smax( d, abs(p.z)-0.1, 0.02 );
// Prisms
float index = 1.0;
for(int i=0; i<8; i++ ) {
//vec3 p2 = prismAnim(p);
float secDist = TWOPI / 8.0; // sector distance
float angle = ((24.67 / TWOPI )); // sector size
vec3 q = p;
float rotationIncrement = angle + (index * secDist);
// Nudge first and the last prism out of the ground
if (i == 1) {
rotationIncrement = rotationIncrement + 0.2;
}
if (i == 7) {
rotationIncrement = rotationIncrement - 0.2;
}
float prismSector = floor(atan(p.y,p.x)/(rotationIncrement) + 0.5);
q.xy = rot2D(rotationIncrement) * q.xy;
// We can now call each prism by it's index
// draw all except the middle bottom prism
if (i > 0) {
q.x = q.x - 1.95;
if(i == 1) {
q.x = prismAnim(q.x, 13.0);
}
if(i == 2) {
q.x = prismAnim(q.x, 26.0);
}
float d4 = sdTriPrism(vec3(q.x, q.y - 0.0 , q.z - 0.0), vec2(0.2,0.2), 0.5) - 0.02;
d = min(d, d4);
}
index += 1.0;
}
//Rotating glyphs
vec3 p2 = ringAnim(p);
float an2 = (TWOPI/32.0);
float sector2 = floor((atan(p2.y,p2.x)/an2) + 0.5 );
float angrot2 = sector2*an2;
vec3 q2 = p2;
q2.xy = rot2D(angrot2)*q2.xy;
float d5 = sdBox2( q2.xyz - vec3(1.75,0.0,0.0), vec3(0.04, 0.14, 0.05) ) - 0.02;
d = min(d, d5);
// Gate Base
const float stepHeight = 0.1;
float stepDist = 1.5;
const float stepWidth = 2.0;
float steps = 1000.;
for(int i = 0; i < 4; i++) {
float step = sdBox2(vec3(p.x,p.y+stepDist,p.z), vec3(stepWidth,stepHeight,stepDist)) - 0.05;
steps = min(steps, step);
d = min(d, step);
stepDist += stepHeight * 2.0;
}
float water = 1000.;
if (u_time > 2.0){
float cylinder1 = sdCylinder ( p, vec3(0.,0.,0.0), vec3(0.,0.,-0.01), 1.6);
float cylinder2 = sdCylinder ( p, vec3(0.,0.,1.), vec3(0.,0.,-1), (2. - (u_time*2.0 - 2.0*2.0)));
float cylinder3 = sdCylinder ( p, vec3(0.,0.,1.), vec3(0.,0.,-1.), 1.6);
float disp = 0.;
if (u_time > 5.0){
disp = displacement(p+4.)*min(((u_time-5.0)*0.5), 0.25);
}
cylinder1 = cylinder1 + disp;
water = max(-cylinder2, cylinder1);
water = max(water, cylinder3);
d = min(d, water);
}
if (d==min(water,0.1))
{
mat = 1.0;
}
else if (d==min(steps, 0.1))
{
mat = 2.0;
}
return vec2( d, mat );
}
////////////////
// DRAWING //
////////////////
float rayMarch(vec3 ro, vec3 rd) {
float t = 0.; // total distance travelled
float d;
// Raymarching
for (int i = 0; i < 50; i++) {
vec3 p = ro + rd * t; // "cast" rays
d = map(p).x; // Get distance to objects
t += d; // "march" the ray
if (abs(d) < .001 || t > 80.) break;
}
return t;
}
vec3 getNormal(vec3 p) {
float d = map(p).x;
vec2 e = vec2(.01, 0);
vec3 n = d - vec3(
map(p-e.xyy).x,
map(p-e.yxy).x,
map(p-e.yyx).x);
return normalize(n);
}
float getLight(vec3 p, vec3 lightPos, float intensity, float shadow) {
vec3 l = normalize(lightPos - p);
vec3 n = getNormal(p);
float dif = clamp(dot(n, l), 0., intensity);
// Shadows
float d = rayMarch(p+n*.0025, l);
if( d<length(lightPos-p)) dif *= shadow;
return dif;
}
float getAmbientOcc(vec3 p, vec3 n) {
float occ = 0.;
float weight = 1.;
for (int i = 0; i < 8; i++) {
float len = 0.01 + 0.02 * float(i*i);
float dist = map(p+n*len).x;
occ += (len - dist) * weight;
weight *=0.85;
}
return 1.0 - clamp(0.6 * occ, 0., 1.);
}
vec3 applyFog(vec3 col, float t, vec3 rd, vec3 lightDir, float b ) {
float fogAmount = 1.0 - exp(-t*b);
float sunAmount = max( dot(rd, lightDir), 0.0 );
vec3 fogColor = mix( vec3(0.3686, 0.2431, 0.4392), // blue
vec3(0.4, 0.7294, 0.9216), // yellow
pow(sunAmount,8.0) );
return mix( col, fogColor, fogAmount );
}
vec3 getCameraRayDir(vec2 uv, vec3 p, vec3 l, float z)
{
vec3 f = normalize(l-p),
r = normalize(cross(vec3(0,1,0), f)),
u = cross(f,r),
c = f*z,
i = c + uv.x*r + uv.y*u,
d = normalize(i);
return d;
}
vec3 postProcess(vec3 col) {
// float random = noise(gl_FragCoord.xy, 0.01+u_time);
// float random2 = noise(gl_FragCoord.xy, .2+u_time);
//col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither
// Normalized pixel coordinates (from 0 to 1)
vec2 screenCoord = gl_FragCoord.xy/u_resolution.xy;
// Vignette
float radius = 0.8;
float d = smoothstep(radius, radius-0.4, length(screenCoord-vec2(0.5)));
col = mix(col, col * d, .9);
// Contrast
float constrast = .4;
col = mix(col, smoothstep(0.0, 1.0, col), constrast);
// Colour mapping
col *= vec3(1.0, 1.0, 1.0);
col = pow( col, vec3(1.0/2.2) ); // gamma
// fade in at the beginning
//col*=vec3(clamp((u_time-1.8)*0.5,0., 1.));
// fade out at the end
// col*=vec3(clamp((120.-u_time)*.35, 0., 1.));
return col;
}
void main()
{
// Initialization
vec2 uv = (gl_FragCoord.xy * 2. - u_resolution.xy) / u_resolution.y;
//vec2 m = iMouse.xy/u_resolution.xy;
vec3 ro = vec3(0, 2, 6);
//ro.yz *= rot2D(-m.y*3.14+1.);
//ro.xz *= rot2D(-m.x*6.2831);
//vec3 ro = vec3(0,0,-3); // ray origin
vec3 rd = getCameraRayDir(uv, ro, vec3(0, 0., 0.), 1.); // ray direction
vec3 col = vec3(0); // color
if(u_time > 0.0)
{
float d = rayMarch(ro, rd);
if (d < 25.)
{
// Lighting
vec3 p = ro + rd * d;
float mat = map(p).y;
// Light 1 Arguments
// 1: Ray starting point
// 2: Light position
// 3: Light intensity
// 4: Shadow intensity
float dif = getLight(p, vec3( 2, 50, 2), .5, .2);
// Color for light 1
// col = vec3(dif * vec3(0.9216, 0.9294, 0.9412));
// Light 2
dif = getLight(p, vec3( -3, 5, 5), 1., 0.2);
// Color for light 2
col += vec3(dif * vec3(0.502, 0.2824, 0.102));
dif = getLight(p, vec3( 3, -2, 5), 0.5, .8);
// Color for light 2
col += vec3(dif * vec3(0.1686, 0.2784, 0.6392));
vec3 n = getNormal(p);
float occ = getAmbientOcc(p,n);
vec3 dir = vec3(1. , 10., 1.);
float ind = clamp( dot( n, normalize(dir )), 0.0, 1.0 );
col += vec3(0.1255, 0.1255, 0.1137) * occ * ind;
if(mat==0.){
col *= vec3(.7,0.7,0.7);
}
else if(mat==1.){
col *= (noise(5.*(p.xy+2.)+u_time, -1.0) * noise(50.*(p.xy+2.), -0.4) + 0.5*noise(20.*(p.xy+2.0)-u_time, -0.5) * noise(5.*(p.xy+2.0), -0.75))*smoothstep(0.,0.75,(u_time-5.0)*0.1) + vec3(0.,0.,0.5*noise(10.*(p.xy+4.0)-u_time, -0.5)) + vec3(0.,0.,0.5);
}
else if(mat==2.){
col *= vec3(0.3608, 0.1765, 0.0471) - 0.2*noise((vec2(100.*p.x+300.,75.*p.z+150.0)), -2.2) * noise((vec2(15.*p.x+2.0,3.*p.z+2.)), -1.) + noise((vec2(15.*p.x+2.4,3.*p.z+2.)), -0.25);
}
}
gl_FragColor = vec4(postProcess(col), 1);
}
else {
// ************* post-process pass ******************
// Uncomment this to try a post-processing "effect"
gl_FragColor = texture2D(texture_sampler, (gl_FragCoord.xy / u_resolution ));
}
}

205
shader_old.glsl Normal file
View File

@ -0,0 +1,205 @@
precision mediump float;
uniform float u_time;
uniform vec2 u_resolution;
uniform sampler2D texture_sampler;
uniform sampler2D texts;
mat2 rot(float a) {
return mat2(cos(a), sin(a), -sin(a), cos(a));
}
float sdSphere(vec3 p, float r) {
return length(p)-r;
}
float pMod1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
return c;
}
vec2 map(vec3 pos) {
vec3 p = pos;
float d = 1e3;
float mat = 0.;
for (float i = 0.; i < 60.; i++) {
vec3 q = p;
pMod1(q.z, 1.);
q.xy *= rot(sin(u_time*0.25)*3.);
q.x -= 1.5 * cos(i / 3.1415);
q.y -= 1.5 * sin(i / 3.1415);
q.z += (8. - i) * 0.01;
float b = sdSphere(q, 0.02);
d = min(d, b);
if (d == b) {
mat = 0.;
}
}
for (float i = 0.; i < 99.; i++) {
vec3 q = p;
pMod1(q.z, 1.);
q.z -= .5;
q.xy *= rot(cos(-u_time*0.25)*2.);
q.x -= 3. * cos(i / 3.1415);
q.y -= 3. * sin(i / 3.1415);
q.z += i * 0.01;
float b = sdSphere(q, 0.03);
d = min(d, b);
if (d == b) {
mat = 1.;
}
}
for (float i = 0.; i < 20.; i++) {
vec3 q = p;
pMod1(q.z, 0.5);
q.xy *= rot(-sin(u_time)*1.5);
q.x -= .25 * cos(i / 3.1415);
q.y -= .25 * sin(i / 3.1415);
float b = sdSphere(q, 0.01);
d = min(d, b);
if (d == b) {
mat = 2.;
}
}
return vec2(d, mat);
}
vec3 palette(float t) {
vec3 a = vec3(0.5, 0.5, 0.5);
vec3 b = vec3(1.0, 1.0, 1.0);
vec3 c = vec3(1.0, 1.0, 1.0);
vec3 d = vec3(0.0, 0.6666, 0.3333);
return a + b * cos(6.28318 * (c*t+d));
}
vec2 rayMarch2(vec3 ro, vec3 rd) {
float t = 0.;
float d;
float ac = 0.;
for (int i = 0; i < 60; i++) {
vec3 p = ro + rd * t; // "cast" rays
d = map(p).x; // Get distance to objects
t += d; // "march" the ray
ac += exp(-d * 10.);
if (abs(d) < .002 || t > 20.) break;
}
return vec2(t, ac);
}
vec4 mainImage2() {
vec2 uv = (gl_FragCoord.xy * 2. - u_resolution.xy) / u_resolution.y;
//vec3 ro = vec3( u_time * 4., -u_time , u_time * 8.);
vec3 ro=vec3(0,0,u_time );
vec3 ray = normalize(vec3(uv, .7));
ray.xy *= rot(sin(u_time)*0.5);
vec2 rm = rayMarch2(ro, ray);
float d = rm.x;
float ac = rm.y;
vec3 p = ro + ray * d;
float mat = map(p).y;
vec3 col = vec3(0.0235, 0.0157, 0.1451);
if (d < 10.) {
if (mat == 0.) {
col = mix(col, vec3( 0., 0.3, 0.6) + 1. * 0.1*d, 0.4) * ac * 0.3;
}
if (mat == 1.) {
col = mix(col, palette(1. - 0.4*d), 0.2)*ac*0.5;
}
if (mat == 2.) {
col = palette( 0.5 + (1. -0.75 * d ) * 0.4);
}
}
return vec4(col, 1.0);
}
void main(void) {
gl_FragColor = mainImage2();
}
/*
float rand(vec2 co) {
float a = 12.9898;
float b = 78.233;
float c = 43758.5453;
float dt= dot(co.xy ,vec2(a,b));
float sn= mod(dt,3.14);
return fract(sin(sn) * c);
}
vec3 noise(vec2 uv) {
float rng = rand(vec2(uv.x+u_time, uv.y));
vec3 col = vec3(0.0+rng*0.1, 0.2+rng*0.1, 0.4+rng*0.1);
col.x += sin(uv.x+u_time*0.2)*0.1;
col.y += sin(uv.y+u_time*0.2)*0.1;
col.z += sin(uv.y+u_time*0.2)*0.1;
return col;
}
vec3 wave(vec2 uv, float phase, float _offset, float height, float waveLenght, float color) {
float val = -(sin(phase+uv.x*waveLenght+u_time) + (uv.y*6.+height)+_offset)*0.055;
val *= 1. + sin(phase + uv.x*waveLenght+u_time) + (uv.y*6.-height+_offset);
//return smoothstep(0.0, 1.0, val) * palette(color/360.);
return clamp(val, 0., .9) * palette(color/360.);
}
float gStartTime = 0.;
float gPrevTime = -0.1;
vec4 waveTexture(vec2 uv) {
uv.y = sin(uv.x*16. + u_time)/32. + uv.y-0.03;
uv.x -= (u_time-gStartTime)*0.2;
vec4 tex = texture2D(texts, uv);
if (tex.y > 0. && (gPrevTime != gStartTime)) {
gStartTime = u_time;
gPrevTime = gStartTime;
}
return vec4(tex.rgb, 1.0);
}
void TextScroller(out vec4 fragColor, in vec2 fragCoord)
{
// Normalized pixel coordinates (from -1 to 1, origo at 0,0)
vec2 uv = (fragCoord.xy * 2. - u_resolution.xy) / min(u_resolution.x, u_resolution.y);
vec3 col = vec3(0., 0.4, 0.6);
col += wave(uv, 0., 1., 3., 1., sin(u_time+0.3)*90.);
col += wave(uv, sin(u_time), 0., 3., -1., sin(u_time-1.2)*120.);
col += wave(uv, -3., 0., 3., 1., sin(u_time+0.5)*90.);
vec4 outBuf = waveTexture(uv * 0.1);
fragColor = max(mainImage2()*0.2, vec4(col*outBuf.xyz, 1.0)); // + vec4(random(uv*2.), 1.0);
}
void main(void) {
gl_FragColor = mainImage2();
// Get the initial color at this pixel.
// Get the initial color at this pixel.
/*else
{
mainImage2(gl_FragColor, gl_FragCoord.xy);
vec4 l;
vec2 texttop = vec2(0., -.35), pt = (gl_FragCoord.xy / u_resolution) - texttop;
if(pt.y > 0.) {
l = gl_FragColor + texture2D(texts, pt);
}
gl_FragColor = l;
}
}
*/

363
shader_test.glsl Normal file
View File

@ -0,0 +1,363 @@
#version 330
precision mediump float;
float EPS = 0.0001;
float PI = 3.14159265359;
float FLT_MAX = 900.;
uniform float u_time;
uniform vec2 u_resolution;
layout(location = 1) out vec4 my_fragColor;
const int maxIterations = 64;
const float stepScale = 1.;
const float stopThreshold = .005;
float fov = .6;
float nearClip = 0.;
float farClip = 80.;
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;
};
float saturate(float s) {
return clamp(s, 0., 1.);
}
float distanceToLine(vec3 origin, vec3 dir, vec3 point) {
vec3 pointToOrigin = point - origin;
float pointToOriginLength = length(pointToOrigin);
vec3 pointToOriginNorm = normalize(pointToOrigin);
float theta = dot(dir, pointToOriginNorm);
return pointToOriginLength * sqrt(1. - theta * theta);
}
mat4 scale(vec3 s) {
mat4 m = mat4(
s.x, 0., 0., 0.,
0., s.y, 0., 0.,
0., 0., s.z, 0.,
0., 0., 0., 1.
);
return inverse(m);
}
mat4 rotateX(float angle) {
return inverse(mat4(
1., 0., 0., 0.,
0., cos(angle), -sin(angle), 0.,
0., sin(angle), cos(angle), 0.,
0., 0., 0., 1.
));
}
mat4 rotateY(float angle) {
return inverse(mat4(
cos(angle), 0., sin(angle), 0.,
0., 1., 0., 0.,
-sin(angle), 0., cos(angle), 0.,
0., 0., 0., 1.
));
}
mat4 rotateZ(float angle) {
return inverse(mat4(
cos(angle), -sin(angle), 0., 0.,
sin(angle), cos(angle), 0., 0.,
0., 0., 1., 0.,
0., 0., 0., 1.
));
}
mat4 translate(vec3 p) {
return inverse(mat4(
1., 0., 0., p.x,
0., 1., 0., p.y,
0., 0., 1., p.z,
0., 0., 0., 1.
));
}
float sphere(vec3 p, float size) {
return length(p) - size;
}
float box(vec3 p, vec3 size) {
vec3 d = abs(p) - size;
return length(max(d, 0.)) + min(max(d.x, max(d.y, d.z)), 0.);
}
float tube2(vec2 p, float size) {
return length(p) - size;
}
float box2(vec2 p, float size) {
return length(max(abs(p) - size, 0.));
}
float cylindar(vec3 p, vec3 c) {
return length(p.xz - c.xy) - c.z;
}
float displacement(vec3 p, vec3 power) {
return sin(power.x * p.x) * sin(power.y * p.y) * sin(power.z * p.z);
}
vec3 repeat(vec3 p, float c) {
return mod(p, c) - c * .5;
}
float smin(float a, float b, float k) {
float res = exp(-k * a) + exp(-k * b);
return -log(res) / k;
}
float scene(vec3 p) {
vec3 _p = p;
_p = (vec4(_p, 1.)).xyz;
return min(
sphere((vec4(p, 1.) * translate(vec3(-.7, 0., 0.))).xyz, .5),
box((vec4(p, 1.) * translate(vec3(.7, 0., 0))).xyz, vec3(.45))
);
}
float calcAO(vec3 p, vec3 n) {
float k = 1.;
float occ = 0.;
for(int i = 0; i < 5; i++) {
float len = .15 * (float(i) + 1.);
float distance = scene(n * len + p);
occ += (len - distance) * k;
k *= .5;
}
return clamp(1. - occ, 0., 1.);
}
vec3 getNormal(vec3 p) {
const float e = EPS;
return normalize(vec3(
scene(p + vec3(e, 0.0, 0.0)) - scene(p + vec3(-e, 0.0, 0.0)),
scene(p + vec3(0.0, e, 0.0)) - scene(p + vec3(0.0, -e, 0.0)),
scene(p + vec3(0.0, 0.0, e)) - scene(p + vec3(0.0, 0.0, -e))
));
}
Surface near(Surface needle, Surface target) {
if(needle.dist < 0. || needle.dist < target.dist) {
return needle;
}
return target;
}
Hit rayMarching(vec3 origin, vec3 dir, float start, float end) {
Surface cs; // current surface
cs.dist = -1.;
Surface ns; // near surface
ns.dist = FLT_MAX;
Hit hit;
float sceneDist = 0.;
float rayDepth = start;
for(int i = 0; i < maxIterations; i++) {
sceneDist = scene(origin + dir * rayDepth);
// cache near distance
if(sceneDist < ns.dist) {
ns.dist = sceneDist;
}
if((sceneDist < stopThreshold) || (rayDepth >= end)) {
break;
}
rayDepth += sceneDist * stepScale;
cs.dist = rayDepth;
}
if (sceneDist >= stopThreshold) {
rayDepth = end;
}
cs.dist = rayDepth;
hit.surface = cs;
hit.near = ns;
return hit;
}
float getSpecular(vec3 position, vec3 normal, Light light, float diffuse, vec3 cameraPos) {
vec3 lightDir = light.position - position;
vec3 ref = reflect(-normalize(lightDir), normal);
float specular = 0.;
if(diffuse > 0.) {
specular = max(0., dot(ref, normalize(cameraPos - normal)));
float specularPower = 32.;
specular = pow(specular, specularPower) * light.intensity;
}
return specular;
}
vec3 lighting(Surface surface, vec3 cameraPos) {
vec3 position = surface.position;
vec3 color = vec3(0.);
vec3 sceneColor = vec3(0.);
vec3 normal = getNormal(position);
vec3 objColor = vec3(.4, .4, .4);
vec3 specularColor = vec3(.6, .6, .6);
Light directionalLight;
directionalLight.position = vec3(5., 5., 5.);
directionalLight.intensity = .8;
directionalLight.color = vec3(.4, .4, .4);
Light pointLight;
pointLight.position = vec3(5., 5., 5.);
pointLight.intensity = .8;
pointLight.color = vec3(.5, .5, .5);
Light ambientLight;
ambientLight.color = vec3(.1, .1, .1);
ambientLight.intensity = .3;
// directional light
float dDiffuse = max(0., dot(normal, normalize(directionalLight.position)));
dDiffuse *= directionalLight.intensity;
vec3 dDiffuseColor = dDiffuse * directionalLight.color * objColor;
float dSpecular = getSpecular(position, normal, directionalLight, dDiffuse, cameraPos);
vec3 dSpecularColor = dSpecular * specularColor;
// point light
vec3 pLightDir = pointLight.position - position;
float pDiffuse = max(0., dot(normal, normalize(pLightDir)));
vec3 pDiffuseColor = pDiffuse * pointLight.color * objColor;
float d = distance(pointLight.position, position);
vec3 k = vec3(.05, .9, .06);
float attenuation = 1. / (k.x + (k.y * d) + (k.z * d * d));
pDiffuse *= pointLight.intensity;
pDiffuse *= attenuation;
float pSpecular = getSpecular(position, normal, pointLight, pDiffuse, cameraPos);
pSpecular *= attenuation;
vec3 pSpecularColor = pSpecular * specularColor;
// ambient
vec3 ambientColor = ambientLight.color * ambientLight.intensity * objColor;
float ao = calcAO(position, normal);
vec3 diffuse = dDiffuseColor + pDiffuseColor;
vec3 specular = dSpecularColor + pSpecularColor;
vec3 ambient = ambientColor * ao;
// color += objColor * diffuse + specular + ambient * ao;
color += objColor * diffuse + ambient * ao;
return color;
}
vec3 emissiveLight(Light light, Surface surface, vec3 rayOrigin, vec3 rayDirection) {
vec3 eyeDirection = rayOrigin + rayDirection;
float lightEmissive = pow(distanceToLine(eyeDirection, rayDirection, light.position) + .95, -2.);
float c = dot(surface.normal, normalize(light.position - surface.position));
c = clamp(c, 0., 1.);
float em = 0.;
em = c + (1. - c) * step(farClip, surface.dist);
return lightEmissive * light.color * light.intensity * em;
}
vec3 emissiveLighting(Surface surface, vec3 rayOrigin, vec3 rayDirection) {
vec3 eyeDirection = rayOrigin + rayDirection;
vec3 normal = surface.normal;
Light pointLightRed;
pointLightRed.color = vec3(1., .1, .1);
pointLightRed.intensity = 1.;
pointLightRed.position = vec3(cos(u_time * 1.4) * 2., sin(u_time * 1.4) * 2., 0.);
Light pointLightGreen;
pointLightGreen.color = vec3(.1, 1., .1);
pointLightGreen.intensity = 1.;
pointLightGreen.position = vec3(cos(u_time * 1.6) * 2., 0., sin(u_time * 1.6) * 2.);
Light pointLightBlue;
pointLightBlue.color = vec3(.1, .1, 1.);
pointLightBlue.intensity = 1.;
pointLightBlue.position = vec3(0., sin(u_time * 1.8) * 2., cos(u_time * 1.8) * 2.);
vec3 color = vec3(0.);
color += emissiveLight(pointLightRed, surface, rayOrigin, rayDirection);
color += emissiveLight(pointLightGreen, surface, rayOrigin, rayDirection);
color += emissiveLight(pointLightBlue, surface, rayOrigin, rayDirection);
return color;
}
void main() {
/*vec2 aspect = vec2(u_resolution.x / u_resolution.y, 1.);
vec2 screenCoord = (2. * gl_FragCoord.xy / u_resolution.xy - 1.) * aspect;
// vec2 mouse = u_mouse.xy / u_resolution.xy - .5;
// camera settings
vec3 lookAt = vec3(0., 0., 0.);
vec3 cameraPos = vec3(0.,0., 5.);
// camera vectors
vec3 forward = normalize(lookAt - cameraPos);
vec3 right = normalize(cross(forward, vec3(0., 1., 0.)));
vec3 up = normalize(cross(right, forward));
// raymarch
vec3 rayOrigin = cameraPos;
vec3 rayDirection = normalize(forward + fov * screenCoord.x * right + fov * screenCoord.y * up);
Hit hit = rayMarching(rayOrigin, rayDirection, nearClip, farClip);
Surface surface = hit.surface;
Surface near = hit.near;
surface.position = rayOrigin + rayDirection * surface.dist;
// color
vec3 sceneColor = vec3(0.);
// no hit or too far
if(surface.dist >= farClip) {
vec3 bgColor = vec3(0.);
sceneColor = bgColor;
} else {
sceneColor += lighting(surface, cameraPos);
}
surface.normal = getNormal(surface.position);
sceneColor += emissiveLighting(surface, rayOrigin, rayDirection);
*/
// my_fragColor = vec4(sceneColor, 1.);
my_fragColor = vec4(vec3(0., 1., 0.), 1.);
}

967
shadertoy.glsl Normal file
View File

@ -0,0 +1,967 @@
#define u_time iTime
#define u_resolution iResolution
precision mediump float;
struct Ray {
vec3 rd;
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);
}
////////////////////////////////////////////////////////////////
//
// HG_SDF
//
// GLSL LIBRARY FOR BUILDING SIGNED DISTANCE BOUNDS
//
// version 2021-07-28
//
// Check https://mercury.sexy/hg_sdf for updates
// and usage examples. Send feedback to spheretracing@mercury.sexy.
//
// Brought to you by MERCURY https://mercury.sexy/
//
//
//
// Released dual-licensed under
// Creative Commons Attribution-NonCommercial (CC BY-NC)
// or
// MIT License
// at your choice.
//
// SPDX-License-Identifier: MIT OR CC-BY-NC-4.0
//
// /////
////////////////////////////////////////////////////////////////
//
// HELPER FUNCTIONS/MACROS
//
////////////////////////////////////////////////////////////////
const float PI = 3.14159265;
const float TAU = (2.*PI);
const float PHI = sqrt(5.)*0.5 + 0.5;
// Sign function that doesn't return 0
float sgn(float x) {
return (x < 0. )? -1. : 1.;
}
vec2 sgn(vec2 v) {
return vec2((v.x<0.)?-1.:1., (v.y<0.)?-1.:1.);
}
float square (float x) {
return x*x;
}
vec2 square (vec2 x) {
return x*x;
}
vec3 square (vec3 x) {
return x*x;
}
float lengthSqr(vec3 x) {
return dot(x, x);
}
// Maximum/minumum elements of a vector
float vmax(vec2 v) {
return max(v.x, v.y);
}
float vmax(vec3 v) {
return max(max(v.x, v.y), v.z);
}
float vmax(vec4 v) {
return max(max(v.x, v.y), max(v.z, v.w));
}
float vmin(vec2 v) {
return min(v.x, v.y);
}
float vmin(vec3 v) {
return min(min(v.x, v.y), v.z);
}
float vmin(vec4 v) {
return min(min(v.x, v.y), min(v.z, v.w));
}
////////////////////////////////////////////////////////////////
//
// PRIMITIVE DISTANCE FUNCTIONS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that is a distance function is called fSomething.
// The first argument is always a point in 2 or 3-space called <p>.
// Unless otherwise noted, (if the object has an intrinsic "up"
// side or direction) the y axis is "up" and the object is
// centered at the origin.
//
////////////////////////////////////////////////////////////////
float fSphere(vec3 p, float r) {
return length(p) - r;
}
// Plane with normal n (n is normalized) at some distance from the origin
float fPlane(vec3 p, vec3 n, float distanceFromOrigin) {
return dot(p, n) + distanceFromOrigin;
}
// Cheap Box: distance to corners is overestimated
float fBoxCheap(vec3 p, vec3 b) { //cheap box
return vmax(abs(p) - b);
}
// Box: correct distance to corners
float fBox(vec3 p, vec3 b) {
vec3 d = abs(p) - b;
return length(max(d, vec3(0))) + vmax(min(d, vec3(0)));
}
// Same as above, but in two dimensions (an endless box)
float fBox2Cheap(vec2 p, vec2 b) {
return vmax(abs(p)-b);
}
float fBox2(vec2 p, vec2 b) {
vec2 d = abs(p) - b;
return length(max(d, vec2(0.))) + vmax(min(d, vec2(0.)));
}
// Endless "corner"
float fCorner (vec2 p) {
return length(max(p, vec2(0.))) + vmax(min(p, vec2(0.)));
}
// Cylinder standing upright on the xz plane
float fCylinder(vec3 p, float r, float height) {
float d = length(p.xz) - r;
d = max(d, abs(p.y) - height);
return d;
}
// Capsule: A Cylinder with round caps on both sides
float fCapsule(vec3 p, float r, float c) {
return mix(length(p.xz) - r, length(vec3(p.x, abs(p.y) - c, p.z)) - r, step(c, abs(p.y)));
}
// Distance to line segment between <a> and <b>, used for fCapsule() version 2below
float fLineSegment(vec3 p, vec3 a, vec3 b) {
vec3 ab = b - a;
float t = clamp( dot(p - a, ab) / dot(ab, ab), 0., 1. );
return length((ab*t + a) - p);
}
// Capsule version 2: between two end points <a> and <b> with radius r
float fCapsule(vec3 p, vec3 a, vec3 b, float r) {
return fLineSegment(p, a, b) - r;
}
// Torus in the XZ-plane
float fTorus(vec3 p, float smallRadius, float largeRadius) {
return length(vec2(length(p.xz) - largeRadius, p.y)) - smallRadius;
}
// A circle line. Can also be used to make a torus by subtracting the smaller radius of the torus.
float fCircle(vec3 p, float r) {
float l = length(p.xz) - r;
return length(vec2(p.y, l));
}
// A circular disc with no thickness (i.e. a cylinder with no height).
// Subtract some value to make a flat disc with rounded edge.
float fDisc(vec3 p, float r) {
float l = length(p.xz) - r;
return l < 0. ? abs(p.y) : length(vec2(p.y, l));
}
// Hexagonal prism, circumcircle variant
float fHexagonCircumcircle(vec3 p, vec2 h) {
vec3 q = abs(p);
return max(q.y - h.y, max(q.x*sqrt(3.)*0.5 + q.z*0.5, q.z) - h.x);
//this is mathematically equivalent to this line, but less efficient:
//return max(q.y - h.y, max(dot(vec2(cos(PI/3), sin(PI/3)), q.zx), q.z) - h.x);
}
// Hexagonal prism, incircle variant
float fHexagonIncircle(vec3 p, vec2 h) {
return fHexagonCircumcircle(p, vec2(h.x*sqrt(3.)*0.5, h.y));
}
// Cone with correct distances to tip and base circle. Y is up, 0 is in the middle of the base.
float fCone(vec3 p, float radius, float height) {
vec2 q = vec2(length(p.xz), p.y);
vec2 tip = q - vec2(0, height);
vec2 mantleDir = normalize(vec2(height, radius));
float mantle = dot(tip, mantleDir);
float d = max(mantle, -q.y);
float projected = dot(tip, vec2(mantleDir.y, -mantleDir.x));
// distance to tip
if ((q.y > height) && (projected < 0.)) {
d = max(d, length(tip));
}
// distance to base ring
if ((q.x > radius) && (projected > length(vec2(height, radius)))) {
d = max(d, length(q - vec2(radius, 0)));
}
return d;
}
////////////////////////////////////////////////////////////////
//
// DOMAIN MANIPULATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// Conventions:
//
// Everything that modifies the domain is named pSomething.
//
// Many operate only on a subset of the three dimensions. For those,
// you must choose the dimensions that you want manipulated
// by supplying e.g. <p.x> or <p.zx>
//
// <inout p> is always the first argument and modified in place.
//
// Many of the operators partition space into cells. An identifier
// or cell index is returned, if possible. This return value is
// intended to be optionally used e.g. as a random seed to change
// parameters of the distance functions inside the cells.
//
// Unless stated otherwise, for cell index 0, <p> is unchanged and cells
// are centered on the origin so objects don't have to be moved to fit.
//
//
////////////////////////////////////////////////////////////////
// Rotate around a coordinate axis (i.e. in a plane perpendicular to that axis) by angle <a>.
// Read like this: R(p.xz, a) rotates "x towards z".
// This is fast if <a> is a compile-time constant and slower (but still practical) if not.
void pR(inout vec2 p, float a) {
p = cos(a)*p + sin(a)*vec2(p.y, -p.x);
}
// Shortcut for 45-degrees rotation
void pR45(inout vec2 p) {
p = (p + vec2(p.y, -p.x))*sqrt(0.5);
}
// Repeat space along one axis. Use like this to repeat along the x axis:
// <float cell = pMod1(p.x,5);> - using the return value is optional.
float pMod1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Same, but mirror every second cell so they match at the boundaries
float pModMirror1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p + halfsize,size) - halfsize;
p *= mod(c, 2.0)*2. - 1.;
return c;
}
// Repeat the domain only in positive direction. Everything in the negative half-space is unchanged.
float pModSingle1(inout float p, float size) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
if (p >= 0.)
p = mod(p + halfsize, size) - halfsize;
return c;
}
// Repeat only a few times: from indices <start> to <stop> (similar to above, but more flexible)
float pModInterval1(inout float p, float size, float start, float stop) {
float halfsize = size*0.5;
float c = floor((p + halfsize)/size);
p = mod(p+halfsize, size) - halfsize;
if (c > stop) { //yes, this might not be the best thing numerically.
p += size*(c - stop);
c = stop;
}
if (c <start) {
p += size*(c - start);
c = start;
}
return c;
}
// Repeat around the origin by a fixed angle.
// For easier use, num of repetitions is use to specify the angle.
float pModPolar(inout vec2 p, float repetitions) {
float angle = 2.*PI/repetitions;
float a = atan(p.y, p.x) + angle/2.;
float r = length(p);
float c = floor(a/angle);
a = mod(a,angle) - angle/2.;
p = vec2(cos(a), sin(a))*r;
// For an odd number of repetitions, fix cell index of the cell in -x direction
// (cell index would be e.g. -5 and 5 in the two halves of the cell):
if (abs(c) >= (repetitions/2.)) c = abs(c);
return c;
}
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5,size) - size*0.5;
return c;
}
// Same, but mirror every second cell so all boundaries match
vec2 pModMirror2(inout vec2 p, vec2 size) {
vec2 halfsize = size*0.5;
vec2 c = floor((p + halfsize)/size);
p = mod(p + halfsize, size) - halfsize;
p *= mod(c,vec2(2.))*2. - vec2(1);
return c;
}
// Same, but mirror every second cell at the diagonal as well
vec2 pModGrid2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
p *= mod(c,vec2(2.))*2. - vec2(1.);
p -= size/2.;
if (p.x > p.y) p.xy = p.yx;
return floor(c/2.);
}
// Repeat in three dimensions
vec3 pMod3(inout vec3 p, vec3 size) {
vec3 c = floor((p + size*0.5)/size);
p = mod(p + size*0.5, size) - size*0.5;
return c;
}
// Mirror at an axis-aligned plane which is at a specified distance <dist> from the origin.
float pMirror (inout float p, float dist) {
float s = sgn(p);
p = abs(p)-dist;
return s;
}
// Mirror in both dimensions and at the diagonal, yielding one eighth of the space.
// translate by dist before mirroring.
vec2 pMirrorOctant (inout vec2 p, vec2 dist) {
vec2 s = sgn(p);
pMirror(p.x, dist.x);
pMirror(p.y, dist.y);
if (p.y > p.x)
p.xy = p.yx;
return s;
}
// Reflect space at a plane
float pReflect(inout vec3 p, vec3 planeNormal, float offset) {
float t = dot(p, planeNormal)+offset;
if (t < 0.) {
p = p - (2.*t)*planeNormal;
}
return sgn(t);
}
////////////////////////////////////////////////////////////////
//
// OBJECT COMBINATION OPERATORS
//
////////////////////////////////////////////////////////////////
//
// We usually need the following boolean operators to combine two objects:
// Union: OR(a,b)
// Intersection: AND(a,b)
// Difference: AND(a,!b)
// (a and b being the distances to the objects).
//
// The trivial implementations are min(a,b) for union, max(a,b) for intersection
// and max(a,-b) for difference. To combine objects in more interesting ways to
// produce rounded edges, chamfers, stairs, etc. instead of plain sharp edges we
// can use combination operators. It is common to use some kind of "smooth minimum"
// instead of min(), but we don't like that because it does not preserve Lipschitz
// continuity in many cases.
//
// Naming convention: since they return a distance, they are called fOpSomething.
// The different flavours usually implement all the boolean operators above
// and are called fOpUnionRound, fOpIntersectionRound, etc.
//
// The basic idea: Assume the object surfaces intersect at a right angle. The two
// distances <a> and <b> constitute a new local two-dimensional coordinate system
// with the actual intersection as the origin. In this coordinate system, we can
// evaluate any 2D distance function we want in order to shape the edge.
//
// The operators below are just those that we found useful or interesting and should
// be seen as examples. There are infinitely more possible operators.
//
// They are designed to actually produce correct distances or distance bounds, unlike
// popular "smooth minimum" operators, on the condition that the gradients of the two
// SDFs are at right angles. When they are off by more than 30 degrees or so, the
// Lipschitz condition will no longer hold (i.e. you might get artifacts). The worst
// case is parallel surfaces that are close to each other.
//
// Most have a float argument <r> to specify the radius of the feature they represent.
// This should be much smaller than the object size.
//
// Some of them have checks like "if ((-a < r) && (-b < r))" that restrict
// their influence (and computation cost) to a certain area. You might
// want to lift that restriction or enforce it. We have left it as comments
// in some cases.
//
// usage example:
//
// float fTwoBoxes(vec3 p) {
// float box0 = fBox(p, vec3(1));
// float box1 = fBox(p-vec3(1), vec3(1));
// return fOpUnionChamfer(box0, box1, 0.2);
// }
//
////////////////////////////////////////////////////////////////
// The "Chamfer" flavour makes a 45-degree chamfered edge (the diagonal of a square of size <r>):
float fOpUnionChamfer(float a, float b, float r) {
return min(min(a, b), (a - r + b)*sqrt(0.5));
}
// Intersection has to deal with what is normally the inside of the resulting object
// when using union, which we normally don't care about too much. Thus, intersection
// implementations sometimes differ from union implementations.
float fOpIntersectionChamfer(float a, float b, float r) {
return max(max(a, b), (a + r + b)*sqrt(0.5));
}
// Difference can be built from Intersection or Union:
float fOpDifferenceChamfer (float a, float b, float r) {
return fOpIntersectionChamfer(a, -b, r);
}
// The "Round" variant uses a quarter-circle to join the two objects smoothly:
float fOpUnionRound(float a, float b, float r) {
vec2 u = max(vec2(r - a,r - b), vec2(0));
return max(r, min (a, b)) - length(u);
}
float fOpIntersectionRound(float a, float b, float r) {
vec2 u = max(vec2(r + a,r + b), vec2(0));
return min(-r, max (a, b)) + length(u);
}
float fOpDifferenceRound (float a, float b, float r) {
return fOpIntersectionRound(a, -b, r);
}
// The "Columns" flavour makes n-1 circular columns at a 45 degree angle:
float fOpUnionColumns(float a, float b, float r, float n) {
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.x -= sqrt(2.)/2.*r;
p.x += columnradius*sqrt(2.);
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
// At this point, we have turned 45 degrees and moved at a point on the
// diagonal that we want to place the columns on.
// Now, repeat the domain along this direction and place a circle.
pMod1(p.y, columnradius*2.);
float result = length(p) - columnradius;
result = min(result, p.x);
result = min(result, a);
return min(result, b);
} else {
return min(a, b);
}
}
float fOpDifferenceColumns(float a, float b, float r, float n) {
a = -a;
float m = min(a, b);
//avoid the expensive computation where not needed (produces discontinuity though)
if ((a < r) && (b < r)) {
vec2 p = vec2(a, b);
float columnradius = r*sqrt(2.)/n/2.0;
columnradius = r*sqrt(2.)/((n-1.)*2.+sqrt(2.));
pR45(p);
p.y += columnradius;
p.x -= sqrt(2.)/2.*r;
p.x += -columnradius*sqrt(2.)/2.;
if (mod(n,2.) == 1.) {
p.y += columnradius;
}
pMod1(p.y,columnradius*2.);
float result = -length(p) + columnradius;
result = max(result, p.x);
result = min(result, a);
return -min(result, b);
} else {
return -m;
}
}
float fOpIntersectionColumns(float a, float b, float r, float n) {
return fOpDifferenceColumns(a,-b,r, n);
}
// The "Stairs" flavour produces n-1 steps of a staircase:
// much less stupid version by paniq
float fOpUnionStairs(float a, float b, float r, float n) {
float s = r/n;
float u = b-r;
return min(min(a,b), 0.5 * (u + a + abs ((mod (u - a + s, 2. * s)) - s)));
}
// We can just call Union since stairs are symmetric.
float fOpIntersectionStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, -b, r, n);
}
float fOpDifferenceStairs(float a, float b, float r, float n) {
return -fOpUnionStairs(-a, b, r, n);
}
// Similar to fOpUnionRound, but more lipschitz-y at acute angles
// (and less so at 90 degrees). Useful when fudging around too much
// by MediaMolecule, from Alex Evans' siggraph slides
float fOpUnionSoft(float a, float b, float r) {
float e = max(r - abs(a - b), 0.);
return min(a, b) - e*e*0.25/r;
}
// produces a cylindical pipe that runs along the intersection.
// No objects remain, only the pipe. This is not a boolean operator.
float fOpPipe(float a, float b, float r) {
return length(vec2(a, b)) - r;
}
// first object gets a v-shaped engraving where it intersect the second
float fOpEngrave(float a, float b, float r) {
return max(a, (a + r - abs(b))*sqrt(0.5));
}
// first object gets a capenter-style groove cut out
float fOpGroove(float a, float b, float ra, float rb) {
return max(a, min(a + ra, rb - abs(b)));
}
// first object gets a capenter-style tongue attached
float fOpTongue(float a, float b, float ra, float rb) {
return min(a, max(a - ra, abs(b) - rb));
}
//#endSection End of library
// https://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl
// golden_noise
float noise(in vec2 xy, in float seed){
return fract(tan(distance(xy*PHI, xy)*seed)*xy.x);
}
vec3 rnd23(vec2 p)
{
vec3 p3 = fract(p.xyx * vec3(.1031, .1030, .0973));
p3 += dot(p3, p3.yxz+33.33);
return fract((p3.xxy+p3.yzz)*p3.zyx);
}
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
float opExtrusion( in vec3 p, in float sdf, in float h )
{
vec2 w = vec2( sdf, abs(p.z) - h);
return min(max(w.x,w.y),0.0) + length(max(w,0.0));
}
float sdCog2d(vec2 pos) {
float r = length(pos)*2.;
float a = atan(pos.y,pos.x);
float f = 1. - smoothstep(-0.2, .8, sin(a * 12.))*0.14;
f = smoothstep(f,f + 2.,r);
return f;
}
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 sdHex(vec3 pos, float i, float angle) {
vec3 po = pos;
po.xz *= Rot(angle);
po.yz *= Rot(angle);
pR(po.yz, PI/2.);
float d1 = fHexagonCircumcircle(po, vec2(0.5+i, .1));
float d2 = fHexagonCircumcircle(po, vec2(0.2+i, .1));
return fOpDifferenceRound(d1,d2,0.1);
}
// Scene
vec2 mapScene(in vec3 p) {
float mat = 0.;
float d = 1e10;
//float dGround = p.y + 2.5;
//d = min(d, dGround);
vec3 po = p;
//po.y += sin(u_time);
// pMod3(po, vec3(3.));
po.xy *= scale(vec2(1.3, 1.3));
const float num = 6.;
for (float i = 1.; i <= num; i++) {
// pos.z += i*.1;
float a = sdHex(po,i*0.35, u_time + abs( 2. + 0.4 * sin(u_time)) * i*3.1415/num);
d = min(d,a);
if (d == a) mat = 1. + mod(i,3.);
}
//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);
// if ( d == c1) mat = 1.;
//if ( d == c3) mat = 3.;
return vec2(d, mat);
}
vec3 castRay(vec3 ro, vec3 rd, inout vec3 pos) {
float t = 0.0;
float mat = 0.;
float hit = 0.;
for(int i=0; i < 150; i++) {
pos = ro + rd * t;
vec2 res = mapScene(pos);
t += res.x;
mat = res.y;
if (t > 80.) break;
if (res.x < abs(0.001*t) ) {
hit = 1.;
break;
}
}
if (t > 80.) t = -1.0;
return vec3(t, mat, hit);
}
vec3 castReflectedRay(vec3 ro, vec3 rd, vec3 pos) {
float t = 0.0;
float mat = 0.;
float hit = 0.;
for(int i=0; i < 50; i++) {
pos = ro + rd * t;
vec2 res = mapScene(pos);
t += res.x;
mat = res.y;
if (t > 40.) break;
if (res.x < abs(0.001*t) ) {
hit = 1.;
break;
}
}
if (t > 40.) t = -1.0;
return vec3(t, mat, hit);
}
float softshadow( in vec3 ro, in vec3 rd, float mint, float maxt, float w )
{
float res = 1.0;
float t = mint;
for( int i=0; i<40; i++ )
{
if (t > maxt) break;
float h = mapScene(ro + t*rd).x;
res = min( res, h/(w*t) );
t += clamp(h, 0.005, 0.50);
if( res < -1.0 || t>maxt ) break;
}
res = max(res,-1.0);
return 0.25*(1.0+res)*(1.0+res)*(2.0-res);
}
float castShadow(vec3 ro, vec3 rd) {
float res = 1.0;
float t = 0.001;
for(int i = 0; i < 40; i++) {
float h = mapScene(ro + t* rd).x;
res = min(res, 10.0*h/t);
if (abs(h) < (0.001*t) ) break;
t += h;
if (t > 20.) break;
}
return clamp(res,0., 1.);
}
vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.001, 0.);
vec3 n = vec3( mapScene(pos+e.xyy).x - mapScene(pos-e.xyy).x,
mapScene(pos+e.yxy).x - mapScene(pos-e.yxy).x,
mapScene(pos+e.yyx).x - mapScene(pos-e.yyx).x
);
return normalize(n);
}
vec3 fresnel( vec3 F0, vec3 h, vec3 l ) {
return F0 + ( 1.0 - F0 ) * pow( clamp( 1.0 - dot( h, l ), 0.0, 1.0 ), 5.0 );
}
// https://suricrasia.online/blog/shader-functions/
vec3 eRot(vec3 p, vec3 ax, float ro) {
return mix(dot(ax,p)*ax, p, cos(ro)) + sin(ro)*cross(ax,p);
}
vec3 addPointLight(vec3 light_pos, vec3 light_color, float shininess, vec3 v, vec3 dir, vec3 n, float occ) {
vec3 Ks = vec3( .5454 );
vec3 Kd = vec3( 1. );
vec3 ref = reflect( dir, n );
vec3 vl = normalize( v );
vec3 diffuse = Kd * vec3( max( 0.0, dot( vl, n ) ) );
vec3 specular = vec3( max( 0.0, dot( vl, ref ) ) );
vec3 F = fresnel( Ks, normalize( vl - dir ), vl )*occ;
float shadow = softshadow(v+n*0.01,light_pos, .01, 30., 18.);
//float shadow = castShadow(v + n*0.02, light_pos);
specular = pow( specular, vec3( shininess ) )*occ;
return light_color * mix( diffuse, specular, F ) * shadow;
}
float getAmbientOcc(vec3 p, vec3 n) {
float occ = 0.;
float weight = 1.;
for (int i = 0; i < 8; i++) {
float len = 0.01 + 0.02 * float(i*i);
float dist = mapScene(p+n*len).x;
occ += (len - dist) * weight;
weight *=0.85;
}
return 1.0 - clamp(0.6 * occ, 0., 1.);
}
vec3 shading(vec3 v, vec3 n, vec3 dir, float material) {
float shininess = 1.;
float occ = getAmbientOcc(v,n);
vec3 outMaterial = vec3(0.1529, 0.1529, 0.1529);
if (material == 0.) {
outMaterial = vec3(0.2863, 0.1059, 0.2431);
shininess = 1.5;
} else if (material == 1.) {
outMaterial = vec3(0.3294, 0.0941, 0.6);
shininess = 0.6;
} else if (material == 2.) {
outMaterial = vec3(0.5804, 0.9647, 1.0);
shininess = 1.;
} else if (material == 3.) {
outMaterial = vec3(0.0, 0.0, 0.0);
shininess = 100.;
} else if (material == 4.) {
outMaterial = vec3(0.9961, 1.0, 0.9922);
shininess = .3;
}
vec3 lights = vec3(0.);
lights += addPointLight(vec3( 0., -40., -1. ),vec3(0.56, 0.44, 0.18)*2., shininess, v, dir, n, occ);
lights += addPointLight(vec3( -20.,4., 10. ),vec3(0.04, 0.2, 0.71)*2., shininess, v, dir, n, occ);
// lights += addPointLight(vec3( 2., -1.0, -1.0 ),vec3(0.12, 0.51, 0.63)*2., shininess, v,dir,n,occ );
vec3 lightDir = vec3(0. , 4., 2.);
float sun_dif = clamp(dot(n, lightDir), 0., 1.);
float shadow = softshadow(v+n*0.01,lightDir, .01, 30., 18.);
lights += vec3(0.6627, 0.7098, 0.8863) * sun_dif*shadow*occ; //* shadow; //* mix( vec3(sun_dif), specular, F )
// final += texture( iChannel0, ref ).rgb * fresnel( Ks, n, -dir );
// vec3 col = vec3(0.4)* ref.x;
float ind = clamp( dot( n, normalize(lightDir*vec3(-1.0,.0,-1.0)) ), 0.0, 1.0 );
lights += vec3(0.1333, 0.1333, 0.1216) * ind *occ;
return outMaterial * max(vec3(0.), lights);
}
vec3 postProcess(vec2 screenCoord, vec3 col) {
// float random = noise(gl_FragCoord.xy, 0.01+u_time);
// float random2 = noise(gl_FragCoord.xy, .2+u_time);
//col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither
// Vignette
float radius = 0.8;
float d = smoothstep(radius, radius-0.4, length(screenCoord-vec2(0.5)));
col = mix(col, col * d, .9);
// Contrast
float constrast = .5;
col = mix(col, smoothstep(0.0, 1.0, col), constrast);
// Colour mapping
col *= vec3(1.0, 1.0, 1.0);
col = pow( col, vec3(1.0/2.2) ); // gamma
// fade in at the beginning
//col*=vec3(clamp((u_time-1.8)*0.5,0., 1.));
// fade out at the end
// col*=vec3(clamp((120.-u_time)*.35, 0., 1.));
return col;
}
vec3 getCameraRayDir(vec2 uv, vec3 camPos, vec3 lookAt, float zoom){
vec3 f = normalize(lookAt - camPos);
vec3 r = cross(vec3(0.0,1.0,0.0),f);
vec3 u = cross(f,r);
vec3 c=camPos+f*zoom;
vec3 i=c+uv.x*r+uv.y*u;
return normalize(i-camPos);
}
vec3 getCameraFov(vec2 uv, vec3 camPos, vec3 camTarget) {
vec3 camForward = normalize(camTarget-camPos);
vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camForward));
vec3 camUp = normalize(cross(camForward,camRight));
float fov = 1.7;
// Depth of field
float dof = .25;
vec2 h = vec2( noise(gl_FragCoord.xy, .13), noise(gl_FragCoord.xy, .4));
//vec3 h= rnd23(gl_FragCoord.xy);
vec3 voff = sqrt(h.x)*(camRight*sin(h.y*6.283)+camUp*cos(h.y*6.283))*dof;
// camTarget -=voff;
float focusdistance = 150.2;
return normalize(uv.x * camRight + uv.y * camUp + fov * camForward + voff * fov/focusdistance);
}
vec3 applyFog(vec3 col, float t, vec3 rd, vec3 lightDir, float b ) {
float fogAmount = 1.0 - exp(-t*b);
float sunAmount = max( dot(rd, lightDir), 0.0 );
vec3 fogColor = mix( vec3(0.3686, 0.2431, 0.4392), // blue
vec3(0.4, 0.7294, 0.9216), // yellow
pow(sunAmount,8.0) );
return mix( col, fogColor, fogAmount );
}
vec3 render(vec2 uv) {
bool useDof = !true;
//vec2 uv = (2.0 * gl_FragCoord.xy - u_resolution.xy) / u_resolution.y;
float angle = -2.4 +iTime*0.4;
//angle = 0.;
// camera
vec3 camPos = vec3(0., 5., -3.);
vec3 camTarget = vec3(0., 0., 0.);
vec3 rayDir;
if (useDof) {
rayDir = getCameraFov(uv, camPos, camTarget);
} else {
rayDir = getCameraRayDir(uv, camPos, camTarget, 1.0);
}
vec3 col = vec3(0.051, 0.0667, 0.1529);
//vec3 col = vec3(0.0314, 0.0118, 0.1255) + rayDir.y * 0.4;
vec3 hitPos = vec3(0.);
vec3 t = castRay(camPos, rayDir, hitPos);
vec3 rd = rayDir;
if (t.z > 0.) {
vec3 nor = calcNormal(hitPos);
col = shading(hitPos, nor, rayDir , t.y);
float fogAmount = 0.04;
col = col*exp(-t.x*fogAmount) + applyFog(col, t.x, rd, vec3(0., .3, -1.), fogAmount) * (1.0-exp(-t.x*fogAmount));
rayDir = normalize(reflect(rayDir, nor));
vec3 rayOrigin = hitPos + (rayDir * 0.01);
vec3 t2 = castReflectedRay(rayOrigin, rayDir, hitPos);
if (t2.z > 0.) {
hitPos = rayOrigin + rayDir * t2.x;
nor = calcNormal(hitPos);
col += 0.1 * shading(hitPos, nor, rayDir , t2.y);
/* rayDir = normalize(reflect(rayDir, nor));
rayOrigin = hitPos + (rayDir * 0.01);
vec3 t3 = castReflectedRay(rayOrigin, rayDir, hitPos);
if (t3.z > 0.) {
hitPos = rayOrigin + rayDir * t3.x;
nor = calcNormal(hitPos);
col += 0.025 * shading(hitPos, nor, rayDir , t3.y);
} */
}
}
// pixelColor*exp(-distance*b) + fogColor*(1.0-exp(-distance*b));
return col;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec3 finalColor = vec3(0.);
vec2 uv = (2.0 * fragCoord.xy - u_resolution.xy) / u_resolution.y;
finalColor += render(uv);
vec2 screenCoord = fragCoord.xy/iResolution.xy;
finalColor = postProcess(screenCoord, finalColor);
fragColor = vec4(finalColor, 1.);
}

1
sointu.bat Normal file
View File

@ -0,0 +1 @@
sointu-compile -i -o . -arch=386 -t d:\dev\4kdemo\sointu_templates 4klang.yml

View File

@ -0,0 +1,205 @@
{{- if .HasOp "pop"}}
;-------------------------------------------------------------------------------
; POP opcode: remove (discard) the topmost signal from the stack
;-------------------------------------------------------------------------------
{{- if .Mono "pop" -}}
; Mono: a -> (empty)
{{- end}}
{{- if .Stereo "pop" -}}
; Stereo: a b -> (empty)
{{- end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_pop" "Opcode"}}
{{- if .StereoAndMono "pop"}}
jnc su_op_pop_mono
{{- end}}
{{- if .Stereo "pop"}}
fstp st0
{{- end}}
{{- if .StereoAndMono "pop"}}
su_op_pop_mono:
{{- end}}
fstp st0
ret
{{end}}
{{- if .HasOp "add"}}
;-------------------------------------------------------------------------------
; ADD opcode: add the two top most signals on the stack
;-------------------------------------------------------------------------------
{{- if .Mono "add"}}
; Mono: a b -> a+b b
{{- end}}
{{- if .Stereo "add" -}}
; Stereo: a b c d -> a+c b+d c d
{{- end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_add" "Opcode"}}
{{- if .StereoAndMono "add"}}
jnc su_op_add_mono
{{- end}}
{{- if .Stereo "add"}}
fadd st0, st2
fxch
fadd st0, st3
fxch
ret
{{- end}}
{{- if .StereoAndMono "add"}}
su_op_add_mono:
{{- end}}
{{- if .Mono "add"}}
fadd st1
{{- end}}
{{- if .Mono "add"}}
ret
{{- end}}
{{end}}
{{- if .HasOp "addp"}}
;-------------------------------------------------------------------------------
; ADDP opcode: add the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
; Mono: a b -> a+b
; Stereo: a b c d -> a+c b+d
;-------------------------------------------------------------------------------
{{.Func "su_op_addp" "Opcode"}}
{{- if .StereoAndMono "addp"}}
jnc su_op_addp_mono
{{- end}}
{{- if .Stereo "addp"}}
faddp st2, st0
faddp st2, st0
ret
{{- end}}
{{- if .StereoAndMono "addp"}}
su_op_addp_mono:
{{- end}}
{{- if (.Mono "addp")}}
faddp st1, st0
ret
{{- end}}
{{end}}
{{- if .HasOp "loadnote"}}
;-------------------------------------------------------------------------------
; LOADNOTE opcode: load the current note, scaled to [-1,1]
;-------------------------------------------------------------------------------
{{if (.Mono "loadnote") -}} ; Mono: (empty) -> n, where n is the note{{end}}
{{if (.Stereo "loadnote") -}}; Stereo: (empty) -> n n{{end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_loadnote" "Opcode"}}
{{- if .StereoAndMono "loadnote"}}
jnc su_op_loadnote_mono
{{- end}}
{{- if .Stereo "loadnote"}}
call su_op_loadnote_mono
su_op_loadnote_mono:
{{- end}}
fild dword [{{.INP}}-su_voice.inputs+su_voice.note]
{{.Prepare (.Float 0.0078125)}}
fmul dword [{{.Use (.Float 0.0078125)}}] ; s=n/128.0
{{.Prepare (.Float 0.5)}}
fsub dword [{{.Use (.Float 0.5)}}] ; s-.5
fadd st0, st0 ; 2*s-1
ret
{{end}}
{{- if .HasOp "mul"}}
;-------------------------------------------------------------------------------
; MUL opcode: multiply the two top most signals on the stack
;-------------------------------------------------------------------------------
; Mono: a b -> a*b a
; Stereo: a b c d -> a*c b*d c d
;-------------------------------------------------------------------------------
{{.Func "su_op_mul" "Opcode"}}
jnc su_op_mul_mono
fmul st0, st2
fxch
fadd st0, st3
fxch
ret
su_op_mul_mono:
fmul st1
ret
{{end}}
{{- if .HasOp "mulp"}}
;-------------------------------------------------------------------------------
; MULP opcode: multiply the two top most signals on the stack and pop
;-------------------------------------------------------------------------------
; Mono: a b -> a*b
; Stereo: a b c d -> a*c b*d
;-------------------------------------------------------------------------------
{{.Func "su_op_mulp" "Opcode"}}
{{- if .StereoAndMono "mulp"}}
jnc su_op_mulp_mono
{{- end}}
{{- if .Stereo "mulp"}}
fmulp st2, st0
fmulp st2, st0
ret
{{- end}}
{{- if .StereoAndMono "mulp"}}
su_op_mulp_mono:
{{- end}}
{{- if .Mono "mulp"}}
fmulp st1
ret
{{- end}}
{{end}}
{{- if .HasOp "push"}}
;-------------------------------------------------------------------------------
; PUSH opcode: push the topmost signal on the stack
;-------------------------------------------------------------------------------
; Mono: a -> a a
; Stereo: a b -> a b a b
;-------------------------------------------------------------------------------
{{.Func "su_op_push" "Opcode"}}
{{- if .StereoAndMono "push"}}
jnc su_op_push_mono
{{- end}}
{{- if .Stereo "push"}}
fld st1
fld st1
ret
{{- end}}
{{- if .StereoAndMono "push"}}
su_op_push_mono:
{{- end}}
{{- if .Mono "push"}}
fld st0
ret
{{- end}}
{{end}}
{{- if .HasOp "xch"}}
;-------------------------------------------------------------------------------
; XCH opcode: exchange the signals on the stack
;-------------------------------------------------------------------------------
; Mono: a b -> b a
; stereo: a b c d -> c d a b
;-------------------------------------------------------------------------------
{{.Func "su_op_xch" "Opcode"}}
{{- if .StereoAndMono "xch"}}
jnc su_op_xch_mono
{{- end}}
{{- if .Stereo "xch"}}
fxch st0, st2 ; c b a d
fxch st0, st1 ; b c a d
fxch st0, st3 ; d c a b
{{- end}}
{{- if .StereoAndMono "xch"}}
su_op_xch_mono:
{{- end}}
fxch st0, st1
ret
{{end}}

View File

@ -0,0 +1,431 @@
{{- if .HasOp "hold"}}
;-------------------------------------------------------------------------------
; 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
;-------------------------------------------------------------------------------
{{.Func "su_op_hold" "Opcode"}}
{{- if .Stereo "hold"}}
{{.Call "su_effects_stereohelper"}}
{{- end}}
fld dword [{{.Input "hold" "holdfreq"}}] ; f x
fmul st0, st0 ; f^2 x
fchs ; -f^2 x
fadd dword [{{.WRK}}] ; p-f^2 x
fst dword [{{.WRK}}] ; p <- p-f^2
fldz ; 0 p x
fucomip st1 ; p x
fstp dword [{{.SP}}-4] ; t=p, x
jc short su_op_hold_holding ; if (0 < p) goto holding
fld1 ; 1 x
fadd dword [{{.SP}}-4] ; 1+t x
fstp dword [{{.WRK}}] ; x
fst dword [{{.WRK}}+4] ; save holded value
ret ; x
su_op_hold_holding:
fstp st0 ;
fld dword [{{.WRK}}+4] ; x
ret
{{end}}
{{- if .HasOp "crush"}}
;-------------------------------------------------------------------------------
; CRUSH opcode: quantize the signal to finite number of levels
;-------------------------------------------------------------------------------
; Mono: x -> e*int(x/e) where e=2**(-24*resolution)
; Stereo: l r -> e*int(l/e) e*int(r/e)
;-------------------------------------------------------------------------------
{{.Func "su_op_crush" "Opcode"}}
{{- if .Stereo "crush"}}
{{.Call "su_effects_stereohelper"}}
{{- end}}
xor eax, eax
{{.Call "su_nonlinear_map"}}
fxch st0, st1
fdiv st0, st1
frndint
fmulp st1, st0
ret
{{end}}
{{- if .HasOp "gain"}}
;-------------------------------------------------------------------------------
; GAIN opcode: apply gain on the signal
;-------------------------------------------------------------------------------
; Mono: x -> x*g
; Stereo: l r -> l*g r*g
;-------------------------------------------------------------------------------
{{.Func "su_op_gain" "Opcode"}}
{{- if .Stereo "gain"}}
fld dword [{{.Input "gain" "gain"}}] ; g l (r)
{{- if .Mono "invgain"}}
jnc su_op_gain_mono
{{- end}}
fmul st2, st0 ; g l r/g
su_op_gain_mono:
fmulp st1, st0 ; l/g (r/)
ret
{{- else}}
fmul dword [{{.Input "gain" "gain"}}]
ret
{{- end}}
{{end}}
{{- if .HasOp "invgain"}}
;-------------------------------------------------------------------------------
; INVGAIN opcode: apply inverse gain on the signal
;-------------------------------------------------------------------------------
; Mono: x -> x/g
; Stereo: l r -> l/g r/g
;-------------------------------------------------------------------------------
{{.Func "su_op_invgain" "Opcode"}}
{{- if .Stereo "invgain"}}
fld dword [{{.Input "invgain" "invgain"}}] ; g l (r)
{{- if .Mono "invgain"}}
jnc su_op_invgain_mono
{{- end}}
fdiv st2, st0 ; g l r/g
su_op_invgain_mono:
fdivp st1, st0 ; l/g (r/)
ret
{{- else}}
fdiv dword [{{.Input "invgain" "invgain"}}]
ret
{{- end}}
{{end}}
{{- if .HasOp "dbgain"}}
;-------------------------------------------------------------------------------
; DBGAIN opcode: apply gain on the signal, with gain given in decibels
;-------------------------------------------------------------------------------
; Mono: x -> x*g, where g = 2**((2*d-1)*6.643856189774724) i.e. -40dB to 40dB, d=[0..1]
; Stereo: l r -> l*g r*g
;-------------------------------------------------------------------------------
{{.Func "su_op_dbgain" "Opcode"}}
{{- if .Stereo "dbgain"}}
fld dword [{{.Input "dbgain" "decibels"}}] ; d l r
{{- .Prepare (.Float 0.5)}}
fsub dword [{{.Use (.Float 0.5)}}] ; d-.5
fadd st0, st0 ; 2*d-1
{{- .Prepare (.Float 6.643856189774724)}}
fmul dword [{{.Use (.Float 6.643856189774724)}}] ; (2*d-1)*6.643856189774724
{{.Call "su_power"}}
{{- if .Mono "dbgain"}}
jnc su_op_dbgain_mono
{{- end}}
fmul st2, st0 ; g l r/g
su_op_dbgain_mono:
fmulp st1, st0 ; l/g (r/)
ret
{{- else}}
fld dword [{{.Input "dbgain" "decibels"}}] ; d l
{{- .Prepare (.Float 0.5)}}
fsub dword [{{.Use (.Float 0.5)}}] ; d-.5
fadd st0, st0 ; 2*d-1
{{- .Prepare (.Float 6.643856189774724)}}
fmul dword [{{.Use (.Float 6.643856189774724)}}] ; (2*d-1)*6.643856189774724
{{.Call "su_power"}}
fmulp st1, st0
ret
{{- end}}
{{end}}
{{- if .HasOp "filter"}}
;-------------------------------------------------------------------------------
; FILTER opcode: perform low/high/band-pass/notch etc. filtering on the signal
;-------------------------------------------------------------------------------
; Mono: x -> filtered(x)
; Stereo: l r -> filtered(l) filtered(r)
;-------------------------------------------------------------------------------
{{.Func "su_op_filter" "Opcode"}}
lodsb ; load the flags to al
{{- if .Stereo "filter"}}
{{.Call "su_effects_stereohelper"}}
{{- end}}
fld dword [{{.Input "filter" "resonance"}}] ; r x
fld dword [{{.Input "filter" "frequency"}}]; f r x
fmul st0, st0 ; f2 x (square the input so we never get negative and also have a smoother behaviour in the lower frequencies)
fst dword [{{.WRK}}+12] ; f2 r x
fmul dword [{{.WRK}}+8] ; f2*b r x
fadd dword [{{.WRK}}] ; f2*b+l r x
fst dword [{{.WRK}}] ; l'=f2*b+l r x
fsubp st2, st0 ; r x-l'
fmul dword [{{.WRK}}+8] ; r*b x-l'
fsubp st1, st0 ; x-l'-r*b
{{- .Float 0.5 | .Prepare | indent 4}}
fadd dword [{{.Float 0.5 | .Use}}] ; add and sub small offset to prevent denormalization
fsub dword [{{.Float 0.5 | .Use}}] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch
fst dword [{{.WRK}}+4] ; h'=x-l'-r*b
fmul dword [{{.WRK}}+12] ; f2*h'
fadd dword [{{.WRK}}+8] ; f2*h'+b
fstp dword [{{.WRK}}+8] ; b'=f2*h'+b
fldz ; 0
{{- if .SupportsParamValue "filter" "lowpass" 1}}
test al, byte 0x40
jz short su_op_filter_skiplowpass
fadd dword [{{.WRK}}]
su_op_filter_skiplowpass:
{{- end}}
{{- if .SupportsParamValue "filter" "bandpass" 1}}
test al, byte 0x20
jz short su_op_filter_skipbandpass
fadd dword [{{.WRK}}+8]
su_op_filter_skipbandpass:
{{- end}}
{{- if .SupportsParamValue "filter" "highpass" 1}}
test al, byte 0x10
jz short su_op_filter_skiphighpass
fadd dword [{{.WRK}}+4]
su_op_filter_skiphighpass:
{{- end}}
{{- if .SupportsParamValue "filter" "negbandpass" 1}}
test al, byte 0x08
jz short su_op_filter_skipnegbandpass
fsub dword [{{.WRK}}+8]
su_op_filter_skipnegbandpass:
{{- end}}
{{- if .SupportsParamValue "filter" "neghighpass" 1}}
test al, byte 0x04
jz short su_op_filter_skipneghighpass
fsub dword [{{.WRK}}+4]
su_op_filter_skipneghighpass:
{{- end}}
ret
{{end}}
{{- if .HasOp "clip"}}
;-------------------------------------------------------------------------------
; CLIP opcode: clips the signal into [-1,1] range
;-------------------------------------------------------------------------------
; Mono: x -> min(max(x,-1),1)
; Stereo: l r -> min(max(l,-1),1) min(max(r,-1),1)
;-------------------------------------------------------------------------------
{{.Func "su_op_clip" "Opcode"}}
{{- if .Stereo "clip"}}
{{.Call "su_effects_stereohelper"}}
{{- end}}
{{.TailCall "su_clip"}}
{{end}}
{{- if .HasOp "pan" -}}
;-------------------------------------------------------------------------------
; PAN opcode: pan the signal
;-------------------------------------------------------------------------------
; Mono: s -> s*(1-p) s*p
; Stereo: l r -> l*(1-p) r*p
;
; where p is the panning in [0,1] range
;-------------------------------------------------------------------------------
{{.Func "su_op_pan" "Opcode"}}
{{- if .Stereo "pan"}}
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 [{{.Input "pan" "panning"}}] ; 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
{{- else}}
fld dword [{{.Input "pan" "panning"}}] ; 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
ret
{{- end}}
{{end}}
{{- if .HasOp "delay"}}
;-------------------------------------------------------------------------------
; DELAY opcode: adds delay effect to the signal
;-------------------------------------------------------------------------------
; Mono: perform delay on ST0, using delaycount delaylines starting
; at delayindex from the delaytable
; Stereo: perform delay on ST1, using delaycount delaylines starting
; at delayindex + delaycount from the delaytable (so the right delays
; can be different)
;-------------------------------------------------------------------------------
{{.Func "su_op_delay" "Opcode"}}
lodsw ; al = delay index, ah = delay count
{{- .PushRegs .VAL "DelayVal" .COM "DelayCom" | indent 4}}
movzx ebx, al
{{- if .Library}}
mov {{.SI}}, [{{.Stack "DelayTable"}}] ; when using runtime tables, delaytimes is pulled from the stack so can be a pointer to heap
lea {{.BX}}, [{{.SI}} + {{.BX}}*2]
{{- else}}
{{- .Prepare "su_delay_times" | indent 4}}
lea {{.BX}},[{{.Use "su_delay_times"}} + {{.BX}}*2] ; BX now points to the right position within delay time table
{{- end}}
movzx esi, word [{{.Stack "GlobalTick"}}] ; notice that we load word, so we wrap at 65536
mov {{.CX}}, {{.PTRWORD}} [{{.Stack "DelayWorkSpace"}}] ; {{.WRK}} is now the separate delay workspace, as they require a lot more space
{{- if .StereoAndMono "delay"}}
jnc su_op_delay_mono
{{- end}}
{{- if .Stereo "delay"}}
push {{.AX}} ; save _ah (delay count)
fxch ; r l
call su_op_delay_do ; D(r) l process delay for the right channel
pop {{.AX}} ; restore the count for second run
fxch ; l D(r)
su_op_delay_mono: ; flow into mono delay
{{- end}}
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 {{.PTRWORD}} [{{.Stack "DelayWorkSpace"}}],{{.CX}} ; move delay workspace pointer back to stack.
{{- .PopRegs .VAL .COM | indent 4}}
{{- if .SupportsModulation "delay" "delaytime"}}
xor eax, eax
mov dword [{{.Modulation "delay" "delaytime"}}], eax
{{- end}}
ret
;-------------------------------------------------------------------------------
; su_op_delay_do: executes the actual delay
;-------------------------------------------------------------------------------
; Pseudocode:
; q = dr*x
; for (i = 0;i < count;i++)
; s = b[(t-delaytime[i+offset])&65535]
; q += s
; o[i] = o[i]*da+s*(1-da)
; b[t] = f*o[i] +p^2*x
; Perform dc-filtering q and output q
;-------------------------------------------------------------------------------
{{.Func "su_op_delay_do"}} ; x y
fld st0
fmul dword [{{.Input "delay" "pregain"}}] ; p*x y
fmul dword [{{.Input "delay" "pregain"}}] ; p*p*x y
fxch ; y p*p*x
fmul dword [{{.Input "delay" "dry"}}] ; dr*y p*p*x
su_op_delay_loop:
{{- if or (.SupportsModulation "delay" "delaytime") (.SupportsParamValue "delay" "notetracking" 1)}} ; delaytime modulation or note syncing require computing the delay time in floats
fild word [{{.BX}}] ; k dr*y p*p*x, where k = delay time
{{- if .SupportsParamValue "delay" "notetracking" 1}}
test ah, 1 ; note syncing is the least significant bit of ah, 0 = ON, 1 = OFF
jne su_op_delay_skipnotesync
fild dword [{{.INP}}-su_voice.inputs+su_voice.note]
{{.Int 0x3DAAAAAA | .Prepare | indent 8}}
fmul dword [{{.Int 0x3DAAAAAA | .Use}}]
{{.Call "su_power"}}
fdivp st1, st0 ; use 10787 for delaytime to have neutral transpose
su_op_delay_skipnotesync:
{{- end}}
{{- if .SupportsModulation "delay" "delaytime"}}
fld dword [{{.Modulation "delay" "delaytime"}}]
{{- .Float 32767.0 | .Prepare | indent 8}}
fmul dword [{{.Float 32767.0 | .Use}}] ; scale it up, as the modulations would be too small otherwise
faddp st1, st0
{{- end}}
fistp dword [{{.SP}}-4] ; dr*y p*p*x, dword [{{.SP}}-4] = integer amount of delay (samples)
mov edi, esi ; edi = esi = current time
sub di, word [{{.SP}}-4] ; we perform the math in 16-bit to wrap around
{{- else}}
mov edi, esi
sub di, word [{{.BX}}] ; we perform the math in 16-bit to wrap around
{{- end}}
fld dword [{{.CX}}+su_delayline_wrk.buffer+{{.DI}}*4]; s dr*y p*p*x, where s is the sample from delay buffer
fadd st1, st0 ; s dr*y+s p*p*x (add comb output to current output)
fld1 ; 1 s dr*y+s p*p*x
fsub dword [{{.Input "delay" "damp"}}] ; 1-da s dr*y+s p*p*x
fmulp st1, st0 ; s*(1-da) dr*y+s p*p*x
fld dword [{{.Input "delay" "damp"}}] ; da s*(1-da) dr*y+s p*p*x
fmul dword [{{.CX}}+su_delayline_wrk.filtstate] ; o*da s*(1-da) dr*y+s p*p*x, where o is stored
faddp st1, st0 ; o*da+s*(1-da) dr*y+s p*p*x
{{- .Float 0.5 | .Prepare | indent 4}}
fadd dword [{{.Float 0.5 | .Use}}] ; add and sub small offset to prevent denormalization. WARNING: this is highly important, as the damp filters might denormalize and give 100x CPU penalty
fsub dword [{{.Float 0.5 | .Use}}] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch
fst dword [{{.CX}}+su_delayline_wrk.filtstate] ; o'=o*da+s*(1-da), o' dr*y+s p*p*x
fmul dword [{{.Input "delay" "feedback"}}] ; f*o' dr*y+s p*p*x
fadd st0, st2 ; f*o'+p*p*x dr*y+s p*p*x
fstp dword [{{.CX}}+su_delayline_wrk.buffer+{{.SI}}*4]; save f*o'+p*p*x to delay buffer
add {{.BX}},2 ; move to next index
add {{.CX}}, su_delayline_wrk.size ; go to next delay delay workspace
sub ah, 2
jg su_op_delay_loop ; if ah > 0, goto loop
fstp st1 ; dr*y+s1+s2+s3+...
; DC-filtering
fld dword [{{.CX}}+su_delayline_wrk.dcout] ; o s
{{- .Float 0.99609375 | .Prepare | indent 4}}
fmul dword [{{.Float 0.99609375 | .Use}}] ; c*o s
fsub dword [{{.CX}}+su_delayline_wrk.dcin] ; c*o-i s
fxch ; s c*o-i
fst dword [{{.CX}}+su_delayline_wrk.dcin] ; i'=s, s c*o-i
faddp st1 ; s+c*o-i
{{- .Float 0.5 | .Prepare | indent 4}}
fadd dword [{{.Float 0.5 | .Use}}] ; add and sub small offset to prevent denormalization. WARNING: this is highly important, as low pass filters might denormalize and give 100x CPU penalty
fsub dword [{{.Float 0.5 | .Use}}] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch
fst dword [{{.CX}}+su_delayline_wrk.dcout] ; o'=s+c*o-i
ret
{{end}}
{{- if .HasOp "compressor"}}
;-------------------------------------------------------------------------------
; COMPRES opcode: push compressor gain to stack
;-------------------------------------------------------------------------------
; Mono: push g on stack, where g is a suitable gain for the signal
; you can either MULP to compress the signal or SEND it to a GAIN
; somewhere else for compressor side-chaining.
; Stereo: push g g on stack, where g is calculated using l^2 + r^2
;-------------------------------------------------------------------------------
{{.Func "su_op_compressor" "Opcode"}}
fld st0 ; x x
fmul st0, st0 ; x^2 x
{{- if .StereoAndMono "compressor"}}
jnc su_op_compressor_mono
{{- end}}
{{- if .Stereo "compressor"}}
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
{{- if .StereoAndMono "compressor"}}
call su_op_compressor_mono ; So, for stereo, we square both left & right and add them up
fld st0 ; and return the computed gain two times, ready for MULP STEREO
ret
su_op_compressor_mono:
{{- end}}
{{- end}}
fld dword [{{.WRK}}] ; l x^2 x
fucomi st0, st1
setnb al ; if (st0 >= st1) al = 1; else al = 0;
fsubp st1, st0 ; x^2-l x
{{.Call "su_nonlinear_map"}} ; c x^2-l x, c is either attack or release parameter mapped in a nonlinear way
fmulp st1, st0 ; c*(x^2-l) x
fadd dword [{{.WRK}}] ; l+c*(x^2-l) x // we could've kept level in the stack and save a few bytes, but su_env_map uses 3 stack (c + 2 temp), so the stack was getting quite big.
; TODO: make this denormalization optional, if the user wants to save some space
{{- .Float 0.5 | .Prepare | indent 4}}
fadd dword [{{.Float 0.5 | .Use}}] ; add and sub small offset to prevent denormalization. WARNING: this is highly important, as the damp filters might denormalize and give 100x CPU penalty
fsub dword [{{.Float 0.5 | .Use}}] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch
fst dword [{{.WRK}}] ; l'=l+c*(x^2-l), l' x
fld dword [{{.Input "compressor" "threshold"}}] ; t l' x
fmul st0, st0 ; t*t l' x
fxch ; l' t*t x
fucomi st0, st1 ; if l' < t*t
fcmovb st0, st1 ; l'=t*t
fdivp st1, st0 ; t*t/l' x
fld dword [{{.Input "compressor" "ratio"}}] ; r t*t/l' x
{{.Float 0.5 | .Prepare | indent 4}}
fmul dword [{{.Float 0.5 | .Use}}] ; p=r/2 t*t/l' x
fxch ; t*t/l' p x
fyl2x ; p*log2(t*t/l') x
{{.Call "su_power"}} ; 2^(p*log2(t*t/l')) x
; Equal to:
; (t*t/l')^p x
; if ratio is at minimum => p=0 => 1 x
; if ratio is at maximum => p=0.5 => t/x => t/x*x=t
fdiv dword [{{.Input "compressor" "invgain"}}]; this used to be pregain but that ran into problems with getting back up to 0 dB so postgain should be better at that
{{- if and (.Stereo "compressor") (not (.Mono "compressor"))}}
fld st0 ; and return the computed gain two times, ready for MULP STEREO
{{- end}}
ret
{{- end}}

View File

@ -0,0 +1,44 @@
{{- if .HasOp "speed" -}}
;-------------------------------------------------------------------------------
; SPEED opcode: modulate the speed (bpm) of the song based on ST0
;-------------------------------------------------------------------------------
; Mono: adds or subtracts the ticks, a value of 0.5 is neutral & will7
; result in no speed change.
; There is no STEREO version.
;-------------------------------------------------------------------------------
{{.Func "su_op_speed" "Opcode"}}
{{- .Float 2.206896551724138 | .Prepare | indent 4}}
fmul dword [{{.Float 2.206896551724138 | .Use}}] ; (2*s-1)*64/24, let's call this p from now on
{{.Call "su_power"}}
fld1 ; 1 2^p
fsubp st1, st0 ; 2^p-1, the player is advancing 1 tick by its own
fadd dword [{{.WRK}}] ; t+2^p-1, t is the remainder from previous rounds as ticks have to be rounded to 1
push {{.AX}}
fist dword [{{.SP}}] ; Main stack: k=int(t+2^p-1)
fisub dword [{{.SP}}] ; t+2^p-1-k, the remainder
pop {{.AX}}
add dword [{{.Stack "Sample"}}], eax ; add the whole ticks to row tick count
fstp dword [{{.WRK}}] ; save the remainder for future
ret
{{end}}
{{- if or .RowSync (.HasOp "sync")}}
;-------------------------------------------------------------------------------
; SYNC opcode: save the stack top to sync buffer
;-------------------------------------------------------------------------------
{{.Func "su_op_sync" "Opcode"}}
{{- if not .Library}}
; TODO: syncs are NOPs when compiling as library, should figure out a way to
; make them work when compiling to use the native track also
mov {{.AX}}, [{{.Stack "GlobalTick"}}]
test al, al
jne su_op_sync_skip
xchg {{.AX}}, [{{.Stack "SyncBufPtr"}}]
fst dword [{{.AX}}]
add {{.AX}}, 4
xchg {{.AX}}, [{{.Stack "SyncBufPtr"}}]
su_op_sync_skip:
{{- end}}
ret
{{end}}

View File

@ -0,0 +1,52 @@
{{- if .SupportsParamValue "oscillator" "type" .Sample}}
{{- if eq .OS "windows"}}
{{.ExportFunc "su_load_gmdls"}}
{{- if .Amd64}}
extern OpenFile ; requires windows
extern ReadFile ; requires windows
; Win64 ABI: RCX, RDX, R8, and R9
sub rsp, 40 ; Win64 ABI requires "shadow space" + space for one parameter.
mov rdx, qword su_sample_table
mov rcx, qword su_gmdls_path1
xor r8,r8 ; OF_READ
push rdx ; &ofstruct, blatantly reuse the sample table
push rcx
call OpenFile ; eax = OpenFile(path,&ofstruct,OF_READ)
pop rcx
pop rdx
movsxd rcx, eax
mov qword [rsp+32], 0
mov r9, rdx
mov r8d, 3440660 ; number of bytes to read
call ReadFile ; Readfile(handle,&su_sample_table,SAMPLE_TABLE_SIZE,&bytes_read,NULL)
add rsp, 40 ; shadow space, as required by Win64 ABI
ret
{{else}}
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
{{end}}
{{.Data "su_gmdls_path1"}}
db 'drivers/gm.dls',0
{{end}}
{{.SectBss "susamtable"}}
su_sample_table:
resb 3440660 ; size of gmdls.
{{end}}

View File

@ -0,0 +1,134 @@
{{template "structs.asm" .}}
struc su_synth
.synth_wrk resb su_synthworkspace.size
.delay_wrks resb su_delayline_wrk.size * 64
.delaytimes resw 768
.sampleoffs resb su_sample_offset.size * 256
.randseed resd 1
.globaltime resd 1
.opcodes resb 32 * 64
.operands resb 32 * 64 * 8
.polyphony resd 1
.numvoices resd 1
endstruc
{{.ExportFunc "su_render" "SynthStateParam" "BufferPtrParam" "SamplesParam" "TimeParam"}}
{{- if .Amd64}}
{{- if eq .OS "windows"}}
{{- .PushRegs "rdi" "NonVolatileRDI" "rsi" "NonVolatileRSI" "rbx" "NonVolatileRBX" "rbp" "NonVolatileRBP" | indent 4}}
mov rsi, r8 ; rsi = &samples
mov rbx, r9 ; rbx = &time
{{- else}} ; SystemV amd64 ABI, linux mac or hopefully something similar
{{- .PushRegs "rbx" "NonVolatileRBX" "rbp" "NonVolatileRBP" | indent 4}}
mov rbx, rcx ; rbx points to time
xchg rsi, rdx ; rdx points to buffer, rsi points to samples
mov rcx, rdi ; rcx = &Synthstate
{{- end}}
{{- else}}
{{- .PushRegs | indent 4 }} ; push registers
mov ecx, [{{.Stack "SynthStateParam"}}] ; ecx = &synthState
mov edx, [{{.Stack "BufferPtrParam"}}] ; edx = &buffer
mov esi, [{{.Stack "SamplesParam"}}] ; esi = &samples
mov ebx, [{{.Stack "TimeParam"}}] ; ebx = &time
{{- end}}
{{.SaveFPUState | indent 4}} ; save the FPU state to stack & reset the FPU
{{.Push .SI "Samples"}}
{{.Push .BX "Time"}}
xor eax, eax ; samplenumber starts at 0
{{.Push .AX "BufSample"}}
mov esi, [{{.SI}}] ; zero extend dereferenced pointer
{{.Push .SI "BufSize"}}
{{.Push .DX "BufPtr"}}
{{.Push .CX "SynthState"}}
lea {{.AX}}, [{{.CX}} + su_synth.sampleoffs]
{{.Push .AX "SampleTable"}}
lea {{.AX}}, [{{.CX}} + su_synth.delaytimes]
{{.Push .AX "DelayTable"}}
mov eax, [{{.CX}} + su_synth.randseed]
{{.Push .AX "RandSeed"}}
mov eax, [{{.CX}} + su_synth.globaltime]
{{.Push .AX "GlobalTick"}}
mov ebx, dword [{{.BX}}] ; zero extend dereferenced pointer
{{.Push .BX "RowLength"}} ; the nominal rowlength should be time_in
xor eax, eax ; rowtick starts at 0
su_render_samples_loop:
push {{.DI}}
fnstsw [{{.SP}}] ; store the FPU status flag to stack top
pop {{.DI}} ; {{.DI}} = FPU status flag
and {{.DI}}, 0011100001000101b ; mask TOP pointer, stack error, zero divide and in{{.VAL}}id operation
test {{.DI}},{{.DI}} ; all the aforementioned bits should be 0!
jne su_render_samples_time_finish ; otherwise, we exit due to error
cmp eax, [{{.Stack "RowLength"}}] ; if rowtick >= maxtime
jge su_render_samples_time_finish ; goto finish
mov ecx, [{{.Stack "BufSize"}}] ; ecx = buffer length in samples
cmp [{{.Stack "BufSample"}}], ecx ; if samples >= maxsamples
jge su_render_samples_time_finish ; goto finish
inc eax ; time++
inc dword [{{.Stack "BufSample"}}] ; samples++
mov {{.CX}}, [{{.Stack "SynthState"}}]
{{.Push .AX "Sample"}}
mov eax, [{{.CX}} + su_synth.polyphony]
{{.Push .AX "PolyphonyBitmask"}}
mov eax, [{{.CX}} + su_synth.numvoices]
{{.Push .AX "VoicesRemain"}}
lea {{.DX}}, [{{.CX}}+ su_synth.synth_wrk]
lea {{.COM}}, [{{.CX}}+ su_synth.opcodes]
lea {{.VAL}}, [{{.CX}}+ su_synth.operands]
lea {{.WRK}}, [{{.DX}} + su_synthworkspace.voices]
lea {{.CX}}, [{{.CX}}+ su_synth.delay_wrks - su_delayline_wrk.filtstate]
{{.Call "su_run_vm"}}
{{.Pop .AX}}
{{.Pop .AX}}
mov {{.DI}}, [{{.Stack "BufPtr"}}] ; edi containts buffer ptr
mov {{.CX}}, [{{.Stack "SynthState"}}]
lea {{.SI}}, [{{.CX}} + su_synth.synth_wrk + su_synthworkspace.left]
movsd ; copy left channel to output buffer
movsd ; copy right channel to output buffer
mov [{{.Stack "BufPtr"}}], {{.DI}} ; save back the updated ptr
lea {{.DI}}, [{{.SI}}-8]
xor eax, eax
stosd ; clear left channel so the VM is ready to write them again
stosd ; clear right channel so the VM is ready to write them again
{{.Pop .AX}}
inc dword [{{.Stack "GlobalTick"}}] ; increment global time, used by delays
jmp su_render_samples_loop
su_render_samples_time_finish:
{{.Pop .CX}}
{{.Pop .BX}}
{{.Pop .DX}}
{{.Pop .CX}}
{{.Pop .CX}}
{{.Pop .CX}}
mov [{{.CX}} + su_synth.randseed], edx
mov [{{.CX}} + su_synth.globaltime], ebx
{{.Pop .BX}}
{{.Pop .BX}}
{{.Pop .DX}}
{{.Pop .BX}}
{{.Pop .SI}}
mov dword [{{.SI}}], edx ; *samples = samples rendered
mov dword [{{.BX}}], eax ; *time = time ticks rendered
mov {{.AX}},{{.DI}} ; {{.DI}} was the masked FPU status flag, {{.AX}} is return {{.VAL}}ue
{{.LoadFPUState | indent 4}} ; load the FPU state from stack
{{- if .Amd64}}
{{- if eq .OS "windows"}}
{{- .PopRegs "rdi" "rsi" "rbx" "rbp" | indent 4}}
{{- else}} ; SystemV amd64 ABI, linux mac or hopefully something similar
{{- .PopRegs "rbx" "rbp" | indent 4}}
{{- end}}
ret
{{- else}}
mov [{{.Stack "eax"}}],eax ; we want to return eax, but popad pops everything, so put eax to stack for popad to pop
{{- .PopRegs | indent 4 }} ; popad
ret 16
{{- end}}
{{template "patch.asm" .}}
;-------------------------------------------------------------------------------
; Constants
;-------------------------------------------------------------------------------
{{.SectData "constants"}}
{{.Constants}}

100
sointu_templates/library.h Normal file
View File

@ -0,0 +1,100 @@
#ifndef _SOINTU_H
#define _SOINTU_H
#pragma pack(push,1) // this should be fine for both Go and assembly
typedef struct Unit {
float State[8];
float Ports[8];
} Unit;
typedef struct Voice {
int Note;
int Sustain;
float Inputs[8];
float Reserved[6];
struct Unit Units[63];
} Voice;
typedef struct DelayWorkspace {
float Buffer[65536];
float Dcin;
float Dcout;
float Filtstate;
} DelayWorkspace;
typedef struct SynthWorkspace {
unsigned char Curvoices[32];
float Left;
float Right;
float Aux[6];
struct Voice Voices[32];
} SynthWorkspace;
typedef struct SampleOffset {
unsigned int Start;
unsigned short LoopStart;
unsigned short LoopLength;
} SampleOffset;
typedef struct Synth {
struct SynthWorkspace SynthWrk;
struct DelayWorkspace DelayWrks[64]; // let's keep this as 64 for now, so the delays take 16 meg. If that's too little or too much, we can change this in future.
unsigned short DelayTimes[768];
struct SampleOffset SampleOffsets[256];
unsigned int RandSeed;
unsigned int GlobalTick;
unsigned char Opcodes[32 * 64];
unsigned char Operands[32 * 64 * 8];
unsigned int Polyphony;
unsigned int NumVoices;
} Synth;
#pragma pack(pop)
#if UINTPTR_MAX == 0xffffffff // are we 32-bit?
#if defined(__clang__) || defined(__GNUC__)
#define CALLCONV __attribute__ ((stdcall))
#elif defined(_WIN32)
#define CALLCONV __stdcall // on 32-bit platforms, we just use stdcall, as all know it
#endif
#else // 64-bit
#define CALLCONV // the asm will use honor honor correct x64 ABI on all 64-bit platforms
#endif
void CALLCONV su_load_gmdls(void);
// int su_render(Synth* synth, float* buffer, int* samples, int* time):
// Renders samples until 'samples' number of samples are reached or 'time' number of
// modulated time ticks are reached, whichever happens first. 'samples' and 'time' are
// are passed by reference as the function modifies to tell how many samples were
// actually rendered and how many time ticks were actually advanced.
//
// Parameters:
// synth pointer to the synthesizer used. RandSeed should be > 0 e.g. 1
// buffer audio sample buffer, L R L R ...
// samples pointer to the maximum number of samples to be rendered.
// buffer should have a length of 2 * maxsamples as the audio
// is stereo.
// time maximum modulated time rendered.
//
// The value referred by samples is changed to contain the actual number of samples rendered
// Similarly, the value referred by time is changed to contain the number of time ticks advanced.
// If samples_out == samples_in, then is must be that time_in <= time_out.
// If samples_out < samples_in, then time_out >= time_in. Note that it could happen that
// time_out > time_in, as it is modulated and the time could advance by 2 or more, so the loop
// exit condition would fire when the current time is already past time_in
//
// Returns an error code, which is actually just masked version of the FPU Status Word
// On a succesful run, the return value should be 0
// Error code bits:
// bit 0 FPU invalid operation (stack over/underflow OR invalid arithmetic e.g. NaNs)
// bit 2 Divide by zero occurred
// bit 6 Stack overflow or underflow occurred
// bits 11-13 The top pointer of the fpu stack. Any other value than 0 indicates that some values were left on the stack.
int CALLCONV su_render(Synth* synth, float* buffer, int* samples, int* time);
#define SU_ADVANCE_ID 0
{{- range $index, $element := .Instructions}}
#define {{printf "su_%v_id" $element | upper | printf "%-20v"}}{{add1 $index | mul 2}}
{{- end}}
#endif // _SOINTU_H

View File

@ -0,0 +1,44 @@
{{- if not .Output16Bit }}
{{- if not .Clip }}
mov {{.DI}}, [{{.Stack "OutputBufPtr"}}] ; edi containts ptr
mov {{.SI}}, {{.PTRWORD}} su_synth_obj + su_synthworkspace.left
movsd ; copy left channel to output buffer
movsd ; copy right channel to output buffer
mov [{{.Stack "OutputBufPtr"}}], {{.DI}} ; save back the updated ptr
lea {{.DI}}, [{{.SI}}-8]
xor eax, eax
stosd ; clear left channel so the VM is ready to write them again
stosd ; clear right channel so the VM is ready to write them again
{{ else }}
mov {{.SI}}, qword [{{.Stack "OutputBufPtr"}}] ; esi points to the output buffer
xor ecx,ecx
xor eax,eax
%%loop: ; loop over two channels, left & right
do fld dword [,su_synth_obj+su_synthworkspace.left,_CX*4,]
{{.Call "su_clip"}}
fstp dword [_SI]
do mov dword [,su_synth_obj+su_synthworkspace.left,_CX*4,{],eax} ; clear the sample so the VM is ready to write it
add _SI,4
cmp ecx,2
jl %%loop
mov dword [_SP+su_stack.bufferptr - su_stack.output_sound], _SI ; save esi back to stack
{{ end }}
{{- else}}
mov {{.SI}}, [{{.Stack "OutputBufPtr"}}] ; esi points to the output buffer
mov {{.DI}}, {{.PTRWORD}} su_synth_obj+su_synthworkspace.left
mov ecx, 2
output_sound16bit_loop: ; loop over two channels, left & right
fld dword [{{.DI}}]
{{.Call "su_clip"}}
{{- .Float 32767.0 | .Prepare | indent 16}}
fmul dword [{{.Float 32767.0 | .Use}}]
push {{.AX}}
fistp dword [{{.SP}}]
pop {{.AX}}
mov word [{{.SI}}],ax ; // store integer converted right sample
xor eax,eax
stosd
add {{.SI}},2
loop output_sound16bit_loop
mov [{{.Stack "OutputBufPtr"}}], {{.SI}} ; save esi back to stack
{{- end }}

216
sointu_templates/patch.asm Normal file
View File

@ -0,0 +1,216 @@
;-------------------------------------------------------------------------------
; su_run_vm function: runs the entire virtual machine once, creating 1 sample
;-------------------------------------------------------------------------------
; Input: su_synth_obj.left : Set to 0 before calling
; su_synth_obj.right : Set to 0 before calling
; _CX : Pointer to delay workspace (if needed)
; _DX : Pointer to synth object
; COM : Pointer to opcode stream
; VAL : Pointer to operand stream
; WRK : Pointer to the last workspace processed
; Output: su_synth_obj.left : left sample
; su_synth_obj.right : right sample
; Dirty: everything
;-------------------------------------------------------------------------------
{{.Func "su_run_vm"}}
{{- .PushRegs .CX "DelayWorkSpace" .DX "Synth" .COM "OpcodeStream" .WRK "Voice" .VAL "OperandStream" | indent 4}}
{{- if .RowSync}}
fild dword [{{.Stack "Sample"}}]
{{.Int .Song.SamplesPerRow | .Prepare | indent 8}}
fidiv dword [{{.Int .Song.SamplesPerRow | .Use}}]
fiadd dword [{{.Stack "Row"}}]
{{.Call "su_op_sync"}}
fstp st0
{{- end}}
su_run_vm_loop: ; loop until all voices done
movzx edi, byte [{{.COM}}] ; edi = command byte
inc {{.COM}} ; move to next instruction
add {{.WRK}}, su_unit.size ; move WRK to next unit
shr edi, 1 ; shift out the LSB bit = stereo bit
je su_run_vm_advance ; the opcode is zero, jump to advance
mov {{.INP}}, [{{.Stack "Voice"}}] ; reset INP to point to the inputs part of voice
pushf ; push flags to save carry = stereo bit
add {{.INP}}, su_voice.inputs
xor ecx, ecx ; counter = 0
xor eax, eax ; clear out high bits of eax, as lodsb only sets al
su_transform_operands_loop:
{{- .Prepare "su_vm_transformcounts-1" | indent 4}}
cmp cl, byte [{{.Use "su_vm_transformcounts-1"}}+{{.DI}}] ; compare the counter to the value in the param count table
je su_transform_operands_out
lodsb ; load the operand from VAL stream
push {{.AX}} ; push it to memory so FPU can read it
fild dword [{{.SP}}] ; load the operand value to FPU stack
{{- .Prepare (.Float 0.0078125) | indent 4}}
fmul dword [{{.Use (.Float 0.0078125)}}] ; divide it by 128 (0 => 0, 128 => 1.0)
fadd dword [{{.WRK}}+su_unit.ports+{{.CX}}*4] ; add the modulations in the current workspace
fstp dword [{{.INP}}+{{.CX}}*4] ; store the modulated value in the inputs section of voice
xor eax, eax
mov dword [{{.WRK}}+su_unit.ports+{{.CX}}*4], eax ; clear out the modulation ports
pop {{.AX}}
inc ecx
jmp su_transform_operands_loop
su_transform_operands_out:
popf ; pop flags for the carry bit = stereo bit
{{- .SaveStack "Opcode"}}
{{- $x := printf "su_vm_jumptable-%v" .PTRSIZE}}
{{- .Prepare $x | indent 4}}
call [{{.Use $x}}+{{.DI}}*{{.PTRSIZE}}] ; call the function corresponding to the instruction
jmp su_run_vm_loop
su_run_vm_advance:
{{- if .SupportsPolyphony}}
mov {{.WRK}}, [{{.Stack "Voice"}}] ; WRK points to start of current voice
add {{.WRK}}, su_voice.size ; move to next voice
mov [{{.Stack "Voice"}}], {{.WRK}} ; update the pointer in the stack to point to the new voice
mov ecx, [{{.Stack "VoicesRemain"}}] ; ecx = how many voices remain to process
dec ecx ; decrement number of voices to process
bt dword [{{.Stack "PolyphonyBitmask"}}], ecx ; if voice bit of su_polyphonism not set
jnc su_op_advance_next_instrument ; goto next_instrument
mov {{.VAL}}, [{{.Stack "OperandStream"}}] ; if it was set, then repeat the opcodes for the current voice
mov {{.COM}}, [{{.Stack "OpcodeStream"}}]
su_op_advance_next_instrument:
mov [{{.Stack "OperandStream"}}], {{.VAL}} ; save current VAL as a checkpoint
mov [{{.Stack "OpcodeStream"}}], {{.COM}} ; save current COM as a checkpoint
su_op_advance_finish:
mov [{{.Stack "VoicesRemain"}}], ecx
jne su_run_vm_loop ; ZF was set by dec ecx
{{- else}}
mov {{.WRK}}, {{.PTRWORD}} [{{.Stack "Voice"}}] ; load pointer to voice to register
add {{.WRK}}, su_voice.size ; shift it to point to following voice
mov {{.PTRWORD}} [{{.Stack "Voice"}}], {{.WRK}} ; save back to stack
dec dword [{{.Stack "VoicesRemain"}}] ; voices--
jne su_run_vm_loop ; if there's more voices to process, goto vm_loop
{{- end}}
{{- .PopRegs .CX .DX .COM .WRK .VAL | indent 4}}
ret
{{- template "arithmetic.asm" .}}
{{- template "effects.asm" .}}
{{- template "flowcontrol.asm" .}}
{{- template "sinks.asm" .}}
{{- template "sources.asm" .}}
{{- template "gmdls.asm" .}}
{{- if .HasCall "su_nonlinear_map"}}
;-------------------------------------------------------------------------------
; su_nonlinear_map function: returns 2^(-24*x) of parameter number _AX
;-------------------------------------------------------------------------------
; Input: _AX : parameter number (e.g. for envelope: 0 = attac, 1 = decay...)
; INP : pointer to transformed operands
; Output: st0 : 2^(-24*x), where x is the parameter in the range 0-1
;-------------------------------------------------------------------------------
{{.Func "su_nonlinear_map"}}
fld dword [{{.INP}}+{{.AX}}*4] ; x, where x is the parameter in the range 0-1
{{.Prepare (.Int 24)}}
fimul dword [{{.Use (.Int 24)}}] ; 24*x
fchs ; -24*x
{{end}}
{{- if or (.HasCall "su_power") (.HasCall "su_nonlinear_map")}}
;-------------------------------------------------------------------------------
; su_power function: computes 2^x
;-------------------------------------------------------------------------------
; Input: st0 : x
; Output: st0 : 2^x
;-------------------------------------------------------------------------------
{{- if not (.HasCall "su_nonlinear_map")}}{{.SectText "su_power"}}{{end}}
{{.Export "su_pow" 0}}
su_power:
fld1 ; 1 x
fld st1 ; x 1 x
fprem ; mod(x,1) 1 x
f2xm1 ; 2^mod(x,1)-1 1 x
faddp st1,st0 ; 2^mod(x,1) x
fscale ; 2^mod(x,1)*2^trunc(x) x
; Equal to:
; 2^x x
fstp st1 ; 2^x
ret
{{end}}
{{- if .HasOp "distort"}}
;-------------------------------------------------------------------------------
; DISTORT opcode: apply distortion on the signal
;-------------------------------------------------------------------------------
; Mono: x -> x*a/(1-a+(2*a-1)*abs(x)) where x is clamped first
; Stereo: l r -> l*a/(1-a+(2*a-1)*abs(l)) r*a/(1-a+(2*a-1)*abs(r))
; This is placed here to be able to flow into waveshaper & also include
; wave shaper if needed by some other function; need to investigate the
; best way to do this
;-------------------------------------------------------------------------------
{{.Func "su_op_distort" "Opcode"}}
{{- if .Stereo "distort" -}}
{{.Call "su_effects_stereohelper"}}
{{- end}}
fld dword [{{.Input "distort" "drive"}}]
{{end}}
{{- if or (.HasCall "su_waveshaper") (.HasOp "distort")}}
{{- if .HasOp "distort"}}
su_waveshaper:
{{- else}}
{{.Func "su_waveshaper"}}
{{- end}}
fld st0 ; a a x
{{.Prepare (.Float 0.5)}}
fsub dword [{{.Use (.Float 0.5)}}] ; a-.5 a x
fadd st0 ; 2*a-1 a x
fld st2 ; x 2*a-1 a x
fabs ; abs(x) 2*a-1 a x
fmulp st1 ; (2*a-1)*abs(x) a x
fld1 ; 1 (2*a-1)*abs(x) a x
faddp st1 ; 1+(2*a-1)*abs(x) a x
fsub st1 ; 1-a+(2*a-1)*abs(x) a x
fdivp st1, st0 ; a/(1-a+(2*a-1)*abs(x)) x
fmulp st1 ; x*a/(1-a+(2*a-1)*abs(x))
ret
{{end}}
{{- if .HasCall "su_effects_stereohelper" }}
;-------------------------------------------------------------------------------
; su_effects_stereohelper: moves the workspace to next, does the filtering for
; right channel (pulling the calling address from stack), rewinds the
; workspace and returns
;-------------------------------------------------------------------------------
{{.Func "su_effects_stereohelper"}}
jnc su_effects_stereohelper_mono ; carry is still the stereo bit
add {{.WRK}}, 16
fxch ; r l
call [{{.SP}}] ; call whoever called me...
fxch ; l r
sub {{.WRK}}, 16 ; move WRK back to where it was
su_effects_stereohelper_mono:
ret ; return to process l/mono sound
{{end}}
{{- if .HasCall "su_clip"}}
{{.Func "su_clip"}}
fld1 ; 1 x a
fucomi st1 ; if (1 <= x)
jbe short su_clip_do ; goto Clip_Do
fchs ; -1 x a
fucomi st1 ; if (-1 < x)
fcmovb st0, st1 ; x x a
su_clip_do:
fstp st1 ; x' a, where x' = clamp(x)
ret
{{end}}
;-------------------------------------------------------------------------------
; The opcode table jump table. This is constructed to only include the opcodes
; that are used so that the jump table is as small as possible.
;-------------------------------------------------------------------------------
{{.Data "su_vm_jumptable"}}
{{- range .Instructions}}
{{$.DPTR}} su_op_{{.}}
{{- end}}
;-------------------------------------------------------------------------------
; The number of transformed parameters each opcode takes
;-------------------------------------------------------------------------------
{{.Data "su_vm_transformcounts"}}
{{- range .Instructions}}
db {{$.TransformCount .}}
{{- end}}

256
sointu_templates/player.asm Normal file
View File

@ -0,0 +1,256 @@
{{template "structs.asm" .}}
;-------------------------------------------------------------------------------
; Uninitialized data: The synth object
;-------------------------------------------------------------------------------
{{.SectBss "synth_object"}}
su_synth_obj:
resb su_synthworkspace.size
resb {{.Song.Patch.NumDelayLines}}*su_delayline_wrk.size
{{- if or .RowSync (.HasOp "sync")}}
{{- if or (and (eq .OS "windows") (not .Amd64)) (eq .OS "darwin")}}
extern _syncBuf
{{- else}}
extern syncBuf
{{- end}}
{{- end}}
;-------------------------------------------------------------------------------
; su_render_song function: the entry point for the synth
;-------------------------------------------------------------------------------
; Has the signature su_render_song(void *ptr), where ptr is a pointer to
; the output buffer. Renders the compile time hard-coded song to the buffer.
; Stack: output_ptr
;-------------------------------------------------------------------------------
{{.ExportFunc "su_render_song" "OutputBufPtr"}}
{{- if .Amd64}}
{{- if eq .OS "windows"}}
{{- .PushRegs "rcx" "OutputBufPtr" "rdi" "NonVolatileRsi" "rsi" "NonVolatile" "rbx" "NonVolatileRbx" "rbp" "NonVolatileRbp" | indent 4}} ; rcx = ptr to buf. rdi,rsi,rbx,rbp nonvolatile
{{- else}} ; SystemV amd64 ABI, linux mac or hopefully something similar
{{- .PushRegs "rdi" "OutputBufPtr" "rbx" "NonVolatileRbx" "rbp" "NonVolatileRbp" | indent 4}}
{{- end}}
{{- else}}
{{- .PushRegs | indent 4}}
{{- end}}
{{- $prologsize := len .Stacklocs}}
{{- if or .RowSync (.HasOp "sync")}}
{{- if or (and (eq .OS "windows") (not .Amd64)) (eq .OS "darwin")}}
{{- .Prepare "_syncBuf"}}
{{.Push (.Use "_syncBuf") "SyncBufPtr"}}
{{- else}}
{{- .Prepare "syncBuf"}}
{{.Push (.Use "syncBuf") "SyncBufPtr"}}
{{- end}}
{{- end}}
xor eax, eax
{{- if ne .VoiceTrackBitmask 0}}
{{.Push (.VoiceTrackBitmask | printf "%v") "VoiceTrackBitmask"}}
{{- end}}
{{.Push "1" "RandSeed"}}
{{.Push .AX "GlobalTick"}}
su_render_rowloop: ; loop through every row in the song
{{.Push .AX "Row"}}
{{.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 .AX "Sample"}}
{{- if .SupportsPolyphony}}
{{.Push (.PolyphonyBitmask | printf "%v") "PolyphonyBitmask"}} ; does the next voice reuse the current opcodes?
{{- end}}
{{.Push (.Song.Patch.NumVoices | printf "%v") "VoicesRemain"}}
mov {{.DX}}, {{.PTRWORD}} su_synth_obj ; {{.DX}} points to the synth object
mov {{.COM}}, {{.PTRWORD}} su_patch_opcodes ; COM points to vm code
mov {{.VAL}}, {{.PTRWORD}} su_patch_operands ; VAL points to unit params
{{- if .HasOp "delay"}}
mov {{.CX}}, {{.PTRWORD}} su_synth_obj + su_synthworkspace.size - su_delayline_wrk.filtstate
{{- end}}
lea {{.WRK}}, [{{.DX}} + su_synthworkspace.voices] ; WRK points to the first voice
{{.Call "su_run_vm"}} ; run through the VM code
{{.Pop .AX}}
{{- if .SupportsPolyphony}}
{{.Pop .AX}}
{{- end}}
{{- template "output_sound.asm" .}} ; *ptr++ = left, *ptr++ = right
{{.Pop .AX}}
inc dword [{{.Stack "GlobalTick"}}] ; increment global time, used by delays
inc eax
cmp eax, {{.Song.SamplesPerRow}}
jl su_render_sampleloop
{{.Pop .AX}} ; Stack: pushad ptr
inc eax
cmp eax, {{mul .PatternLength .SequenceLength}}
jl su_render_rowloop
; rewind the stack the entropy of multiple pop {{.AX}} is probably lower than add
{{- range slice .Stacklocs $prologsize}}
{{$.Pop $.AX}}
{{- end}}
{{- if .Amd64}}
{{- if eq .OS "windows"}}
; Windows64 ABI, rdi rsi rbx rbp non-volatile
{{- .PopRegs "rcx" "rdi" "rsi" "rbx" "rbp" | indent 4}}
{{- else}}
; SystemV64 ABI (linux mac or hopefully something similar), rbx rbp non-volatile
{{- .PopRegs "rdi" "rbx" "rbp" | indent 4}}
{{- end}}
ret
{{- else}}
{{- .PopRegs | indent 4}}
ret 4
{{- end}}
;-------------------------------------------------------------------------------
; su_update_voices function: polyphonic & chord implementation
;-------------------------------------------------------------------------------
; Input: eax : current row within song
; Dirty: pretty much everything
;-------------------------------------------------------------------------------
{{.Func "su_update_voices"}}
{{- if ne .VoiceTrackBitmask 0}}
; The more complicated implementation: one track can trigger multiple voices
xor edx, edx
mov ebx, {{.PatternLength}} ; 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
{{.Prepare "su_tracks"}}
lea {{.SI}}, [{{.Use "su_tracks"}}+{{.AX}}] ; 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 {{.BP}}, {{.PTRWORD}} su_synth_obj ; ebp points to the current_voiceno array
su_update_voices_trackloop:
movzx eax, byte [{{.SI}}] ; eax = current pattern
imul eax, {{.PatternLength}} ; eax = offset to current pattern data
{{- .Prepare "su_patterns" .AX | indent 4}}
movzx eax,byte [{{.Use "su_patterns" .AX}} + {{.DX}}] ; eax = note
push {{.DX}} ; 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 [{{.Stack "VoiceTrackBitmask"}} + {{.PTRSIZE}}],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 {{.CX}} ; Stack: next_instr ptrnrow
cmp al, {{.Hold}} ; anything but hold causes action
je short su_update_voices_nexttrack
mov cl, byte [{{.BP}}]
mov edi, ecx
add edi, ebx
shl edi, 12 ; each unit = 64 bytes and there are 1<<MAX_UNITS_SHIFT units + small header
{{- .Prepare "su_synth_obj" | indent 4}}
and dword [{{.Use "su_synth_obj"}} + su_synthworkspace.voices + su_voice.sustain + {{.DI}}], 0 ; set the voice currently active to release; notice that it could increment any number of times
cmp al, {{.Hold}} ; 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 [{{.BP}}],cl
add ecx, ebx
shl ecx, 12 ; each unit = 64 bytes and there are 1<<6 units + small header
lea {{.DI}},[{{.Use "su_synth_obj"}} + su_synthworkspace.voices + {{.CX}}]
stosd ; save note
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
su_update_voices_nexttrack:
pop {{.BX}} ; ebx=first voice of next instrument, Stack: ptrnrow
pop {{.DX}} ; edx=patrnrow
add {{.SI}}, {{.SequenceLength}}
inc {{.BP}}
{{- $addrname := len .Song.Score.Tracks | printf "su_synth_obj + %v"}}
{{- .Prepare $addrname | indent 8}}
cmp {{.BP}},{{.Use $addrname}}
jl su_update_voices_trackloop
ret
{{- else}}
; The simple implementation: each track triggers always the same voice
xor edx, edx
xor ebx, ebx
mov bl, {{.PatternLength}} ; rows per pattern
div ebx ; eax = current pattern, edx = current row in pattern
{{- .Prepare "su_tracks" | indent 4}}
lea {{.SI}}, [{{.Use "su_tracks"}}+{{.AX}}]; esi points to the pattern data for current track
mov {{.DI}}, {{.PTRWORD}} su_synth_obj+su_synthworkspace.voices
mov bl, {{len .Song.Score.Tracks}} ; MAX_TRACKS is always <= 32 so this is ok
su_update_voices_trackloop:
movzx eax, byte [{{.SI}}] ; eax = current pattern
imul eax, {{.PatternLength}} ; multiply by rows per pattern, eax = offset to current pattern data
{{- .Prepare "su_patterns" .AX | indent 8}}
movzx eax, byte [{{.Use "su_patterns" .AX}} + {{.DX}}] ; ecx = note
cmp al, {{.Hold}} ; anything but hold causes action
je short su_update_voices_nexttrack
mov dword [{{.DI}}+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:
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?
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 {{.DI}}, su_voice.size
su_update_voices_skipadd:
add {{.SI}}, {{.SequenceLength}}
dec ebx
jnz short su_update_voices_trackloop
ret
{{- end}}
{{template "patch.asm" .}}
;-------------------------------------------------------------------------------
; Patterns
;-------------------------------------------------------------------------------
{{.Data "su_patterns"}}
{{- range .Patterns}}
db {{. | toStrings | join ","}}
{{- end}}
;-------------------------------------------------------------------------------
; Tracks
;-------------------------------------------------------------------------------
{{.Data "su_tracks"}}
{{- range .Sequences}}
db {{. | toStrings | join ","}}
{{- end}}
{{- if gt (.SampleOffsets | len) 0}}
;-------------------------------------------------------------------------------
; Sample offsets
;-------------------------------------------------------------------------------
{{.Data "su_sample_offsets"}}
{{- range .SampleOffsets}}
dd {{.Start}}
dw {{.LoopStart}}
dw {{.LoopLength}}
{{- end}}
{{end}}
{{- if gt (.DelayTimes | len ) 0}}
;-------------------------------------------------------------------------------
; Delay times
;-------------------------------------------------------------------------------
{{.Data "su_delay_times"}}
dw {{.DelayTimes | toStrings | join ","}}
{{end}}
;-------------------------------------------------------------------------------
; The code for this patch, basically indices to vm jump table
;-------------------------------------------------------------------------------
{{.Data "su_patch_opcodes"}}
db {{.Opcodes | toStrings | join ","}}
;-------------------------------------------------------------------------------
; The parameters / inputs to each opcode
;-------------------------------------------------------------------------------
{{.Data "su_patch_operands"}}
db {{.Operands | toStrings | join ","}}
;-------------------------------------------------------------------------------
; Constants
;-------------------------------------------------------------------------------
{{.SectData "constants"}}
{{.Constants}}

69
sointu_templates/player.h Normal file
View File

@ -0,0 +1,69 @@
// auto-generated by Sointu, editing not recommended
#ifndef SU_RENDER_H
#define SU_RENDER_H
#define SU_CHANNEL_COUNT 2
#define SU_LENGTH_IN_SAMPLES {{.MaxSamples}}
#define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
#define SU_SAMPLE_RATE 44100
#define SU_BPM {{.Song.BPM}}
#define SU_ROWS_PER_BEAT {{.Song.RowsPerBeat}}
#define SU_ROWS_PER_PATTERN {{.Song.Score.RowsPerPattern}}
#define SU_LENGTH_IN_PATTERNS {{.Song.Score.Length}}
#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))
{{- if or .RowSync (.HasOp "sync")}}
{{- if .RowSync}}
#define SU_NUMSYNCS {{add1 .Song.Patch.NumSyncs}}
{{- else}}
#define SU_NUMSYNCS {{.Song.Patch.NumSyncs}}
{{- end}}
#define SU_SYNCBUFFER_LENGTH ((SU_LENGTH_IN_SAMPLES+255)>>8)*SU_NUMSYNCS
{{- end}}
#include <stdint.h>
#if UINTPTR_MAX == 0xffffffff
#if defined(__clang__) || defined(__GNUC__)
#define SU_CALLCONV __attribute__ ((stdcall))
#elif defined(_WIN32)
#define SU_CALLCONV __stdcall
#endif
#else
#define SU_CALLCONV
#endif
{{- if .Output16Bit}}
typedef short SUsample;
#define SU_SAMPLE_RANGE 32767.0
#define SU_SAMPLE_PCM16
#define SU_SAMPLE_SIZE 2
{{- else}}
typedef float SUsample;
#define SU_SAMPLE_RANGE 1.0
#define SU_SAMPLE_FLOAT
#define SU_SAMPLE_SIZE 4
{{- end}}
#ifdef __cplusplus
extern "C" {
#endif
{{- if or .RowSync (.HasOp "sync")}}
#define SU_SYNC
{{- end}}
void SU_CALLCONV su_render_song(SUsample *buffer);
{{- if gt (.SampleOffsets | len) 0}}
void SU_CALLCONV su_load_gmdls();
#define SU_LOAD_GMDLS
{{- end}}
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,52 @@
; auto-generated by Sointu, editing not recommended
%ifndef PLAYER_INC
%define PLAYER_INC
%define SU_CHANNEL_COUNT 2
%define SU_LENGTH_IN_SAMPLES {{.MaxSamples}}
%define SU_BUFFER_LENGTH (SU_LENGTH_IN_SAMPLES*SU_CHANNEL_COUNT)
%define SU_SAMPLE_RATE 44100
%define SU_BPM {{.Song.BPM}}
%define SU_ROWS_PER_BEAT {{.Song.RowsPerBeat}}
%define SU_ROWS_PER_PATTERN {{.Song.Score.RowsPerPattern}}
%define SU_LENGTH_IN_PATTERNS {{.Song.Score.Length}}
%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))
{{- if or .RowSync (.HasOp "sync")}}
{{- if .RowSync}}
%define SU_NUMSYNCS {{add1 .Song.Patch.NumSyncs}}
{{- else}}
%define SU_NUMSYNCS {{.Song.Patch.NumSyncs}}
{{- end}}
%define SU_SYNCBUFFER_LENGTH ((SU_LENGTH_IN_SAMPLES+255)>>8)*SU_NUMSYNCS
{{- end}}
{{- if .Output16Bit}}
%define SU_SAMPLE_SIZE 2
%define SU_SAMPLE_RANGE 32767.0
%define SU_SAMPLE_PCM16
{{- else}}
%define SU_SAMPLE_SIZE 4
%define SU_SAMPLE_RANGE 1.0
%define SU_SAMPLE_FLOAT
{{- end}}
{{- if or .RowSync (.HasOp "sync")}}
%define SU_SYNC
{{- end}}
_su_symbols:
%ifdef MANGLED
extern _su_render_song@4
%else ; MANGLED
extern su_render_song
%endif ; MANGLED
{{- if gt (.SampleOffsets | len) 0}}
extern _su_load_gmdls
%define SU_LOAD_GMDLS
{{- end}}
%endif ; PLAYER_INC

128
sointu_templates/sinks.asm Normal file
View File

@ -0,0 +1,128 @@
{{- if .HasOp "out"}}
;-------------------------------------------------------------------------------
; OUT opcode: outputs and pops the signal
;-------------------------------------------------------------------------------
{{- if .Mono "out"}}
; Mono: add ST0 to main left port, then pop
{{- end}}
{{- if .Stereo "out"}}
; Stereo: add ST0 to left out and ST1 to right out, then pop
{{- end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_out" "Opcode"}} ; l r
mov {{.DI}}, [{{.Stack "Synth"}}] ; DI points to the synth object, use DI consistently in sinks/sources presumably to increase compression rate
{{- if .StereoAndMono "out" }}
jnc su_op_out_mono
{{- end }}
{{- if .Stereo "out" }}
call su_op_out_mono
add {{.DI}}, 4 ; shift from left to right channel
su_op_out_mono:
{{- end}}
fmul dword [{{.Input "out" "gain"}}] ; multiply by gain
fadd dword [{{.DI}} + su_synthworkspace.left] ; add current value of the output
fstp dword [{{.DI}} + su_synthworkspace.left] ; store the new value of the output
ret
{{end}}
{{- if .HasOp "outaux"}}
;-------------------------------------------------------------------------------
; OUTAUX opcode: outputs to main and aux1 outputs and pops the signal
;-------------------------------------------------------------------------------
; Mono: add outgain*ST0 to main left port and auxgain*ST0 to aux1 left
; Stereo: also add outgain*ST1 to main right port and auxgain*ST1 to aux1 right
;-------------------------------------------------------------------------------
{{.Func "su_op_outaux" "Opcode"}} ; l r
mov {{.DI}}, [{{.Stack "Synth"}}]
{{- if .StereoAndMono "outaux" }}
jnc su_op_outaux_mono
{{- end}}
{{- if .Stereo "outaux" }}
call su_op_outaux_mono
add {{.DI}}, 4
su_op_outaux_mono:
{{- end}}
fld st0 ; l l
fmul dword [{{.Input "outaux" "outgain"}}] ; g*l
fadd dword [{{.DI}} + su_synthworkspace.left] ; g*l+o
fstp dword [{{.DI}} + su_synthworkspace.left] ; o'=g*l+o
fmul dword [{{.Input "outaux" "auxgain"}}] ; h*l
fadd dword [{{.DI}} + su_synthworkspace.aux] ; h*l+a
fstp dword [{{.DI}} + su_synthworkspace.aux] ; a'=h*l+a
ret
{{end}}
{{- if .HasOp "aux"}}
;-------------------------------------------------------------------------------
; AUX opcode: outputs the signal to aux (or main) port and pops the signal
;-------------------------------------------------------------------------------
; Mono: add gain*ST0 to left port
; Stereo: also add gain*ST1 to right port
;-------------------------------------------------------------------------------
{{.Func "su_op_aux" "Opcode"}} ; l r
lodsb
mov {{.DI}}, [{{.Stack "Synth"}}]
{{- if .StereoAndMono "aux" }}
jnc su_op_aux_mono
{{- end}}
{{- if .Stereo "aux" }}
call su_op_aux_mono
add {{.DI}}, 4
su_op_aux_mono:
{{- end}}
fmul dword [{{.Input "aux" "gain"}}] ; g*l
fadd dword [{{.DI}} + su_synthworkspace.left + {{.AX}}*4] ; g*l+o
fstp dword [{{.DI}} + su_synthworkspace.left + {{.AX}}*4] ; o'=g*l+o
ret
{{end}}
{{- if .HasOp "send"}}
;-------------------------------------------------------------------------------
; SEND opcode: adds the signal to a port
;-------------------------------------------------------------------------------
; Mono: adds signal to a memory address, defined by a word in VAL stream
; Stereo: also add right signal to the following address
;-------------------------------------------------------------------------------
{{.Func "su_op_send" "Opcode"}}
lodsw
mov {{.CX}}, [{{.Stack "Voice"}}] ; load pointer to voice
{{- if .SupportsGlobalSend}}
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 {{.CX}}, [{{.Stack "Synth"}} + {{.PTRSIZE}}]
su_op_send_skipglobal:
popf
{{- end}}
{{- if .StereoAndMono "send"}}
jnc su_op_send_mono
{{- end}}
{{- if .Stereo "send"}}
mov {{.DI}}, {{.AX}}
inc {{.AX}} ; send the right channel first
fxch ; r l
call su_op_send_mono ; (r) l
mov {{.AX}}, {{.DI}} ; move back to original address
test al, 0x8 ; if r was not popped and is still in the stack
jnz su_op_send_mono
fxch ; swap them back: l r
su_op_send_mono:
{{- end}}
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
su_op_send_skippush: ; there is signal s, but maybe also another: s (s)
fld dword [{{.Input "send" "amount"}}] ; a l (l)
{{- .Float 0.5 | .Prepare | indent 4}}
fsub dword [{{.Float 0.5 | .Use}}] ; a-.5 l (l)
fadd st0 ; g=2*a-1 l (l)
and ah, 0x7f ; eax = send address, clear the global bit
or al, 0x8 ; set the POP bit always, at the same time shifting to ports instead of wrk
fmulp st1, st0 ; g*l (l)
fadd dword [{{.CX}} + {{.AX}}*4] ; g*l+L (l),where L is the current value
fstp dword [{{.CX}} + {{.AX}}*4] ; (l)
ret
{{end}}

View File

@ -0,0 +1,441 @@
{{if .HasOp "envelope" -}}
;-------------------------------------------------------------------------------
; ENVELOPE opcode: pushes an ADSR envelope value on stack [0,1]
;-------------------------------------------------------------------------------
; Mono: push the envelope value on stack
; Stereo: push the envelope valeu on stack twice
;-------------------------------------------------------------------------------
{{.Func "su_op_envelope" "Opcode"}}
{{- if .StereoAndMono "envelope"}}
jnc su_op_envelope_mono
{{- end}}
{{- if .Stereo "envelope"}}
call su_op_envelope_mono
fld st0
ret
su_op_envelope_mono:
{{- end}}
mov eax, dword [{{.INP}}-su_voice.inputs+su_voice.sustain] ; eax = su_instrument.sustain
test eax, eax ; if (eax != 0)
jne su_op_envelope_process ; goto process
mov al, {{.InputNumber "envelope" "release"}} ; [state]=RELEASE
mov dword [{{.WRK}}], eax ; note that mov al, XXX; mov ..., eax is less bytes than doing it directly
su_op_envelope_process:
mov eax, dword [{{.WRK}}] ; al=[state]
fld dword [{{.WRK}}+4] ; x=[level]
cmp al, {{.InputNumber "envelope" "sustain"}} ; if (al==SUSTAIN)
je short su_op_envelope_leave2 ; goto leave2
su_op_envelope_attac:
cmp al, {{.InputNumber "envelope" "attack"}} ; if (al!=ATTAC)
jne short su_op_envelope_decay ; goto decay
{{.Call "su_nonlinear_map"}} ; a x, where a=attack
faddp st1, st0 ; a+x
fld1 ; 1 a+x
fucomi st1 ; if (a+x<=1) // is attack complete?
fcmovnb st0, st1 ; a+x a+x
jbe short su_op_envelope_statechange ; else goto statechange
su_op_envelope_decay:
cmp al, {{.InputNumber "envelope" "decay"}} ; if (al!=DECAY)
jne short su_op_envelope_release ; goto release
{{.Call "su_nonlinear_map"}} ; d x, where d=decay
fsubp st1, st0 ; x-d
fld dword [{{.Input "envelope" "sustain"}}] ; s x-d, where s=sustain
fucomi st1 ; if (x-d>s) // is decay complete?
fcmovb st0, st1 ; x-d x-d
jnc short su_op_envelope_statechange ; else goto statechange
su_op_envelope_release:
cmp al, {{.InputNumber "envelope" "release"}} ; if (al!=RELEASE)
jne short su_op_envelope_leave ; goto leave
{{.Call "su_nonlinear_map"}} ; r x, where r=release
fsubp st1, st0 ; x-r
fldz ; 0 x-r
fucomi st1 ; if (x-r>0) // is release complete?
fcmovb st0, st1 ; x-r x-r, then goto leave
jc short su_op_envelope_leave
su_op_envelope_statechange:
inc dword [{{.WRK}}] ; [state]++
su_op_envelope_leave:
fstp st1 ; x', where x' is the new value
fst dword [{{.WRK}}+4] ; [level]=x'
su_op_envelope_leave2:
fmul dword [{{.Input "envelope" "gain"}}] ; [gain]*x'
ret
{{end}}
{{- if .HasOp "noise"}}
;-------------------------------------------------------------------------------
; NOISE opcode: creates noise
;-------------------------------------------------------------------------------
; Mono: push a random value [-1,1] value on stack
; Stereo: push two (differeent) random values on stack
;-------------------------------------------------------------------------------
{{.Func "su_op_noise" "Opcode"}}
lea {{.CX}},[{{.Stack "RandSeed"}}]
{{- if .StereoAndMono "noise"}}
jnc su_op_noise_mono
{{- end}}
{{- if .Stereo "noise"}}
call su_op_noise_mono
su_op_noise_mono:
{{- end}}
imul eax, [{{.CX}}],16007
mov [{{.CX}}],eax
fild dword [{{.CX}}]
{{- .Prepare (.Int 2147483648)}}
fidiv dword [{{.Use (.Int 2147483648)}}] ; 65536*32768
fld dword [{{.Input "noise" "shape"}}]
{{.Call "su_waveshaper"}}
fmul dword [{{.Input "noise" "gain"}}]
ret
{{end}}
{{- if .HasOp "oscillator"}}
;-------------------------------------------------------------------------------
; OSCILLAT opcode: oscillator, the heart of the synth
;-------------------------------------------------------------------------------
; Mono: push oscillator value on stack
; Stereo: push l r on stack, where l has opposite detune compared to r
;-------------------------------------------------------------------------------
{{.Func "su_op_oscillator" "Opcode"}}
{{- if .SupportsModulation "oscillator" "frequency"}}
push 0
pop {{.CX}} ; clear cx without affecting flags
xchg ecx, dword [{{.Modulation "oscillator" "frequency"}}]
{{- end}}
lodsb ; load the flags
{{- if .Library}}
mov {{.DI}}, [{{.Stack "SampleTable"}}]; we need to put this in a register, as the stereo & unisons screw the stack positions
; ain't we lucky that {{.DI}} was unused throughout
{{- end}}
fld dword [{{.Input "oscillator" "detune"}}] ; e, where e is the detune [0,1]
{{- .Prepare (.Float 0.5)}}
fsub dword [{{.Use (.Float 0.5)}}] ; e-.5
fadd st0, st0 ; d=2*e-.5, where d is the detune [-1,1]
{{- if .StereoAndMono "oscillator"}}
jnc su_op_oscillat_mono
{{- end}}
{{- if .Stereo "oscillator"}}
fld st0 ; d d
add {{.WRK}}, 4 ; move wrk...
call su_op_oscillat_mono ; r d
sub {{.WRK}}, 4 ; ...restore wrk
fxch ; d r
fchs ; -d r, negate the detune for second round
su_op_oscillat_mono:
{{- end}}
{{- if .SupportsParamValueOtherThan "oscillator" "unison" 0}}
{{.PushRegs .AX "" .WRK "OscWRK" .AX "OscFlags"}}
fldz ; 0 d
fxch ; d a=0, "accumulated signal"
su_op_oscillat_unison_loop:
fst dword [{{.SP}}] ; save the current detune, d. We could keep it in fpu stack but it was getting big.
call su_op_oscillat_single ; s a
faddp st1, st0 ; a+=s
test al, 3
je su_op_oscillat_unison_out
add {{.WRK}}, 8 ; this is ok after all, as there's a pop in the end of unison loop
fld dword [{{.Input "oscillator" "phase"}}] ; p s
{{.Int 0x3DAAAAAA | .Prepare}}
fadd dword [{{.Int 0x3DAAAAAA | .Use}}] ; 1/12 p s, add some little phase offset to unison oscillators so they don't start in sync
fstp dword [{{.Input "oscillator" "phase"}}] ; s note that this changes the phase for second, possible stereo run. That's probably ok
fld dword [{{.SP}}] ; d s
{{.Float 0.5 | .Prepare}}
fmul dword [{{.Float 0.5 | .Use}}] ; .5*d s // negate and halve the detune of each oscillator
fchs ; -.5*d s // negate and halve the detune of each oscillator
dec eax
jmp short su_op_oscillat_unison_loop
su_op_oscillat_unison_out:
{{.PopRegs .AX .WRK .AX}}
ret
su_op_oscillat_single:
{{- end}}
fld dword [{{.Input "oscillator" "transpose"}}]
{{- .Float 0.5 | .Prepare}}
fsub dword [{{.Float 0.5 | .Use}}]
{{- .Float 0.0078125 | .Prepare}}
fdiv dword [{{.Float 0.0078125 | .Use}}]
faddp st1
{{- if .SupportsParamValue "oscillator" "lfo" 1}}
test al, byte 0x08
jnz su_op_oscillat_skipnote
{{- end}}
fiadd dword [{{.INP}}-su_voice.inputs+su_voice.note] ; // st0 is note, st1 is t+d offset
{{- if .SupportsParamValue "oscillator" "lfo" 1}}
su_op_oscillat_skipnote:
{{- end}}
{{- .Int 0x3DAAAAAA | .Prepare}}
fmul dword [{{.Int 0x3DAAAAAA | .Use}}]
{{.Call "su_power"}}
{{- if .SupportsParamValue "oscillator" "lfo" 1}}
test al, byte 0x08
jz short su_op_oscillat_normalize_note
{{- .Float 0.000038 | .Prepare}}
fmul dword [{{.Float 0.000038 | .Use}}] ; // st0 is now frequency for lfo
jmp short su_op_oscillat_normalized
su_op_oscillat_normalize_note:
{{- end}}
{{- .Float 0.000092696138 | .Prepare}}
fmul dword [{{.Float 0.000092696138 | .Use}}] ; // st0 is now frequency
su_op_oscillat_normalized:
fadd dword [{{.WRK}}]
{{- if .SupportsModulation "oscillator" "frequency"}}
push {{.CX}}
fadd dword [{{.SP}}]
pop {{.CX}}
{{- end}}
{{- if .SupportsParamValue "oscillator" "type" .Sample}}
test al, byte 0x80
jz short su_op_oscillat_not_sample
fst dword [{{.WRK}}] ; for samples, we store the phase without mod(p,1)
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase")}}
fadd dword [{{.Input "oscillator" "phase"}}]
{{- end}}
{{.Call "su_oscillat_sample"}}
jmp su_op_oscillat_shaping ; skip the rest to avoid color phase normalization and colorloading
su_op_oscillat_not_sample:
{{- end}}
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 [{{.WRK}}] ; store back the updated phase
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase")}}
fadd dword [{{.Input "oscillator" "phase"}}]
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
{{- end}}
fld dword [{{.Input "oscillator" "color"}}] ; // c p
; every oscillator test included if needed
{{- if .SupportsParamValue "oscillator" "type" .Sine}}
test al, byte 0x40
jz short su_op_oscillat_notsine
{{.Call "su_oscillat_sine"}}
su_op_oscillat_notsine:
{{- end}}
{{- if .SupportsParamValue "oscillator" "type" .Trisaw}}
test al, byte 0x20
jz short su_op_oscillat_not_trisaw
{{.Call "su_oscillat_trisaw"}}
su_op_oscillat_not_trisaw:
{{- end}}
{{- if .SupportsParamValue "oscillator" "type" .Pulse}}
test al, byte 0x10
jz short su_op_oscillat_not_pulse
{{.Call "su_oscillat_pulse"}}
su_op_oscillat_not_pulse:
{{- end}}
{{- if .SupportsParamValue "oscillator" "type" .Gate}}
test al, byte 0x04
jz short su_op_oscillat_not_gate
{{.Call "su_oscillat_gate"}}
jmp su_op_oscillat_gain ; skip waveshaping as the shape parameter is reused for gateshigh
su_op_oscillat_not_gate:
{{- end}}
su_op_oscillat_shaping:
; finally, shape the oscillator and apply gain
fld dword [{{.Input "oscillator" "shape"}}]
{{.Call "su_waveshaper"}}
su_op_oscillat_gain:
fmul dword [{{.Input "oscillator" "gain"}}]
ret
{{end}}
{{- if .HasCall "su_oscillat_pulse"}}
{{.Func "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
{{end}}
{{- if .HasCall "su_oscillat_trisaw"}}
{{.Func "su_oscillat_trisaw"}}
fucomi st1 ; // c p
jnc short su_oscillat_trisaw_up
fld1 ; // 1 c p
fsubr st2, st0 ; // 1 c 1-p
fsubrp st1, st0 ; // 1-c 1-p
su_oscillat_trisaw_up:
fdivp st1, st0 ; // tp'/tc
fadd st0 ; // 2*''
fld1 ; // 1 2*''
fsubp st1, st0 ; // 2*''-1
ret
{{end}}
{{- if .HasCall "su_oscillat_sine"}}
{{.Func "su_oscillat_sine"}}
fucomi st1 ; // c p
jnc short su_oscillat_sine_do
fstp st1
fsub st0, st0 ; // 0
ret
su_oscillat_sine_do:
fdivp st1, st0 ; // p/c
fldpi ; // pi p
fadd st0 ; // 2*pi p
fmulp st1, st0 ; // 2*pi*p
fsin ; // sin(2*pi*p)
ret
{{end}}
{{- if .HasCall "su_oscillat_gate"}}
{{.Func "su_oscillat_gate"}}
fxch ; p c
fstp st1 ; p
{{- .Float 16.0 | .Prepare | indent 4}}
fmul dword [{{.Float 16.0 | .Use}}] ; 16*p
push {{.AX}}
push {{.AX}}
fistp dword [{{.SP}}] ; s=int(16*p), stack empty
fld1 ; 1
pop {{.AX}}
and al, 0xf ; ax=int(16*p) & 15, stack: 1
bt word [{{.VAL}}-4],ax ; if bit ax of the gate word is set
jc su_oscillat_gate_bit ; goto gate_bit
fsub st0, st0 ; stack: 0
su_oscillat_gate_bit: ; stack: 0/1, let's call it x
fld dword [{{.WRK}}+16] ; g x, g is gatestate, x is the input to this filter 0/1
fsub st1 ; g-x x
{{- .Float 0.99609375 | .Prepare | indent 4}}
fmul dword [{{.Float 0.99609375 | .Use}}] ; c(g-x) x
faddp st1, st0 ; x+c(g-x)
fst dword [{{.WRK}}+16]; g'=x+c(g-x) NOTE THAT UNISON 2 & UNISON 3 ALSO USE {{.WRK}}+16, so gate and unison 2 & 3 don't work. Probably should delete that low pass altogether
pop {{.AX}} ; Another way to see this (c~0.996)
ret ; g'=cg+(1-c)x
; This is a low-pass to smooth the gate transitions
{{end}}
{{- if .HasCall "su_oscillat_sample"}}
{{.Func "su_oscillat_sample"}}
{{- .PushRegs .AX "SampleAx" .DX "SampleDx" .CX "SampleCx" .BX "SampleBx" .DI "SampleDi" | indent 4}} ; edx must be saved, eax & ecx if this is stereo osc
push {{.AX}}
mov al, byte [{{.VAL}}-4] ; reuse "color" as the sample number
{{- if .Library}}
lea {{.DI}}, [{{.DI}} + {{.AX}}*8] ; edi points now to the sample table entry
{{- else}}
{{- .Prepare "su_sample_offsets" | indent 4}}
lea {{.DI}}, [{{.Use "su_sample_offsets"}} + {{.AX}}*8]; edi points now to the sample table entry
{{- end}}
{{- .Float 84.28074964676522 | .Prepare | indent 4}}
fmul dword [{{.Float 84.28074964676522 | .Use}}] ; p*r
fistp dword [{{.SP}}]
pop {{.DX}} ; edx is now the sample number
movzx ebx, word [{{.DI}} + 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 [{{.DI}} + 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 [{{.DI}}]
{{- .Prepare "su_sample_table" | indent 4}}
fild word [{{.Use "su_sample_table"}} + {{.DX}}*2]
{{- .Float 32767.0 | .Prepare | indent 4}}
fdiv dword [{{.Float 32767.0 | .Use}}]
{{- .PopRegs .AX .DX .CX .BX .DI | indent 4}}
ret
{{end}}
{{- if .HasOp "loadval"}}
;-------------------------------------------------------------------------------
; LOADVAL opcode
;-------------------------------------------------------------------------------
{{- if .Mono "loadval"}}
; Mono: push 2*v-1 on stack, where v is the input to port "value"
{{- end}}
{{- if .Stereo "loadval"}}
; Stereo: push 2*v-1 twice on stack
{{- end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_loadval" "Opcode"}}
{{- if .StereoAndMono "loadval" }}
jnc su_op_loadval_mono
{{- end}}
{{- if .Stereo "loadval" }}
call su_op_loadval_mono
su_op_loadval_mono:
{{- end }}
fld dword [{{.Input "loadval" "value"}}] ; v
{{- .Float 0.5 | .Prepare | indent 4}}
fsub dword [{{.Float 0.5 | .Use}}]
fadd st0 ; 2*v-1
ret
{{end}}
{{- if .HasOp "receive"}}
;-------------------------------------------------------------------------------
; RECEIVE opcode
;-------------------------------------------------------------------------------
{{- if .Mono "receive"}}
; Mono: push l on stack, where l is the left channel received
{{- end}}
{{- if .Stereo "receive"}}
; Stereo: push l r on stack
{{- end}}
;-------------------------------------------------------------------------------
{{.Func "su_op_receive" "Opcode"}}
lea {{.DI}}, [{{.WRK}}+su_unit.ports]
{{- if .StereoAndMono "receive"}}
jnc su_op_receive_mono
{{- end}}
{{- if .Stereo "receive"}}
xor ecx,ecx
fld dword [{{.DI}}+4]
mov dword [{{.DI}}+4],ecx
{{- end}}
{{- if .StereoAndMono "receive"}}
su_op_receive_mono:
xor ecx,ecx
{{- end}}
fld dword [{{.DI}}]
mov dword [{{.DI}}],ecx
ret
{{end}}
{{- if .HasOp "in"}}
;-------------------------------------------------------------------------------
; IN opcode: inputs and clears a global port
;-------------------------------------------------------------------------------
; Mono: push the left channel of a global port (out or aux)
; Stereo: also push the right channel (stack in l r order)
;-------------------------------------------------------------------------------
{{.Func "su_op_in" "Opcode"}}
lodsb
mov {{.DI}}, [{{.Stack "Synth"}}]
{{- if .StereoAndMono "in"}}
jnc su_op_in_mono
{{- end}}
{{- if .Stereo "in"}}
xor ecx, ecx ; we cannot xor before jnc, so we have to do it mono & stereo. LAHF / SAHF could do it, but is the same number of bytes with more entropy
fld dword [{{.DI}} + su_synthworkspace.right + {{.AX}}*4]
mov dword [{{.DI}} + su_synthworkspace.right + {{.AX}}*4], ecx
{{- end}}
{{- if .StereoAndMono "in"}}
su_op_in_mono:
xor ecx, ecx
{{- end}}
fld dword [{{.DI}} + su_synthworkspace.left + {{.AX}}*4]
mov dword [{{.DI}} + su_synthworkspace.left + {{.AX}}*4], ecx
ret
{{end}}

View File

@ -0,0 +1,57 @@
%define SU_LENGTH_IN_SAMPLES {{.MaxSamples}}
%define SU_SAMPLE_RATE 44100
%define SU_BPM {{.Song.BPM}}.
;-------------------------------------------------------------------------------
; unit struct
;-------------------------------------------------------------------------------
struc su_unit
.state resd 8
.ports resd 8
.size:
endstruc
;-------------------------------------------------------------------------------
; voice struct
;-------------------------------------------------------------------------------
struc su_voice
.note resd 1
.sustain resd 1
.inputs resd 8
.reserved resd 6 ; this is done to so the whole voice is 2^n long, see polyphonic player
.workspace resb 63 * su_unit.size
.size:
endstruc
;-------------------------------------------------------------------------------
; synthworkspace struct
;-------------------------------------------------------------------------------
struc su_synthworkspace
.curvoices resb 32 ; these are used by the multitrack player to store which voice is playing on which track
.left resd 1
.right resd 1
.aux resd 6 ; 3 auxiliary signals
.voices resb 32 * su_voice.size
.size:
endstruc
;-------------------------------------------------------------------------------
; su_delayline_wrk struct
;-------------------------------------------------------------------------------
struc su_delayline_wrk
.dcin resd 1
.dcout resd 1
.filtstate resd 1
.buffer resd 65536
.size:
endstruc
;-------------------------------------------------------------------------------
; su_sample_offset struct
;-------------------------------------------------------------------------------
struc su_sample_offset ; length conveniently 8 bytes, so easy to index
.start resd 1
.loopstart resw 1
.looplength resw 1
.size:
endstruc

129
template.frag Normal file
View File

@ -0,0 +1,129 @@
#ifdef GL_ES
precision mediump float;
#endif
#define MAX_STEPS 50
#define MAX_DIST 50.
#define SURF_DIST .001
#define TAU 6.283185
#define PI 3.141592
#define S smoothstep
#define T u_time
uniform vec2 u_resolution;
uniform float u_time;
mat2 Rot(float a) {
float s=sin(a), c=cos(a);
return mat2(c, -s, s, c);
}
float sdBox(vec3 p, vec3 s) {
p = abs(p)-s;
return length(max(p, 0.))+min(max(p.x, max(p.y, p.z)), 0.);
}
vec3 translate(vec3 p) {
p.xy *= Rot(u_time*0.4);
p.yz *= Rot(u_time*0.4);
return p;
}
float GetDist(vec3 p) {
float d = sdBox(p, vec3(1));
/*
d += sin(p.x*5.+u_time)*0.5;
d += sin(p.y*2.+u_time)*0.5;
d += sin(p.z*5.+u_time)*0.5; */
return d;
}
float RayMarch(vec3 ro, vec3 rd) {
float dO=0.;
for(int i=0; i<MAX_STEPS; i++) {
vec3 p = ro + rd*dO;
float dS = GetDist(p);
dO += dS;
if(dO>MAX_DIST || abs(dS)<SURF_DIST) break;
}
return dO;
}
vec3 GetNormal(vec3 p) {
vec2 e = vec2(.001, 0);
vec3 n = GetDist(p) - vec3(GetDist(p-e.xyy), GetDist(p-e.yxy),GetDist(p-e.yyx));
return normalize(n);
}
vec3 GetRayDir(vec2 uv, vec3 p, vec3 l, float z) {
vec3
f = normalize(l-p),
r = normalize(cross(vec3(0,1,0), f)),
u = cross(f,r),
c = f*z,
i = c + uv.x*r + uv.y*u;
return normalize(i);
}
float star(vec2 position, float radius, float sides){
float a = atan(position.x, position.y);
float slice = PI * 2. / sides;
return 1. - step(radius, cos(floor(-2.0 + a / slice) * slice - a));
}
vec3 textu(vec2 uv) {
vec3 color = vec3(0.08, 0.22, 0.39);
vec3 mixer = vec3(0.);
for(float i = 1.; i < 3.; i++){
vec2 translate = uv;
// translate *= Rot(i*1.4/5. + u_time);
float sides = 11.;
mixer += vec3(star(translate, 0.06, sides))*vec3(0.5725, 0.8275, 0.9451)*(i*0.7)*0.2;
}
return mix( color, mixer, 0.5);
}
void main()
{
vec2 uv = (gl_FragCoord.xy -.5 * u_resolution.xy) / u_resolution.y;
vec3 ro = vec3(0., 3., -3.);
vec3 rd = GetRayDir(uv, ro, vec3(0.,0., 0.), 1.);
vec3 col = vec3(0.);
float d = RayMarch(ro, rd);
if (d < MAX_DIST) {
vec3 p = ro + rd * d;
vec3 n = GetNormal(p);
vec3 r = reflect(rd, n);
float dif = dot(n, normalize(vec3(1,2,3)))*.5+.5;
// col = vec3(dif);
vec3 colXZ = textu(p.xz).rgb;
vec3 colYZ = textu(p.yz).rgb;
vec3 colXY = textu(p.xy).rgb;
n = abs(n);
n *= pow(n, vec3(10));
n /= n.x + n.y + n.z;
col = (colXZ*n.y + colXY*n.z + colYZ * n.x)*dif;
}
col = pow(col, vec3(.4545)); // gamma correction
gl_FragColor = vec4(col,1.0);
}

Some files were not shown because too many files have changed in this diff Show More