No announcement yet.

Solid SSC

  • Filter
  • Time
  • Show
Clear All
new posts

  • Solid SSC

    "How to do a solid Superscope (with color gradients)?"

    Since I received this question via e-mail three or four times during the last weeks I decided to post this one here:
    Whats helpfull with tries to fill larger areas of the screen is the length of one pixel in screen-coordinates. This is for width wpix = 2 / w and for height hpix = 2 / h

    To fill an horizontal SSC all you need is to draw a line to a music value in y then make the next point go one pix right on x and back down to zero on y and then go for the next music value and so on.

    So every music value needs two points to be completed which leads to n = w * 2

    All values need to be set in FRAME since they are affected by changes in screen-resolution i.e. by switching from windowed to fullscreen mode.

    All we need now is a switch which makes the two steps ( music value and then back to zero ) happen ( ct in the following example ).

    Gradients in a SSC simply could be achieved by using the sine of i on setting the colors.

    So here's the complete basic solid-gradient-SSC setup:

    wpix = 2 / w ;
    n = w * 2;
    xp = -1 ;
    ct = 0 ;
    fr = fr + 0.02

    ct = bnot ( ct ) ;
    vv = if ( ct , getosc (i , 0.1 , 0 ) , 0 ) ;
    xp = if ( bnot ( ct ) , xp + wpix , xp ) ;
    x = xp ; y = vv ;
    red = abs ( sin ( i * 2 + fr ) ) ;
    green = abs ( sin ( i * 3 + 2 * fr ) ) ;
    blue = abs ( sin ( i * 4 + 3 * fr ) )

    The look of the SSC is changed by manips of the second line in point. Check out these for example:
    vv = if ( ct , getosc (i , 0.1 , 0 ) , - vv ) ;
    vv = if ( ct , - getspec (i , 0.1 , 0 ) , 0 ) ;
    vv = if ( ct , getspec (i , 0.1 , 0 ) , - vv ) ;

    The gradient here is very simple. To make it more random you may wish to setup some beat reaction like this:

    b1 = rand ( 20 ) / 100 - 0.1 ; i1 = rand ( 6 ) ;
    red = sin ( i * i1 + f1)

    Have fun in experimenting with this basic setup.

  • #2

    realized too late that there is already a threat on this started by montana38.

    So I tried to delete this here and add it to Montanas thread but access to deletion was denied...


    • #3
      I think a couple of things in this post can be misleading. First of all, the maximum number of v returns is 576. Any more will extend v slightly when i=1 (adding a 'tail').

      Also, I think that calling a function rather than using an operator is a bit slower; bnot(a) can be replaced with 1-a.

      Umm...I think that's all (for now)
      "guilt is the cause of more disauders
      than history's most obscene marorders" --E. E. Cummings


      • #4
        Ok, I see the little tail but only with getspec...
        What helps is perhaps stopping i before getting close to 1:

        vv = if ( ct , - getspec (i * 0.9 , 0.1 , 0 ) , 0 ) ;


        • #5
          I found this out a while ago: 'render > simple' only draws the first 100 of the 288 samples. For the spectrum this is okay, because the higher frequencies tend to be low, but there's no reason to do it for the oscilloscope.


          • #6
            288 samples

            I'll try to write an simple.ape that display all 288 samples instead of 100...I'm not a very good avs maker, but maybe that will help you...
            Get more APEs


            • #7
              I wrote an ape for that a while ago, but I never released it. I wrote it as a short test for my C implementation of getspec and getosc... I noticed AVS showed a lot less data than mine, and figured it out.
              It's not that bad though and nobody's noticed up until now.


              • #8
                Hmm, my setup is a little bit complicated ( I tend to use if-constructions even if there's a more math-way to do it). Here is a more simple and faster way to do the thing I saw in a preset made by AVS-King ( David Hansen ).



                y=getosc(i,0.03,0)* s;

                or for a mirrored scope:



                • #9
                  For mirrorred bouncing to fill a solid SSC, I tend to use 'var=-var' and initialise it to '1'. That's probably faster than (s*2-1) and bnot.


                  • #10
                    i use this base for solid scopes:


                    x=i*2-1; y=s*2-1;

                    this will give you a "fullscreen" solid superscope
                    ok, here's the problem, i've noticed that the "solid scopes" isn't as solid when you use i*2-1 or whatever, iuf you use the base i use then you'd see some one pixelline spaces, that's because the "solid ssc" are spirals and you don't notice if you don't multiply i with a variable/number but if you multiply it and you see this spiral. a way to fake fullscreen is this superscope


                    x=i; y=s*2-1;

                    and a r2l mirror. (ok, thing i said is kinda known by others, but just want to state the probs with solid superscopes)


                    • #11

                      I do not get pixelines at all. I think what's important is to set n = w * 2 and do this in FRAME to make shure n is always twice the screen width. It is important to do this in FRAME and NOT in INIT since INIT is only done once on startup and then never again even if the user switches from windowed to fullscreen mode which may differ in width.


                      • #12
                        Yeah! I've finally found the thread I was looking for. I had been trying to make a ssc which would look like the solid simple spectrum render but have faild due to my stupidity and lack of experience Now... I've tested every solution posted here: they are grate, unfortnately don't work the way I'd like them to. Ok what I mean is: if I set render mode to 10 pixels and add a solid simple spectrum render it looks quite nice. But that doesn't seem to work with any of the examples posted in this thread. What I get this blocky type simple (which I'm aiming for) but every block is finished with a short, thin line (which I am not aiming for ) Is there a way of getting rid of it? Thanks of any kind of reply.


                        • #13
                          Note that this thread is a bit outdated. You can probably do more effecient solid scopes using the newer AVS features like skip. Many of the optimization tips in code here are also not valid anymore due to changes in evallib behaviour.

                          I suggest you post your preset in a new thread so people can look at it.


                          • #14
                            You can also use this. Its incomplete, but I will fix it up when I get some time.
                            Attached Files


                            • #15
                              i think you should fix it before you post it
                              NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset