Skip to content

Commit

Permalink
Add randomizations to GenericDrum
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukau committed Jan 29, 2024
1 parent 91c4d52 commit 990d3c6
Show file tree
Hide file tree
Showing 7 changed files with 1,393 additions and 7 deletions.
10 changes: 8 additions & 2 deletions GenericDrum/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ import * as wave from "../common/wave.js";

import * as menuitems from "./menuitems.js";

const version = 0;
const version = 1;

const localRecipeJsonPath = [
// "recipe/full.json",
"recipe/full.json",
"recipe/bassdrum.json",
"recipe/snaredrum.json",
"recipe/hihat.json",
"recipe/lightpercussion.json",
];

const localRecipeBook = {
Expand Down Expand Up @@ -124,6 +127,7 @@ const param = {
sampleRateScaler: new parameter.Parameter(0, scales.sampleRateScaler),
dcHighpassHz: new parameter.Parameter(0, scales.dcHighpassHz, true),
toneSlope: new parameter.Parameter(1, scales.toneSlope, false),
preventBlowUp: new parameter.Parameter(0, scales.boolean, false),

limiterType: new parameter.Parameter(1, scales.limiterType, true),
limiterThreshold: new parameter.Parameter(1, scales.limiterThreshold, false),
Expand Down Expand Up @@ -256,6 +260,8 @@ const ui = {
new widget.NumberInput(detailRender, "DC Highpass [Hz]", param.dcHighpassHz, render),
toneSlope:
new widget.NumberInput(detailRender, "Tone Slope [dB/oct]", param.toneSlope, render),
preventBlowUp: new widget.CheckBoxLine(
detailRender, "Prevent Blow Up", ["Off", "On"], param.preventBlowUp, render),

limiterType: new widget.ComboBoxLine(detailLimiter, "Type", param.limiterType, render),
limiterThreshold: new widget.NumberInput(
Expand Down
295 changes: 295 additions & 0 deletions GenericDrum/recipe/bassdrum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
{
"meta": {"author": "", "recipeName": "Bass Drum", "version": 1},
"parameters": {
"renderDuration": {
"info" : {"min": 0.01, "max": 100 },
"random": {"min": 0.01, "max": 100, "type": "bypass"}
},
"fadeIn": {
"info" : {"min": 0, "max": 100 },
"random": {"min": 0, "max": 100, "type": "bypass"}
},
"fadeOut": {
"info" : {"min": 0, "max": 100 },
"random": {"min": 0, "max": 100, "type": "bypass"}
},
"decayTo": {
"info" : {"min": -144.49439791871097, "max": 0 },
"random": {"min": -144.49439791871097, "max": 0, "type": "bypass"}
},
"stereoMerge": {
"info" : {"min": 0, "max": 1 },
"random": {"min": 0, "max": 1, "type": "bypass"}
},
"overSample": {
"info" : {"min": 0, "max": 7 },
"random": {"min": 0, "max": 7, "type": "bypass"}
},
"sampleRateScaler": {
"info" : {"min": 0, "max": 5 },
"random": {"min": 0, "max": 5, "type": "bypass"}
},
"dcHighpassHz": {
"info" : {"min": 0, "max": 100 },
"random": {"min": 0, "max": 100, "type": "bypass"}
},
"toneSlope": {
"info" : {"min": -12, "max": 0 },
"random": {"min": -12, "max": 0, "type": "bypass"}
},
"preventBlowUp": {
"info" : {"min": 0, "max": 1 },
"random": {"min": 0, "max": 1, "type": "bypass"}
},
"limiterType": {
"info" : {"min": 0, "max": 3 },
"random": {"min": 0, "max": 3, "type": "bypass"}
},
"limiterThreshold": {
"info" : {"min": -60, "max": 40 },
"random": {"min": -60, "max": 40, "type": "bypass"}
},
"limiterSmoothingSeconds": {
"info" : {"min": 0.0001, "max": 0.1 },
"random": {"min": 0.0001, "max": 0.1, "type": "bypass"}
},
"seed": {
"info" : {"min": 0, "max": 4294967296 },
"random": {"min": 0, "max": 4294967296, "type": "display"}
},
"noiseDecaySeconds": {
"info" : {"min": 0.01, "max": 0.5 },
"random": {"min": 0.01, "max": 0.5, "type": "display"}
},
"noiseLowpassHz": {
"info" : {"min": 2, "max": 10000 },
"random": {"min": 800, "max": 1500, "type": "display"}
},
"allpassMaxTimeHz": {
"info" : {"min": 2, "max": 10000 },
"random": {"min": 100, "max": 1000, "type": "display"}
},
"impactWireMix": {
"info" : {"min": 0.00, "max": 1 },
"random": {"min": 0.95, "max": 1, "type": "display"}
},
"membraneWireMix": {
"info" : {"min": 0, "max": 1.0 },
"random": {"min": 0, "max": 0.1, "type": "display"}
},
"wireFrequencyHz": {
"info" : {"min": 1, "max": 1000 },
"random": {"min": 100, "max": 1000, "type": "display"}
},
"wireDecaySeconds": {
"info" : {"min": 0.01, "max": 100 },
"random": {"min": 0.10, "max": 1, "type": "display"}
},
"wireDistance": {
"info" : {"min": 0.00, "max": 100.0 },
"random": {"min": 0.01, "max": 0.1, "type": "display"}
},
"wireCollisionTypeMix": {
"info" : {"min": 0.00, "max": 1 },
"random": {"min": 0.75, "max": 1, "type": "display"}
},
"matrixSize": {
"info" : {"min": 1, "max": 32 },
"random": {"min": 1, "max": 32, "type": "bypass"}
},
"crossFeedbackGain": {
"info" : {"min": -12, "max": 3 },
"random": {"min": -2, "max": -1, "type": "display"}
},
"crossFeedbackRatio": [
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
{
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
}
],
"delayTimeSpread": {
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.5, "max": 1, "type": "display"}
},
"bandpassCutSpread": {
"info" : {"min": 0.0, "max": 1 },
"random": {"min": 0.9, "max": 1, "type": "display"}
},
"pitchRandomCent": {
"info" : {"min": 0, "max": 1200 },
"random": {"min": 0, "max": 100, "type": "display"}
},
"envelopeAttackSeconds": {
"info" : {"min": 0.001, "max": 100 },
"random": {"min": 0.001, "max": 100, "type": "bypass"}
},
"envelopeDecaySeconds": {
"info" : {"min": 0.001, "max": 100 },
"random": {"min": 0.001, "max": 100, "type": "bypass"}
},
"envelopeModAmount": {
"info" : {"min": 0, "max": 10 },
"random": {"min": 0, "max": 0, "type": "display"}
},
"pitchType": {
"info" : {"min": 0, "max": 9 },
"random": {"min": 6, "max": 6, "type": "display"}
},
"delayTimeHz": {
"info" : {"min": 2, "max": 10000 },
"random": {"min": 20, "max": 100, "type": "display"}
},
"delayTimeModAmount": {
"info" : {"min": 0, "max": 100000 },
"random": {"min": 200, "max": 10000, "type": "display"}
},
"bandpassCutRatio": {
"info" : {"min": -8, "max": 8 },
"random": {"min": -3, "max": 0, "type": "display"}
},
"bandpassQ": {
"info" : {"min": 0.01, "max": 100 },
"random": {"min": 0.01, "max": 1, "type": "display"}
},
"secondaryFdnMix": {
"info" : {"min": 0.0, "max": 1.0 },
"random": {"min": 0.5, "max": 0.5, "type": "display"}
},
"secondaryPitchOffset": {
"info" : {"min": -8, "max": 8 },
"random": {"min": -1, "max": 1, "type": "display"}
},
"secondaryQOffset": {
"info" : {"min": -8, "max": 8 },
"random": {"min": -3, "max": 0, "type": "display"}
},
"secondaryDistance": {
"info" : {"min": 0, "max": 100.00 },
"random": {"min": 0, "max": 0.75, "type": "display"}
}
}
}
Loading

0 comments on commit 990d3c6

Please sign in to comment.