OK it is not I bug, I figured out what is going on. The problem occurs
because when the projectM plugin is loaded at startup we dont have an
actual instance of projectM running. So it fills in the "mode" parameter
with a placeholder. Then when the plugin is enabled for the first time in
the application, the real values are read off and inserted into the list.
The only problem being that the "max" value is set by the initial
placeholder, so it gets the value 1 and unfortunately the plugin is not
allowed to alter the value of "max" after it is loaded. Setting the
parameter through the GUI is fine, as it only checks if it is a value in
the list, but setting it externally e.g. via OSC, it clamps the value to be
between min and max.

So, how to fix this ? I could set the max value from the length of the list
in the lives app, but I dont like this.

I think what I will do is this:
- set the max to some large value, eg. 100000 in the projectM setup,
overriding the 1 value.
- setting the value to beyond the end of the real max will be handled in
the plugin by wrapping round (ie. n mod real_max-1 + 1)
- to provide the real value of max, I will add a new OSC command, something
like: /effect_key/parameter/gui/choices/max

Sound reasonable ?

Gabriel.








http://lives.sourceforge.net
https://www.openhub.net/accounts/salsaman

On Mon, Mar 16, 2015 at 9:12 AM, salsaman <salsa...@gmail.com> wrote:

> Yes, it seems like there is a bug. Somewhere in the code the max value of
> the parameter is being set to 1, so values above this are being clamped.
> I'll need to figure out where this happens and why and then fix it.
>
>
>
>
> http://lives.sourceforge.net
> https://www.openhub.net/accounts/salsaman
>
> On Sun, Mar 15, 2015 at 9:56 PM, Harrie Hoogeveen <
> harrie.hoogev...@gmail.com> wrote:
>
>> Yes, that is what I am doing. Have the projectM plugin under key 9 and I
>> send:
>> /effect_key/parameter/value/set 9 0 0 <- random
>> /effect_key/parameter/value/set 9 0 1 <- first preset
>> /effect_key/parameter/value/set 9 0 2 <- nothing
>> /effect_key/parameter/value/set 9 0 3 <- nothing
>> etc
>>
>> On Mon, Mar 16, 2015 at 12:41 AM, salsaman <salsa...@gmail.com> wrote:
>>
>>> I checked the code, what I told you is not quite right.
>>>
>>> It should be:
>>>
>>> /effect_key/parameter/value/set <key> 0 n
>>>
>>> you don't need to specify the <mode> because it assumes the currently
>>> active mode. (Actually it is obvious because if the mode is not active,
>>> theat effect is not active so setting the parameter would do nothing.)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> http://lives.sourceforge.net
>>> https://www.openhub.net/accounts/salsaman
>>>
>>> On Sun, Mar 15, 2015 at 8:26 PM, Harrie Hoogeveen <
>>> harrie.hoogev...@gmail.com> wrote:
>>>
>>>> Well "/effect_key/parameter/value/
>>>> set <key> <mode> 0 0" selects random indeed.
>>>> "/effect_key/parameter/value/
>>>> set <key> <mode> 0 1" selects also the first preset.
>>>> but "/effect_key/parameter/value/
>>>> set <key> <mode> 0 2" and up does nothing.
>>>>
>>>>
>>>>
>>>> On Thu, Mar 12, 2015 at 9:39 PM, salsaman <salsa...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 12, 2015 at 11:37 AM, Harrie Hoogeveen <
>>>>> harrie.hoogev...@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I got it running perfectly (4 instances) in combination with realtime
>>>>>> jack / pure data. Also all hangs and crashes in combination with project 
>>>>>> M
>>>>>> are solved it seems.
>>>>>> I made a live try out:
>>>>>> https://vimeo.com/121957005
>>>>>> https://vimeo.com/121961049
>>>>>> It works great. Thank you very much.
>>>>>>
>>>>>> I still would like to ask a feature request. I would like to be able
>>>>>> to select the project M pre set with a OSCP message. I can now turn the
>>>>>> effect on and of, but I can not select which pre set to load. This would
>>>>>> give the ability to load combinations of videos and effects in mix with 
>>>>>> the
>>>>>> audio visualizer with a push of a button. Now you can only control it 
>>>>>> from
>>>>>> the LiVES interface which takes a lot of time and looks very 
>>>>>> unprofessional.
>>>>>>
>>>>>> Best Regards,
>>>>>> Harrie
>>>>>>
>>>>>>
>>>>>>
>>>>> This should be possible already, no ? You can send:
>>>>>
>>>>> /effect_key/parameter/value/set <key> <mode> 0 n
>>>>>
>>>>> where <key> and <mode> are the key/mode you have the effect mapped to,
>>>>> and n is the number of the preset you want.
>>>>>
>>>>> You can get the max value of n with:
>>>>>
>>>>> /effect_key/parameter/max/get <key> <mode> 0
>>>>>
>>>>> setting n to a value of 0 should go to random mode, other values will
>>>>> select other presets.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> On Sun, Feb 8, 2015 at 9:51 PM, salsaman <salsa...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I am very pleased to announce the release of LiVES version 2.2.8.
>>>>>>>
>>>>>>> This is mainly a bugfix release. Special thanks to k...@gmx.ca for
>>>>>>> his help in reporting a lot of the issues.
>>>>>>>
>>>>>>> Multi-encoder now has support for encoding to dirac video, including
>>>>>>> lossless.
>>>>>>>
>>>>>>>
>>>>>>> Here is the full changelog:
>>>>>>>
>>>>>>>
>>>>>>> Fix crash in Insert Frames (regression).
>>>>>>> Compilation fix for gtk+ 2.x
>>>>>>> Compilation fixes for freeBSD
>>>>>>> Add check for avformat_close_input in libav
>>>>>>> Fix crash in projectM plugin.
>>>>>>> Fix regression in x264_encoder.
>>>>>>> Fix audio codec bug in mencoder_encoder.
>>>>>>> Fix crash in "Show Details" after encoding failure.
>>>>>>> Fix regression in "Insert Silence" for clips with no existing audio.
>>>>>>> Check for avconv properly for Ubuntu in ffmpeg_encoder.
>>>>>>> Update dirac / multi_encoder to encode to dirac/vorbis/mkv.
>>>>>>> Add lossless dirac encoding.
>>>>>>> Updates to fix lives_mkv_encoder.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> URLS:
>>>>>>>
>>>>>>> http://salsaman.home.xs4all.nl/lives/current/LiVES-2.2.8.tar.bz2
>>>>>>> (source bzip2, 3.4 MB)
>>>>>>>
>>>>>>> http://salsaman.home.xs4all.nl/lives/current/LiVES-2.2.8.tar.gz
>>>>>>> (source gzip, 4.8 MB)
>>>>>>>
>>>>>>>
>>>>>>> shasums:
>>>>>>>
>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>>> Hash: SHA1
>>>>>>>
>>>>>>> sha1sums:
>>>>>>>
>>>>>>> eb50a91cddb202fc2cdd9ac909327cabb76c8e43  LiVES-2.2.8.tar.bz2
>>>>>>> bf28dd0cabc848cbbb80c0ec890a64ba63e83e14  LiVES-2.2.8.tar.gz
>>>>>>>
>>>>>>> sha256sums:
>>>>>>>
>>>>>>> 81b1b301b285ef763232a84268719008f11721ce8ac86ccfe53dc24a4886951b
>>>>>>> LiVES-2.2.8.tar.bz2
>>>>>>> 768aebf4b19f7f9f01ef65e74e211ab6e5d307888d902a52ce2a7c9afa9fec8f
>>>>>>> LiVES-2.2.8.tar.gz
>>>>>>>
>>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>>> Version: GnuPG v1
>>>>>>>
>>>>>>> iEYEARECAAYFAlTXxVEACgkQ6nIyGQ+AtI2YvwCfa/FBJtAhVN9CE/xTMNJR7S+I
>>>>>>> gZQAoJFfBlzXshp0N6zLs+PnCzmH6H0O
>>>>>>> =zRdr
>>>>>>> -----END PGP SIGNATURE-----
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> gpg key fingerprint can be found at
>>>>>>> http://lives.sourceforge.net/index.php?do=contact
>>>>>>>
>>>>>>>
>>>>>>> Enjoy !
>>>>>>> Gabriel.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> http://lives.sourceforge.net
>>>>>>> https://www.openhub.net/accounts/salsaman
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Dive into the World of Parallel Programming. The Go Parallel Website,
>>>>>>> sponsored by Intel and developed in partnership with Slashdot Media,
>>>>>>> is your
>>>>>>> hub for all things parallel software development, from weekly thought
>>>>>>> leadership blogs to news, videos, case studies, tutorials and more.
>>>>>>> Take a
>>>>>>> look and join the conversation now.
>>>>>>> http://goparallel.sourceforge.net/
>>>>>>> _______________________________________________
>>>>>>> Lives-users mailing list
>>>>>>> Lives-users@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>>>> sponsored
>>>>>> by Intel and developed in partnership with Slashdot Media, is your
>>>>>> hub for all
>>>>>> things parallel software development, from weekly thought leadership
>>>>>> blogs to
>>>>>> news, videos, case studies, tutorials and more. Take a look and join
>>>>>> the
>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>> _______________________________________________
>>>>>> Lives-users mailing list
>>>>>> Lives-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>>> sponsored
>>>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>>>> for all
>>>>> things parallel software development, from weekly thought leadership
>>>>> blogs to
>>>>> news, videos, case studies, tutorials and more. Take a look and join
>>>>> the
>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>> _______________________________________________
>>>>> Lives-users mailing list
>>>>> Lives-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>> sponsored
>>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>>> for all
>>>> things parallel software development, from weekly thought leadership
>>>> blogs to
>>>> news, videos, case studies, tutorials and more. Take a look and join the
>>>> conversation now. http://goparallel.sourceforge.net/
>>>> _______________________________________________
>>>> Lives-users mailing list
>>>> Lives-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>> sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>> for all
>>> things parallel software development, from weekly thought leadership
>>> blogs to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Lives-users mailing list
>>> Lives-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Lives-users mailing list
>> Lives-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lives-users mailing list
Lives-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lives-users

Reply via email to