Skip to content

Commit

Permalink
Add amplitude input to Granulator node
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Jul 22, 2024
1 parent 3ff4389 commit 52d4932
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/library/buffer/granulation/granulator/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Granulator: Granulator. Generates a grain from the given buffer eac
# Granulator

```python
Granulator(buffer=None, clock=0, pos=0, duration=0.1, amplitude=0.0, pan=0.0, rate=1.0, max_grains=2048, wrap=false)
Granulator(buffer=None, clock=0, pos=0, duration=0.1, amplitude=1.0, pan=0.0, rate=1.0, max_grains=2048, wrap=false)
```

Granulator. Generates a grain from the given buffer each time a trigger is received on the `clock` input. Each new grain uses the given `duration`, `amplitude`, `pan` and `rate` values presented at each input at the moment the grain is created. The input buffer can be mono or stereo. If `wrap` is true, grain playback can wrap around the end/start of the buffer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Granulator : public Node
NodeRef clock = 0,
NodeRef pos = 0,
NodeRef duration = 0.1,
NodeRef amplitude = 0.0,
NodeRef amplitude = 1.0,
NodeRef pan = 0.0,
NodeRef rate = 1.0,
NodeRef max_grains = 2048,
Expand Down
2 changes: 1 addition & 1 deletion source/src/python/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void init_python_nodes(py::module &m)
.def(py::init<BufferRef, std::vector<float>, std::vector<float>, NodeRef, NodeRef, NodeRef, NodeRef>(), "buffer"_a = nullptr, "onset_times"_a = 0, "durations"_a = 0, "index"_a = 0.0, "rate"_a = 1.0, "clock"_a = 0, "max_grains"_a = 2048);

py::class_<Granulator, Node, NodeRefTemplate<Granulator>>(m, "Granulator", "Granulator. Generates a grain from the given buffer each time a trigger is received on the `clock` input. Each new grain uses the given `duration`, `amplitude`, `pan` and `rate` values presented at each input at the moment the grain is created. The input buffer can be mono or stereo. If `wrap` is true, grain playback can wrap around the end/start of the buffer.")
.def(py::init<BufferRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, bool>(), "buffer"_a = nullptr, "clock"_a = 0, "pos"_a = 0, "duration"_a = 0.1, "amplitude"_a = 0.0, "pan"_a = 0.0, "rate"_a = 1.0, "max_grains"_a = 2048, "wrap"_a = false);
.def(py::init<BufferRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, NodeRef, bool>(), "buffer"_a = nullptr, "clock"_a = 0, "pos"_a = 0, "duration"_a = 0.1, "amplitude"_a = 1.0, "pan"_a = 0.0, "rate"_a = 1.0, "max_grains"_a = 2048, "wrap"_a = false);

#ifdef __APPLE__

Expand Down

0 comments on commit 52d4932

Please sign in to comment.