Forums > Gen

fm in gen~ | self modulation

May 16, 2013 | 12:18 am

hi,

i want to do a selfmodultion of an carrier oscillator in gen~. for now i feed the output of a cycle object into an history object, multiply it by a mod intensity value and from there i go back into the cycle inlet. but this doesn´t seem to work.

maybe someone can explain how feedback can used for selfmodultion in gen. i append a small patch showing the standard max version of a selfmod fm and a gen version which doesn´t work yet.

thanks, johannes

<pre><code>

– Pasted Max Patch, click to expand. –

</code></pre>

 

 


May 16, 2013 | 11:39 am

I think it actually is working. You can verify by sending out the frequency input out a second outlet and watching the value with number~. If you set selfmodint to 0, there’s definitely a difference compared to a value of 100 for example.

It won’t sound like the send~/receive~ version because history is a single sample delay and s~/r~ are vector sized delays.

if you use [delay] instead, you can vary how the feedback happens. Setting a delay equal to vectorsize will give you the same as the s~/r~ network.


May 16, 2013 | 3:18 pm

thanks wesley, thats it!

to understand: in my original patch the delay, used by the history object, was "to small" (1 sample) in order to create the feedback, no? so it is because of the rate difference at which sound gets processed  in gen (1 sample) and the msp ( signal vector size)?

 


May 17, 2013 | 10:30 am

The defining feature of gen~ is that you can do single sample feedback. In your original gen patcher, feedback was working, but you weren’t hearing much of a difference because the change due to feedback was minute.


May 17, 2013 | 12:13 pm

why minute? could you please elaborate …


May 18, 2013 | 10:42 am

A single sample delay [history] is not going to audibly alter a signal in an extremely noticeable way beyond sounding like a basic low pass filter.


May 19, 2013 | 5:38 am

yeah, switch out the [history self] with a [delay 100] and it’ll be mental.


May 19, 2013 | 9:58 am

A single sample delay [history] is not going to audibly alter a signal in an extremely noticeable way beyond sounding like a basic low pass filter.

no, this really depends on the context. and in the context of a feedback oscillator having a one sample delay is just fine. although being able to introduce longer delays will give you the possibility for some nice chaotic sounds of course.

to make the whole thing a little sharper i would switch to phase modulation, which is basically the same as fm, but has the advantage of a stable base frequency until the mod index is too high and the oscillator freaks out.
and inserting a lowpass filter inside the feedback chain will prevent heavy oscillation around nyquist with higher feedback amounts.

<code>

– Pasted Max Patch, click to expand. –

</code>


May 19, 2013 | 1:13 pm

thanks for the feedback, guys.

volker, very good that you mentioned phase modulation. i already had in mind but could understand how to effect the phase in gen. your patch is great to see how it can be done.

regarding fm/pm: is there an efficient way for dynamic routing of different operators in gen… like matrix~ object? (maybe another thread)


May 20, 2013 | 12:15 am

Not as such, but there are ways of faking it via buffer/data.


May 21, 2013 | 1:34 pm

hi peter, how would that work in detail?


May 21, 2013 | 1:54 pm

You could use a buffer/data as a place to store values. It’s more powerful than a variable because you can choose which index to read from/write to.

Short on time today, but will try to come up with an example.


June 3, 2013 | 10:54 am

peter,  if you find some time than …  just that i get an idea how to create matrix~like stuff in gen~. thanks!


August 5, 2013 | 7:44 am

Hi all,

I also need a way to implement a matrix~ like function in gen~, for the reason mentioned above (single sample delay in the feedback loop). I roughly understand that a buffer~ is a good way to send all the commands to the gen matrix (so that one do not need for example 100 params for a 10×10 matrix). The question is about the matrix itself: is a bunch of multiply and lowpass (for rampsmooth) objects the only way to do that? Then again, for a 10×10 matrix, one would need 100 multiplications, 100 lowpass filters, plus all the mixes and the patch cable. Kind of discouraging…

My idea would be to do that in a genexpr codebox, using nested loops that read into a buffer to get the required coefficients, and write into another buffer the current values of the coeffs (because of ramps, the current value of the coeffs may differ from the orders). As far as I understand from gen and from the doc I read, I’m not 100% sure it’s feasible. Can someone confirm me that it’s the case? So that I don’t spend 30 hours trying to square a circle. :)

Thanks,

Alexis


Viewing 14 posts - 1 through 14 (of 14 total)