View shader.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
uniform vec2 resolution; | |
uniform float time; | |
uniform float targetNoteStates[128]; | |
float wave(float x, float freq, float speed, float amp) { | |
return amp * sin(x * freq + time * speed); | |
} | |
void main() { |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.bpm = 110; | |
global.pattern_size_shift = 4; | |
// global.looptimes = 100; | |
//soloInstrument('kick'); | |
/*soloInstrument('pad1'); | |
soloInstrument('pad2'); | |
soloInstrument('pad3');*/ | |
// soloInstrument('lead1'); |
View build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../sointu/sointu-compile -arch amd64 ../sointu/temp_song_file.yml | |
# if you just want to redner a short version | |
# node rendershort.mjs | |
yasm -f macho64 -a x86 temp_song_file.asm --objfile=temp_song_file.o | |
MACOSX_DEPLOYMENT_TARGET=11 gcc -Wl,-no_pie -arch x86_64 temp_song_file.o test.c -o test | |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2022 - Peter Johan Salomonsen | |
*/ | |
setBPM(50); | |
addInstrument('piano'); | |
addInstrument('string'); | |
addInstrument('drums'); | |
addInstrument('guitar'); |
View lakemandelbrot.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 100 | |
precision highp float; | |
uniform vec2 resolution; | |
uniform float time; | |
vec3 hsv2rgb(vec3 c) | |
{ | |
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); | |
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); | |
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2021 - Peter Johan Salomonsen | |
*/ | |
setBPM(85); | |
addInstrument('piano'); | |
addInstrument('string'); | |
addInstrument('drums'); | |
addInstrument('guitar'); |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2021 - Peter Johan Salomonsen | |
*/ | |
setBPM(100); | |
addInstrument('BoltToysPluck'); | |
addInstrument('SphericalBowl'); | |
addInstrument('KnotPressureModeled'); | |
addInstrument('empty1'); |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SONGMODE=PROTRACKER | |
import { writeMod, cmd, clr } from './lib/protrackermodwriter.js'; | |
import { createSamples } from './lib/instrumentgenerator.js'; | |
import { createSampleEcho, insertNotesIntoPattern, insertSampleNotesIntoPattern, toPatternArray, createEmptyPatternArray } from './lib/patterntools.js'; | |
onmessage = function(msg) { | |
const samples = createSamples(msg.data.WASM_SYNTH_BYTES, [ | |
(instance) => { | |
instance.setChannelValue(0, 69 - (12 )); |
View .gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
View song.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2020 - Peter Johan Salomonsen | |
*/ | |
setBPM(105); | |
addInstrument('piano'); | |
addInstrument('string'); | |
addInstrument('drums'); | |
addInstrument('brass'); |
NewerOlder