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) 2019 - Peter Johan Salomonsen - All rights reserved | |
*/ | |
global.bpm = 110; | |
global.pattern_size_shift = 4; | |
// global.looptimes = 100; | |
// soloInstrument('bass'); |
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 = 120; | |
global.pattern_size_shift = 4; | |
global.WASM_SYNTH_LOCATION = 'https://gist.githubusercontent.com/petersalomonsen/e49e3b861b57a9bbb8769b7cace43311/raw/08b47509211dbec1f578bb9590dd7b03b3084e2d/grooveisinthecode.wasm'; | |
// global.looptimes = 100; | |
/*soloInstrument('pad1'); | |
soloInstrument('pad2'); | |
soloInstrument('pad3');*/ | |
// soloInstrument('lead1'); |
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
import { StereoSignal } from "../synth/stereosignal.class"; | |
import { Freeverb } from "../fx/freeverb"; | |
import { DelayLine } from "../fx/delayline"; | |
import { SAMPLERATE } from "../environment"; | |
import { TriBandStereoCompressor } from "../fx/tribandstereocompressor"; | |
import { EQBand } from "../fx/eqband"; | |
import { SubPiano } from "../instruments/piano/subpiano"; | |
import { Kick2 } from "../instruments/drums/kick2.class"; |
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
/** | |
* | |
* "Hondarribia" - Intro song for the music talk at WebAssembly summit 2020 | |
* | |
* Also available at spotify / soundcloud | |
* https://open.spotify.com/track/72SIjtJwJWggfl2nvHPptE?si=xUh-n4h7QCuR2McQCYie3Q | |
* https://soundcloud.com/psalomo/hondarribia | |
* | |
* Copyright (c) 2019-2020 - Peter Johan Salomonsen - All rights reserved | |
* |
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
/** | |
* "WASM song" | |
* Copyright (c) 2019-2020 - Peter Johan Salomonsen - All rights reserved | |
*/ | |
global.bpm = 123; | |
global.pattern_size_shift = 4; | |
// global.looptimes = 100; | |
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
import { SineOscillator } from '../synth/sineoscillator.class'; | |
import { SawOscillator } from '../synth/sawoscillator.class'; | |
import { Envelope } from '../synth/envelope.class'; | |
import { StereoSignal } from "../synth/stereosignal.class"; | |
import { notefreq } from '../synth/note'; | |
import { Noise } from '../synth/noise.class'; | |
import { BandPass } from '../fx/bandpass'; | |
import { SAMPLERATE } from '../environment'; | |
import { BiQuadFilter, FilterType, Q_BUTTERWORTH } from '../synth/biquad'; | |
import { createInstrumentArray } from '../common/mixcommon'; |
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) 2019 - Peter Johan Salomonsen - All rights reserved | |
*/ | |
global.bpm = 110; | |
global.pattern_size_shift = 4; | |
var pianoVoices = []; | |
for(let n=1;n<=8;n++) { | |
pianoVoices.push('piano'+n); |
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/.bin/asc -O3 --use Math=JSMath --runtime none test.ts -o test.wasm | |
node test.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
/** | |
* | |
* "4klang first attempt" - originally made for 4klang, remake for livecode wasm env. | |
* | |
* Copyright (c) 2019-2020 - Peter Johan Salomonsen - All rights reserved | |
* | |
*/ | |
global.bpm = 106; | |
global.pattern_size_shift = 4; |
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 )); |
OlderNewer