Forums > MaxMSP

basic DSP conundrum

Oct 14 2013 | 10:27 am

while reviewing a recent "solution" (HA!) I submitted to someone re smoothing Arduino data, I noticed an error in my patch. I used [noise~] as a dummy source, and I incorrectly assumed that adding a (control) signal to this noise would allow that noise to persist throughout the control signal’s range. But, and I’ve found this in other contexts too, if you add a signal value to the output of [noise~], the range of noise will shrink as the control signal increases; add nothing and noise will randomly oscillate between -1. and 1. but adding an increasing value to the noise will shrink the noise range. I am SURE this is elderly n00bosity on my part; the attached patch demonstrates what I mean:

-- Pasted Max Patch, click to expand. --


It is less noticeable if the noise source is, say, [pink~] or [rand~ 200]. But why should this be. This is something of a WTF moment for me.


Oct 14 2013 | 11:21 am


-- Pasted Max Patch, click to expand. --


Oct 14 2013 | 11:35 am

Ah, I’m not such a n00b then, it’s the behaviour of [scope~]?


Oct 14 2013 | 11:36 am


Oct 14 2013 | 11:38 am

I’m going crazy. I tried to post a patch here for about 10 times.(is my patch too big? wtf.. an error message would be great then.)
I built a scope that shows correct display, I can send it to you if you like.
the multislider seems to show too regular patterns here.. som to me it seemed [snapshot~]/[multislider] also had a problem.(?)

Oct 14 2013 | 11:41 am

hm. and I can’t post just a picture without text, is that so? hm..yay new forum, yayii..

  1. Bildschirmfoto-2013-10-14-um-20.33.21


Oct 14 2013 | 11:41 am

woyteg, this clearly illustrates my error in understanding, and also shows that (in theory) my original solution to the other post I mention is actually ok

Cheers mate

Oct 14 2013 | 11:49 am

there are dozens of similar situations where the use of white noise or sinewaves as an example audio source will give you weird results, or results which at least look weird.
i recommend to use a set of femal voice, drumloop, and saw synth as testing material. :)

Oct 14 2013 | 11:52 am

Quite true I guess but I dare to claim this clearly just is a bug of scope.

Oct 14 2013 | 11:54 am

[scope] is a quite weak oscilloscope anyway. I never quite trusted it, which is why I wanted to share my own version, but it didn’t work.

Oct 14 2013 | 12:17 pm

The accuracy of scope~ is much better in this situation if you shrink the "calccount" value. Scope~ has its own effective sampling rate, with all the fun things that come with that. I’m not sure why that particular rate was so bad with the display, but setting calccount to 2 seems to give decent results.

I often use minmax~ to verify the range of values just in case there’s something off the chart that I might miss.

-- Pasted Max Patch, click to expand. --


Oct 14 2013 | 12:20 pm

ah of course.. thanks, thanks also for the minmax~ hint!

Oct 14 2013 | 12:21 pm

Yes, I made use of average too, just to prove that my reliance on scope was wrong:

-- Pasted Max Patch, click to expand. --


Thanks everyone


Oct 14 2013 | 12:25 pm

– – – did I miss something in the docs that explains calccount’s relationship with buffer size? It seems a bit, well, quirky or at least opaque. Although Peter et al clearly get it : )

Oct 14 2013 | 12:28 pm

If you go to the inspector of scope~ you can see "calcount, samples per pixel"

Oct 14 2013 | 12:33 pm

I know this is a shot in the dark, but I recall long ago (in the mists of 4.0) that someone posted a [scope~] example that "auto-adjusted" these parameters dependent on the frequency of the input, so that the display was always stable.

Anyhoo, I’m just rambling now . . . where are my slippers by the way . . . in my day . . . . .


Oct 14 2013 | 12:40 pm
-- Pasted Max Patch, click to expand. --


Oct 14 2013 | 1:58 pm

Matthew Davidson also made one for the BEAP library, if that’s helpful.

Oct 14 2013 | 2:51 pm

Just wondered if there’s any advantage in using plot~ over scope~. What do you think? I use plot~ sometimes because it looks nicer! it can also display more than one signal which is actually useful.

Oct 14 2013 | 2:57 pm

I don’t know if you saw the screenshot of my "scope" which is made with plot.
I was in the need of it since I really wanted to plot stuff sample by sample for a bacheours thesis.
But in general I find it really handy to see the individual samples rather than some interpolating line connecting the points.(also if you don’t care much, sometimes samples, little spikes, impulses etc get lost)
Also I really missed the possibility to trigger [scope~] with a signal that is not the signal to be drawn. What’s often called external trigger at oscilloscopes.

Oct 14 2013 | 11:50 pm

Yes, I did see it – that’s what made me ask. People here don’t seem to talk about plot that much, though it does seem very flexible. I wish it did XY display for audio though.

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

Forums > MaxMSP