Sound Viewer module CPU usage (2.5.2)
  • 3Din2D
    member
    Posts: 12
    Joined: Thu Feb 15, 2007 8:52 pm

    Sound Viewer module CPU usage (2.5.2)

    by 3Din2D » Thu Mar 01, 2007 6:04 am

    We've been designing a new module and noticed that modules can take a considerable amount of CPU when enabled.

    The '(vs) Sound Viewer (Tool)' module for example adds 10% to modul8's CPU consumption on a 2GHz G5 CPU just for monitoring audio. Is this normal?
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    Re: Sound Viewer module CPU usage (2.5.2)

    by yves@garagecube » Fri Mar 02, 2007 9:37 am

    3Din2D wrote:We've been designing a new module and noticed that modules can take a considerable amount of CPU when enabled.

    The '(vs) Sound Viewer (Tool)' module for example adds 10% to modul8's CPU consumption on a 2GHz G5 CPU just for monitoring audio. Is this normal?


    It depends of what your module is doing, especially in the "Periodical" script. This script is called typically at 60HZ and if you are doing a lot of processing it may take a lot of CPU.

    Something you can do in your module is to put a timer based on the Periodical elasped value and call your function every X milliseconds instead of at each render tick.

    Now I did a lot of optimization for the soon to be released V2.5.3 which reduces the overhead of the module, especially when you have a lot of controls. Hopefully it will help.

    Yves.
  • 3Din2D
    member
    Posts: 12
    Joined: Thu Feb 15, 2007 8:52 pm

    Re: Sound Viewer module CPU usage (2.5.2)

    by 3Din2D » Sat Mar 03, 2007 2:42 am

    yves@garagecube wrote:
    3Din2D wrote:We've been designing a new module and noticed that modules can take a considerable amount of CPU when enabled.

    The '(vs) Sound Viewer (Tool)' module for example adds 10% to modul8's CPU consumption on a 2GHz G5 CPU just for monitoring audio. Is this normal?


    It depends of what your module is doing, especially in the "Periodical" script. This script is called typically at 60HZ and if you are doing a lot of processing it may take a lot of CPU.

    Something you can do in your module is to put a timer based on the Periodical elasped value and call your function every X milliseconds instead of at each render tick.

    Now I did a lot of optimization for the soon to be released V2.5.3 which reduces the overhead of the module, especially when you have a lot of controls. Hopefully it will help.

    Yves.


    Ok, although the module I refer to above is supplied with modul8.
    In a strange turn of events I'm working with the guy who did the review and the programmer dude from the collective and we'll be releasing a module that will add a certain hardware device ;)
    Is there any documentation we can use in reference to the Python scripting? A lot of the code was figured out by the programmer 'hacking out' bits of code from other modules.
  • User avatar
    boris
    garageCube team
    Posts: 911
    Joined: Mon Jun 28, 2004 12:36 am
    Location: Geneva
    Contact:

    Re: Sound Viewer module CPU usage (2.5.2)

    by boris » Sat Mar 03, 2007 3:37 am

    3Din2D wrote:Ok, although the module I refer to above is supplied with modul8.


    NO, this module is NOT supplied with modul8.
    This module is from a Modul8 user.
    -> Author : VisionSonor

    PLEASE NOTE :
    Modules from users are not guaranteed by GarageCUBE use at your risk !

    "GarageCUBE Library" means Modules from GarageCUBE
    "Public Library" means Modules from Users
    Boris * garageCube team
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    Re: Sound Viewer module CPU usage (2.5.2)

    by yves@garagecube » Sat Mar 03, 2007 10:14 am

    3Din2D wrote:Is there any documentation we can use in reference to the Python scripting? A lot of the code was figured out by the programmer 'hacking out' bits of code from other modules.


    Check the Modul8 documentation. There is an introduction to Python and a description of all the available functions for module scripting.

    You can also find more general information regarding Python at www.python.org

    Yves.
  • 3Din2D
    member
    Posts: 12
    Joined: Thu Feb 15, 2007 8:52 pm

    Re: Sound Viewer module CPU usage (2.5.2)

    by 3Din2D » Thu Mar 08, 2007 4:11 am

    yves@garagecube wrote:
    3Din2D wrote:Is there any documentation we can use in reference to the Python scripting? A lot of the code was figured out by the programmer 'hacking out' bits of code from other modules.


    Check the Modul8 documentation. There is an introduction to Python and a description of all the available functions for module scripting.

    You can also find more general information regarding Python at www.python.org

    Yves.


    Yeah he's seen that - but we've seem to come across a bit of a problem - we're capturing a MIDI controller and want to route the transformed output so it can be generally used - so, for example, we receive a Continuous Controller, at the moment we can only get it to affect a direct element in the system, like movie position. We would like it to be universal, like this:

    As it stands now, we can only do this:
    MIDI controller -> is captured in script -> modifies movie time

    But we want to do this:
    MIDI controller -> is captured in script -> modifies 'value'

    But we can't seem to do it and can't find anywhere in the documentation how to.
  • Lupin
    garageCube team
    Posts: 383
    Joined: Fri Aug 18, 2006 12:37 pm
    Location: France
    Contact:

    by Lupin » Tue Mar 27, 2007 8:19 pm

    (VS) Sound Viewer module has been updated. the refresh rate of the module is set to 1/4 seconds

    enjoy again
    Gael Abegg Gauthey (former known as Lupin)
    https://www.linkedin.com/in/abegg-gauthey/

Who is online

Users browsing this forum: No registered users and 7 guests