@@ -177,60 +177,105 @@ pub impl Node for Clip with fn id(self) -> UInt {
177177
178178///|
179179/// Modulate the gain level.
180- pub fn [Mod : Modulator ] Gain ::modulate(self : Gain , mod : Mod ) -> Unit {
181- mod.modulate(self.id(), 0)
180+ pub fn [Mod : Modulator ] Gain ::modulate(
181+ self : Gain ,
182+ low : Float ,
183+ high : Float ,
184+ mod : Mod ,
185+ ) -> Unit {
186+ mod.modulate(self.id(), 0, low, high)
182187}
183188
184189///|
185190/// Modulate the pan value (from 0. to 1.: 0. is only left, 1. is only right).
186- pub fn [Mod : Modulator ] Pan ::modulate(self : Pan , mod : Mod ) -> Unit {
187- mod.modulate(self.id(), 0)
191+ pub fn [Mod : Modulator ] Pan ::modulate(
192+ self : Pan ,
193+ low : Float ,
194+ high : Float ,
195+ mod : Mod ,
196+ ) -> Unit {
197+ mod.modulate(self.id(), 0, low, high)
188198}
189199
190200///|
191201/// Modulate the muted state.
192202///
193203/// Below 0.5 is muted, above is unmuted.
194- pub fn [Mod : Modulator ] Mute ::modulate(self : Mute , mod : Mod ) -> Unit {
195- mod.modulate(self.id(), 0)
204+ pub fn [Mod : Modulator ] Mute ::modulate(
205+ self : Mute ,
206+ low : Float ,
207+ high : Float ,
208+ mod : Mod ,
209+ ) -> Unit {
210+ mod.modulate(self.id(), 0, low, high)
196211}
197212
198213///|
199214/// Modulate the paused state.
200215///
201216/// Below 0.5 is paused, above is playing.
202- pub fn [Mod : Modulator ] Pause ::modulate(self : Pause , mod : Mod ) -> Unit {
203- mod.modulate(self.id(), 0)
217+ pub fn [Mod : Modulator ] Pause ::modulate(
218+ self : Pause ,
219+ low : Float ,
220+ high : Float ,
221+ mod : Mod ,
222+ ) -> Unit {
223+ mod.modulate(self.id(), 0, low, high)
204224}
205225
206226///|
207227/// Modulate the cut-off frequency.
208- pub fn [Mod : Modulator ] LowPass ::modulate(self : LowPass , mod : Mod ) -> Unit {
209- mod.modulate(self.id(), 0)
228+ pub fn [Mod : Modulator ] LowPass ::modulate(
229+ self : LowPass ,
230+ low : Float ,
231+ high : Float ,
232+ mod : Mod ,
233+ ) -> Unit {
234+ mod.modulate(self.id(), 0, low, high)
210235}
211236
212237///|
213238/// Modulate the cut-off frequency.
214- pub fn [Mod : Modulator ] HighPass ::modulate(self : HighPass , mod : Mod ) -> Unit {
215- mod.modulate(self.id(), 0)
239+ pub fn [Mod : Modulator ] HighPass ::modulate(
240+ self : HighPass ,
241+ low : Float ,
242+ high : Float ,
243+ mod : Mod ,
244+ ) -> Unit {
245+ mod.modulate(self.id(), 0, low, high)
216246}
217247
218248///|
219249/// Modulate the low cut amplitude and adjust the high amplitude to keep the gap.
220250///
221251/// In other words, the difference between low and high cut points will stay the same.
222- pub fn [Mod : Modulator ] Clip ::modulate_both(self : Clip , mod : Mod ) -> Unit {
223- mod.modulate(self.id(), 0)
252+ pub fn [Mod : Modulator ] Clip ::modulate_both(
253+ self : Clip ,
254+ low : Float ,
255+ high : Float ,
256+ mod : Mod ,
257+ ) -> Unit {
258+ mod.modulate(self.id(), 0, low, high)
224259}
225260
226261///|
227262/// Modulate the low cut amplitude.
228- pub fn [Mod : Modulator ] Clip ::modulate_low(self : Clip , mod : Mod ) -> Unit {
229- mod.modulate(self.id(), 1)
263+ pub fn [Mod : Modulator ] Clip ::modulate_low(
264+ self : Clip ,
265+ low : Float ,
266+ high : Float ,
267+ mod : Mod ,
268+ ) -> Unit {
269+ mod.modulate(self.id(), 1, low, high)
230270}
231271
232272///|
233273/// Modulate the high cut amplitude.
234- pub fn [Mod : Modulator ] Clip ::modulate_high(self : Clip , mod : Mod ) -> Unit {
235- mod.modulate(self.id(), 2)
274+ pub fn [Mod : Modulator ] Clip ::modulate_high(
275+ self : Clip ,
276+ low : Float ,
277+ high : Float ,
278+ mod : Mod ,
279+ ) -> Unit {
280+ mod.modulate(self.id(), 2, low, high)
236281}
0 commit comments