turn on/off a module thru script
  • undone
    junior Member
    Posts: 3
    Joined: Tue Sep 23, 2008 9:39 am

    turn on/off a module thru script

    by undone » Wed Nov 26, 2008 3:35 pm

    hey all,
    id like to know if it is possible to turn off a running module
    (example bpm router_master) thru the modul8 scripting utility.

    id like to push a key,(or receive a midi message) the new media gets loaded and bpm_router master stops!, when i release the key(midi message stops) the bpm_router_master continues.

    is this possible or am i dreaming about a future gadget :)?

    also i would like to call a function from the filter(layer) module
    for example: activate "dot screen" thru another module by clicking on a button/toggle.

    any suggestions and help is apprechiated.
    cheers alot
    reto
  • User avatar
    zoophar
    activ8 member
    Posts: 81
    Joined: Sat Oct 20, 2007 1:33 pm
    Location: geneva / Berlin
    Contact:

    by zoophar » Tue Dec 02, 2008 10:12 am

    Hello there !!!

    I'm not shure if this works but should try...

    the m8m is an xml textfile doc...
    each modules has the line:
    <key>SCRIPT_STATE</key>

    for this line, the statement is:
    <string>STOPPED</string>
    <string>PLAYING</string>

    in the module tutorial, (VS) talks about loading a file....

    python allows to manipulate textfiles with some precompiler functions:
    ob_fichier= open(filename,'r') (opens a file in read mode, filename as the path)
    ob_fichier= open(filename,'w') (opens a file in write mode, filename as the path)

    obFichier.readlines() (reads one line at a time)
    obFichier.write('the string to write in the file')


    ob_fichier.replace( 'STOPPED', 'PLAYING' ) (replace 'STOPPED' BY 'PLAYING')


    hopr this will help
  • User avatar
    zoophar
    activ8 member
    Posts: 81
    Joined: Sat Oct 20, 2007 1:33 pm
    Location: geneva / Berlin
    Contact:

    by zoophar » Tue Dec 02, 2008 10:15 am

    for french modul8ters:
    here is a hansdy little pdf file that helps when programming python....

    http://www.framasoft.net/article1971.html

    enjoy

Who is online

Users browsing this forum: No registered users and 28 guests