Skip to content

Commit

Permalink
added noise() kink() methods, updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tmhglnd committed Dec 13, 2020
1 parent de38e48 commit a536b87
Show file tree
Hide file tree
Showing 17 changed files with 4,571 additions and 2,585 deletions.
14 changes: 14 additions & 0 deletions docs/02-instrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,20 @@ Add a second oscillator to the synths sound. This can either be a sine, triangle
new synth saw note(0 1) time(1/4) wave2(square 0.998)
```

## noise

Add a noise oscillator to the synth sound. The first argument is the amplitude (gain), the second, third and fourth argument control an LFO (low-frequency-oscillator) that modulates the amplitude of the noise.

**arguments**
- {Number} -> amplitude of the noise
- {Number/Division} -> LFO speed in division (optional, default=1)
- {Number} -> the slope of the LFO shape (0 is down, 0.5 is trangle, 1 is up) (optional, default=0.5)
- {Number} -> the LFO depth (optional, default depends on other arguments)

```java
new synth saw note(0 1) time(1/4) noise(0.8 1/8 0.1)
```

# Sample and Loop only

The sample and loop instruments allow you to play sound-recordings and loops. These so called "samples" are loaded in RAM and can be accessed by their filename (without the extension).
Expand Down
7 changes: 7 additions & 0 deletions mercury_ide/code/mercury.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ const handlers = {
},
'div' : (...v) => {
return Util.divide(...v);
},
// normalize an array to 0-1 range
'normalize' : (...v) => {
return Util.normalize(...v);
},
'norm' : (...v) => {
return Util.normalize(...v);
}
}
max.addHandlers(handlers);
Expand Down
123 changes: 35 additions & 88 deletions mercury_ide/code/node_modules/total-serialism/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 56 additions & 22 deletions mercury_ide/code/node_modules/total-serialism/build/ts.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 23 additions & 5 deletions mercury_ide/code/node_modules/total-serialism/build/ts.es5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit a536b87

Please sign in to comment.