. new module '120 avFX' loaded to public module library
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    . new module '120 avFX' loaded to public module library

    by anomad » Thu Jan 07, 2010 5:04 am

    . this is a test a module i wrote that modulates two different effects based on user selectable audio bands. i programmed in a high/low range for the effect parameter being modified to prevent the original video getting completely lost. the effect definitions (fxList[]) and modulation ranges (fxMod[]) are defined in Init() if you want to change/delete any of them.

    . you can dial the audio band (0-22) and the effect or hit the 'random' button and it will choose two effects from the list (below) click 'reset' to turn off the effects.

    . you will need modul8 v2.6 and os X 10.5+ for some of the core image (CI) effects and Pete's Plugins for the free frame effects.

    . here's a video of me using the random button on 120 avFX (and misspelling 'origInal' :oops: ) - i did have trace on ~ 30% and sometimes the effect combinations don't work together very well (esp. the last few seconds). the source clip was originally created w/this module, then rendered to it's own file.

    http://vimeo.com/8585518

    . the following is a list of fx i coded into the module and the parameter that's modulated :

    (CI) Pixellate - Scale
    (CI) Circle Splash Distortion - Radius
    (FF) SpiralBlur - Layer Count
    (FF) Kaleidascope - Source Angle Pro
    (CI) Bump Distortion - Scale
    (CI) Circular Screen - Width
    (CI) Edge Work - Radius
    (CI) Eightfold Reflected Tile - Width
    (CI) Hexagonal Pixellate - Scale
    (CI) Glass Lozenge - Radius
    (CI) Glide Reflected Tile - Width
    (CI) Hole Distortion - Radius
    (CI) Kaleidoscope - Angle
    (CI) Op Tile - Angle
    (CI) Sunbeams - Sun Radius
    (CI) Torus Lens Distortion - Radius
    (CI) Triangle Tile - Angle
    (FF) Posterize - Levels
    (FF) Refraction - Cell Width

    . please enjoy! any feedback/suggestions/code improvements appreciated!

    -james
    (a nomad. )
  • ilan

    by ilan » Thu Jan 07, 2010 12:12 pm

    Good work. Fun little demo as well.
  • te-c
    super8 member
    Posts: 173
    Joined: Tue Jun 09, 2009 5:05 pm
    Location: Frankfurt am Main / Germany
    Contact:

    by te-c » Thu Jan 07, 2010 8:52 pm

    This is so awesome. Thanx a lot
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    by anomad » Thu Feb 18, 2010 3:06 pm

    . more 120avFX noodling around

    . http://vimeo.com/9540479

    . enjoy!


    -james
    (a nomad. )
  • mowgli_uk
    master
    Posts: 464
    Joined: Tue Nov 15, 2005 10:43 pm
    Location: LONDON

    by mowgli_uk » Fri Feb 19, 2010 6:08 pm

    I'll check it out, it looks great, thanks a lot!
  • Vibber
    super8 member
    Posts: 166
    Joined: Tue Sep 20, 2005 1:02 pm

    by Vibber » Fri Feb 19, 2010 7:47 pm

    Nice work. Very useful module - thank you so much!
  • workhouse
    member
    Posts: 35
    Joined: Mon Oct 05, 2009 9:10 pm
    Location: LA
    Contact:

    by workhouse » Fri Mar 19, 2010 10:04 pm

    wow! what a great mod really well done!
    i had often found that tiles/kalidascope kinda fx
    were all or nothing , like you said
    as nice as they are,they lost too much of the
    original contents essence
    but with a little tweeking and your fab mod
    you can make some astounding effects

    well done!
  • chindogu
    junior Member
    Posts: 7
    Joined: Fri Jan 23, 2009 7:45 pm

    well done

    by chindogu » Tue Mar 23, 2010 2:38 am

    works really nice!!
  • lamepantallas
    ultim8 member
    Posts: 203
    Joined: Sun Apr 15, 2007 1:09 am
    Location: Berlin
    Contact:

    by lamepantallas » Tue Mar 23, 2010 10:19 pm

    very nice! fast access!
    No se quien soy, pero se de que huyo. M.Montaigne
    Twitter: @popversus / @esegabbo
  • User avatar
    orion
    super8 member
    Posts: 153
    Joined: Thu Aug 18, 2011 12:29 am
    Location: austin
    Contact:

    Re: . new module '120 avFX' loaded to public module library

    by orion » Sat Oct 29, 2011 1:31 am

    Bueno .nomad, I love this module.

    I'm doing a couple mods on the fxMod parameters and i'm wondering if it's possible to have more than one? If so, what's the syntax i would need to use, i've just started reading up on python so i'm new to the methodology and still curious.

    So far i've tried:
    fxMod[19] = {'NAME' : 'Style', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' } } : {'NAME' : 'Example', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' } }

    doubling
    fxMod[19] = {'NAME' : 'Style', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' } }
    fxMod[19] = {'NAME' : 'example', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' } }

    trying to insert
    fxMod[19] = {'NAME' : 'Style', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' }, 'NAME' : 'Style', 'PARAMS': {'low' : 0.1, 'high' : 0.8, 'default': 0, 'type': 'real' }

    to no avail.
    Would i need to change something in the PeriodicalEvents(elapsed)? say:
    if fxActive[0] or fxActive[1] :
    to
    if fxActive[0] or fxActive[2] :
    maybe?

    Thanks for the module!
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    Re: . new module '120 avFX' loaded to public module library

    by anomad » Sat Oct 29, 2011 5:15 am

    . orion,

    . yes, it is possible to modulate more than one parameter, but that would require some additional coding.

    . the values for fxMod (the high and low values) and useFX (which effect that is currently being used) are set in MessageEvent()
    . for example, if we use effect 5 -

    fxList[5] = {'FILTER': '(CI) Circular Screen', 'PARAMETERS': {'Width': 0.385, 'Center Y': 0.5, 'Center X': 0.5, 'Sharpness': 0.565}}
    fxMod[5] = {'NAME' : 'Width', 'PARAMS': {'low' : -0.2, 'high' : 0.6 , 'default': 0.4, 'type': 'real'} }

    . based on the 120 avFX module - most of the work is done in PeriodicalEvent() -

    Code: Select all

       if fxActive[0] :
          modVal[0] = (  (fxMod[useFXindex[0]]['PARAMS']['high'] - fxMod[useFXindex[0]]['PARAMS']['low'] ) * mod0 + fxMod[useFXindex[0]]['PARAMS']['low'] )
          modName[0] = fxMod[useFXindex[0]]['NAME']
          useFXlist[0]['PARAMETERS'][modName[0]]= modVal[0]


    . i have the two arrays of dictionaries (which i've since moved towards a single dictionary definition for effects ) that are associated by their index (5, in this case)

    . fxMod[] - give the name of the parameter for the effect (called modName[0] above) -Width - and my high and low values. the above code calculates the range of values to be used and sets the value of that parameter.

    . when doing effects, the basic flow is: update the effect values, clear the effects, push the new effect parameters into the effect -

    Code: Select all

    ##
    ## clear and update effects
       modul8.setFilters([{},{}],0,False)
       modul8.setFilters(useFXlist,0,False)


    . so, to answer your question (finally :) ) - if you were modifying the 120 avFX module, you could create another array - with the second parameter you want to modulate... .ie,

    fxList[5] = {'FILTER': '(CI) Circular Screen', 'PARAMETERS': {'Width': 0.385, 'Center Y': 0.5, 'Center X': 0.5, 'Sharpness': 0.565}}
    fxMod[5] = {'NAME' : 'Width', 'PARAMS': {'low' : -0.2, 'high' : 0.6 , 'default': 0.4, 'type': 'real'} }
    fxMod2[5] = {'NAME' : 'Sharpness', 'PARAMS': {'low' : 0.1 , 'high' : 0.6 , 'default': 0.4, 'type': 'real'} }

    . then add code into the topmost block i quoted to adjust the second parameter (Sharpness in this example)

    . remember the 'NAME': part in fxMod isn't arbitrary, it must be a parameter in the effect definition. for some effects, like Pixellate - you might only have one parameter you wish to change -

    fxList[0] = {'FILTER': '(CI) Pixellate', 'PARAMETERS': {'Center X': 0.5, 'Scale': 0.075, 'Center Y': 0.5}}
    fxMod[0] = {'NAME' : 'Scale', 'PARAMS': {'low' : 0.0, 'high' : 0.2, 'default': 0.075, 'type': 'real'} }

    . so, if you did the fxMod2[0] method, you might set the name to 'NONE' so it will be ignored...

    fxMod2[0] = {'NAME' : 'NONE', 'PARAMS': {'low' : 0.0, 'high' : 0.2, 'default': 0.075, 'type': 'real'} }

    . then the above code could be changed to

    Code: Select all

       if fxActive[0] :
          modVal[0] = (  (fxMod[useFXindex[0]]['PARAMS']['high'] - fxMod[useFXindex[0]]['PARAMS']['low'] ) * mod0 + fxMod[useFXindex[0]]['PARAMS']['low'] )
          modName[0] = fxMod[useFXindex[0]]['NAME']
          useFXlist[0]['PARAMETERS'][modName[0]]= modVal[0]

                    if fxMod2[usFXindex[0]['NAME'] != 'NONE' :
                           myMod2Val =  (  (fxMod2[useFXindex[0]]['PARAMS']['high'] - fxMod2[useFXindex[0]]['PARAMS']['low'] ) * mod0 + fxMod2[useFXindex[0]]['PARAMS']['low']
                  myMod2Name = fxMod2[useFXindex[0]]['NAME']
                       useFXlist[0]['PARAMETERS'][myMod2Name]= myMod2Val


    . (basically - i just typed that in so there might be a minor typo or formatting issue)

    . fxActive[0] and fxActive[1] are just True/False values to let the system know if they need to update the values or not. i figure it saves a few CPU cycles to not keep updating an effect that isn't currently active.

    . let me know if you have any questions

    -james
    (a nomad. )

Who is online

Users browsing this forum: No registered users and 9 guests