Skip to content
Forum Archive

getosc & getspec

15 posts

UIUC85#

getosc & getspec

Ok so I'm assuming you use these to get certain values of v at specified spots on the scope and what not, but what do all the parameters mean?
UnConeD#
Read the fricking AVS help. Sheesh.

getosc(band,width,channel)
= returns waveform data centered at 'band', (0..1), sampled 'width' (0..1) wide.
'channel' can be: 0=center, 1=left, 2=right. return value is (-1..1)

getspec(band,width,channel)
= returns spectrum data centered at 'band', (0..1), sampled 'width' (0..1) wide.
'channel' can be: 0=center, 1=left, 2=right. return value is (0..1)
S-uper_T-oast#
I think he was asking for a more in depth about what the different things inside the parenthesis mean.
Band=Position along the Waveform or Spectrum Data=0 for lowest frequencies, 1 for highest frequencies.
Width=Width of the Waveform of Spectrum Data being used around the set point in band=0 for just the data at band, 1 for the whole set of data
channel=channel your listening to=0-center, 1-left, 2-right
UnConeD#
You can just make a x=i*2-1;y=getosc(...); scope and experiment with all the options. Last time I checked, AVS didn't explode when I tried out new stuff.
UIUC85#
Yeah thanks for that unconed, real nice. Anyways, you've been quite helpful Super Toast, thanks.
S-uper_T-oast#
No problem, but UnConeD does have a point, like for myself I learn better when I do it myself, but that is just me, glad I could help you.
Deamon#
does v equal getosc(i,0,i)? I believe it does, since I tried by overlaying them, though some certainty is never wrong 😉.
UnConeD#
Deamon: the third parameter should only be 0, 1 or 2, nothing else. Using 'i' means it's rounded, and that it uses the center channel for the left half, and the left channel for the right half.
Deamon#
getspec or getosc depending on which input type (waveform or spectrum) you select, I assume?
Nic01#
Nope. They're totally independent of the osc/spec selection.... that one is perfectly restricted to v.
SSC by default is set to waveform, so v is getosc(i,0,0) by default, getspec(i,0,0) if you choose so.
anubis2003#
although if I remember correctly, there is still a difference between v and get***(i,0,0). I believe that they don't work with the exact same part of the spectrum(may be wrong).
S-uper_T-oast#
Your right anubis, I did some equal() tests and they never would equal each other, but the rounded, (ceil or floor or |0 values), would equal each other.