Re: [Qutecsound-users] Chnget/Chnset fixed
Brought to you by:
mantaraya36
From: joachim h. <jh...@jo...> - 2012-01-22 09:37:22
|
thanks, andrés. having both opportunities will be perfect. can you ping when current svn supports both? then i am happy to test. best - joachim Am 22.01.2012 08:28, schrieb Andres Cabrera: > Hi Joachim, > > The problem with chnget/chnset was that I hadn't understood how it > worked correctly when I initially tried to implement it (two or three > years ago), but now I've got a good way of using it. I was also > striving for full compatibility with MacCsound, which used only > invalue/outvalue and did not support chnget/chnset. > > The main difference between invalue/outvalue and chnget/chnset is > internal. invalue/outvalue use callback functions, so every control > pass, when there is an invalue or outvalue opcode, the callback > function is called. In CsoundQt this currently means that each > invalue/outvalue reads or writes to a widget (if the channel matches), > which means locking and unlocking the widget, which can be very > inefficient for large number of widgets. On much earlier versions of > CsoundQt, I was storing the values in an intermediate buffer which > were then passed to the widgets later by another thread. This was much > more efficient but didn't work well as the value of the widget didn't > really change until the value was processed, which could happen any > time later, so if you read the widget value just after writing to it, > you could sometimes get the old value. > > For chnget/chnset, the values are stored internally in the Csound > library (invalue and outvalue rely on the host application providing > storage), so when they are called, there is no locking (actually just > a single lock per control pass), just a reading of the current value. > What I am doing right now is that when the user moves a widget, I > store those changes in a queue which is processed between control > passes. This ends up being significantly more efficient as widgets are > only locked when they need to be written to (whenever the channel > value changes), and not all widgets on every pass. The change has > provided a significant improvement in CPU usage with what I am working > on right now, and I think most users will benefit from switching to > chnget/chnset instead of invalue/outvalue in the coming 0.7 version of > CsoundQt. > > But you are also right about the fact that CsoundQt examples all use > invalue/outvalue and that most users will probably have followed that > convention. I was initially thinking that it had to be just one or the > other, but you made me realise that it might be no problem to allow > both, so that's what I'll do. > > Cheers, > Andrés > > On Sat, Jan 21, 2012 at 8:10 PM, joachim heintz <jh...@jo...> wrote: >> one more question: >> i think up to now, nearly all examples for csoundqt work with >> invalue/outvalue for the widgets communication. if we change now to >> chnget/chnset, the user has to change in configure>widgets to "use >> chnget/chnset" instead of "use invalue/outvalue", and all the examples >> (amongst them rené's translation of iains realtime collection) will not >> work for him/her. >> is it a problem to allow both, invalue/outvalue and chnget/chnset for >> the communication between csoundqt and the widget panel? >> cheers - >> joachim >> >> >> Am 21.01.2012 20:49, schrieb joachim heintz: >>> hi andrés - >>> >>> sounds interesting. can you describe a little bit more in detail? what >>> has been the problem with chnget/chnset? what are the advantages in >>> performance using chnget/chnset compared with invalue/outvalue now? >>> >>> thanks - >>> >>> joachim >>> >>> >>> Am 21.01.2012 17:28, schrieb Andres Cabrera: >>>> Hi all, >>>> >>>> I've just committed a fix for the chnset/chnget opcodes. I think this >>>> will be the recommended method to interact with widgets in the future, >>>> so please give it a try if you are building. >>>> >>>> Using chnget/chnset will significantly reduce CPU usage, especially >>>> with a larger number of widgets. >>>> >>>> Cheers, >>>> Andres >>>> >>>> ------------------------------------------------------------------------------ >>>> Try before you buy = See our experts in action! >>>> The most comprehensive online learning library for Microsoft developers >>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >>>> Metro Style Apps, more. Free future releases when you subscribe now! >>>> http://p.sf.net/sfu/learndevnow-dev2 >>>> _______________________________________________ >>>> Qutecsound-users mailing list >>>> Qut...@li... >>>> https://lists.sourceforge.net/lists/listinfo/qutecsound-users >>>> >>> >>> ------------------------------------------------------------------------------ >>> Try before you buy = See our experts in action! >>> The most comprehensive online learning library for Microsoft developers >>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >>> Metro Style Apps, more. Free future releases when you subscribe now! >>> http://p.sf.net/sfu/learndevnow-dev2 >>> _______________________________________________ >>> Qutecsound-users mailing list >>> Qut...@li... >>> https://lists.sourceforge.net/lists/listinfo/qutecsound-users >> >> ------------------------------------------------------------------------------ >> Try before you buy = See our experts in action! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-dev2 >> _______________________________________________ >> Qutecsound-users mailing list >> Qut...@li... >> https://lists.sourceforge.net/lists/listinfo/qutecsound-users > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Qutecsound-users mailing list > Qut...@li... > https://lists.sourceforge.net/lists/listinfo/qutecsound-users |