Edit Filter with a Module
  • Spjoni
    junior Member
    Posts: 6
    Joined: Fri Jul 03, 2009 2:59 pm
    Location: Zurich
    Contact:

    Edit Filter with a Module

    by Spjoni » Thu Jun 21, 2012 4:14 pm

    Hello Everybody

    I want to connect the LB-SmoothChanges Module to the Radius from the FilterEffect HoleDistortion.
    For the reason, that the Hole grows smooth... I trigger the HoleRadius with OSC and this is to jumpy. If i will set the smoother between... that would work, but i dont know if this is possible...

    Can anyone tell me, if a can Connect a Filter with a Filter/Module?

    Thank you so much!
    Spjoni
    www.projektil.ch
    visual-art-entertainment
  • User avatar
    The Midi Thief
    master
    Posts: 483
    Joined: Thu Sep 29, 2005 7:19 pm
    Location: Stockholm, Sweden
    Contact:

    Re: Edit Filter with a Module

    by The Midi Thief » Sat Jun 23, 2012 8:35 pm

    Nope. You have to code your own module or alter the code of the LB-SmoothChanges Module to connect to the FilterEffect HoleDistortion. It's probably just a few lines of code but there are other people here that have dealt with the filters more that probably can give you a better reply.
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    Re: Edit Filter with a Module

    by anomad » Sun Jun 24, 2012 7:47 pm

    . i've worked w/some filer effects in modules (120 avFX) so maybe i can offer some insight...

    . as i understand the effects system, you basically update the effect information, clear the filters, then push the changed effects into the filters...

    . so, you want to use : {'FILTER': '(CI) Hole Distortion', 'PARAMETERS': {'Center Y': 0.5, 'Center X': 0.5, 'Radius': 0.0}}

    . quick sidebar - how did I know the definition? i edit the 'Filter (layer)' module and have it print out the effects being used...

    . in the 'Filters (layer)' module, in Init() towards the bottom - uncomment the '##print filters' line and Cmd-Option-O to see the output

    Code: Select all

    def setFilters():
       filters = [{},{},{},{}]
       for i in range(0,4):
          if enabledPass[i]:
             filters[i] = filtersPass[i]
       modul8.setFilters(filters, 0, postFilters)
       
       ##print filters             <------- uncomment this line!

    # Last initializations


    . i would suggest re-commenting that line once you get the definitions so you don't waste resources printing stuff out.

    . ok, so now you have a dictionary item of your effect...

    . in Init()

    Code: Select all

    myFx =  {'FILTER': '(CI) Hole Distortion', 'PARAMETERS': {'Center Y': 0.5, 'Center X': 0.5, 'Radius': 0.0}}


    . somewhere in your code, you want to assign the variable that is doing the smoothing to the myFx['PARAMETERS']['Radius']

    . then in PeriodicalEvent() something like

    Code: Select all

       myFx['PARAMETERS']['Radius'] = varThatIsSmoothing
       modul8.setFilters([{}],0,False)
       modul8.setFilters(myFx,0,False)

    . good luck! :)

    -james
    (a nomad. )

Who is online

Users browsing this forum: No registered users and 23 guests