Paint (Layer) Module map the speed function ?
  • User avatar
    pele2010
    ultim8 member
    Posts: 284
    Joined: Sat Apr 10, 2010 8:16 pm
    Location: Hamburg, Germany
    Contact:

    Paint (Layer) Module map the speed function ?

    by pele2010 » Fri Jan 02, 2015 1:17 am

    Hi,

    i was trying to map the "speed" function to a midi controller. But the "speed" function has no keyword.

    it´s only named animspeed and it´s located in


    init
    animSpeed = 0

    MessageEvent
    elif msg=='animspeed':
    animSpeed = param['value']


    deserialize
    if 'ANIMSPEED' in inDict:
    animSpeed = inDict['ANIMSPEED']
    module.setValue('animspeed',0, animSpeed)

    As the paint module is already a module i was asking myself if it´s possible to include "code"
    so it addresses the correct "rotary" knob.

    or do i need to programm a module for the controller and insert there the code ?

    and how are such controls addressed ?

    thanxs

    pele2010
    www.instagram.com/pele2010/
    #eachfilm01
    #pele2010
    Act without doing; work without effort. Think of the small as large and the few as many. Confront the difficult while it is still easy;
    accomplish the great task by a series of small acts.
    www.eachfilm.de
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    Re: Paint (Layer) Module map the speed function ?

    by anomad » Mon Jan 05, 2015 4:23 am

    . i'm not sure i understand what you're asking…

    . you can 'command-shift-M' and click the 'speed' control in the Paint module and assign it to any incoming MIDI signal.

    . if you want to address the 'speed' control in the module, you would use :

    module.setValue('animspeed',0, animSpeed)

    . you can tell it isn't a Modul8 keyword b/c it uses module.setValue instead of modul8.setValue



    -james
    (a nomad. )
  • User avatar
    pele2010
    ultim8 member
    Posts: 284
    Joined: Sat Apr 10, 2010 8:16 pm
    Location: Hamburg, Germany
    Contact:

    Re: Paint (Layer) Module map the speed function ?

    by pele2010 » Mon Jan 05, 2015 10:13 am

    Hi thanks ,

    you are right. mapping it to a midi device works.

    but i can´t map it to the bpm router. I would like to animate the "pos" with changing values.

    or changing values that are linked to color.

    the BPM Router can´t pick the pos. or the speed.

    module.setValue('animspeed',0, animSpeed)


    so i need to build a module with a knob , right?

    thanks a lot

    pele2010
    www.instagram.com/pele2010/
    #eachfilm01
    #pele2010
    Act without doing; work without effort. Think of the small as large and the few as many. Confront the difficult while it is still easy;
    accomplish the great task by a series of small acts.
    www.eachfilm.de
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    Re: Paint (Layer) Module map the speed function ?

    by anomad » Mon Jan 05, 2015 4:15 pm

    . i think what you're asking is getting into inter-module communications… (something i never really researched very much…)

    . so, i looked around and i think the short answer you might be able to do it w/a little work on the Painter module…

    . right now, Painter just reads the value from the animSpeed knob (that is local to Painter) and keeps that value in the module. you would need to change the Painter module to read the sharedDict['ANIMSPEED'] value (in Periodical Event, would probably want to update the control in the module as well) and write to the sharedDict['ANIMSPEED'] value in MessageEvent when the knob was changed - then any module could control the speed (or position) of the animation by writing to the sharedDict

    . to use it w/BPM Router, you would have to add the ability to used dictionary values (and not just UI elements)

    -james
    (a nomad. )

Who is online

Users browsing this forum: No registered users and 9 guests