Usage of ipytone.Multiply #119
Replies: 4 comments 2 replies
-
Hi @kumolonimbus, I think what you want is: player.connect(mult)
osc.connect(mult.factor)
# assuming that you want to hear the output of mult directly
mult.to_destination()
player.start()
osc.start() Multiply.factor is the control parameter and is an instance of Param to which you can connect another signal. Connecting two signals to I think it would be worth adding a section about audio signals in ipytone's documentation! In general ipytone closely follows the Tonejs API so checking Tonejs API documentation is useful for ipytone too.
|
Beta Was this translation helpful? Give feedback.
-
Ah, the logic is a lot clearer now -- thanks for the suggestion @benbovy! I gave this a try, and the updated audio graph is as follows:
This looks correct to me: Player is connected to Multiply, the oscillator is connected to the multiplication factor, then Multiply is connected to the speaker. However after calling
Wondering if the repetition of Param is causing this somehow? |
Beta Was this translation helpful? Give feedback.
-
EDIT: I don't think the |
Beta Was this translation helpful? Give feedback.
-
The My final audio graph:
I also didn't have to convert the output of Multiply back into the [-1, 1] range. The |
Beta Was this translation helpful? Give feedback.
-
Hi! I've been trying to use ipytone to replicate a simple Max patch that multiplies an input signal by a second control signal. In Max, this is done with a signal multiplier-operator. It seems like a similar result could be achieved with
ipytone.Multiply
, but I can't figure out how to pass the input and control signals to it, or how to hear the output.I tried the following, where the input signal is
player
, the control signal isosc
and an instance ofipytone.Multiply
ismult
:Checking the audio graph's connections gives me the following:
If I try to run
osc.start()
andplayer.start()
, I hear both signals in parallel (i.e., not being multiplied and played as a single signal). However, trying to runmult.start()
gives an error message "'Multiply' object has no attribute 'start'". Any advice on how to get this working would be greatly appreciated!Beta Was this translation helpful? Give feedback.
All reactions