robksawyer / bikinect

Automatically exported from code.google.com/p/bikinect
0 stars 0 forks source link

mapping not working properly #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

this mapping: 
        <mapping label="piededestro">   
                <processor type="boolean" filter="greater_than" label="piede_dx">
                    <processor type="distance" filter="less_than" label="piede_dx" axis="z">
                        <element type="joint" target="right_foot" property="position"  axis="z"/>
                        <element type="joint" target="left_foot" property="position" axis="z" />
                    </processor>    
                    <processor type="direct">
                        <element type="value" value="250" />
                    </processor>    
                </processor>            
                <output>
                    <midi type="note" device="0" channel="1" channelMap="1" velocityMap="0" minChannel="63" maxChannel="68" minVelocity="0" maxVelocity="127" distinctNotes="true" />
                </output>
        </mapping>      

What is the expected output? What do you see instead?

I wish a note when right foot is 25cm above left foot (on axis z). Instead, i 
have a note everytime the two foot are more far than 25 cm, in any direction.

What version of the product are you using? On what operating system?
macosx 10.6.7, mappinect 1.0

Please provide any additional information below.

Original issue reported on code.google.com by michele....@gmail.com on 19 Nov 2011 at 4:54

GoogleCodeExporter commented 9 years ago
The .2 version of mappInect adds to new filters : "sum" and "minus".
You can now get something like this :

<mapping label="piededestro">   
                <processor type="boolean" filter="greater_than" label="piede_dx">
                    <processor type="direct">
                        <element type="joint" target="right_foot" property="position"  axis="z"/>
                    </processor>    
                    <processor type="filtered" operator="sum">
                                                <element type="joint" target="left_foot" property="position" axis="z" />
                        <element type="value" value="250" />
                    </processor>    
                </processor>            
                <output>
                    <midi type="note" device="0" channel="1" channelMap="1" velocityMap="0" minChannel="63" maxChannel="68" minVelocity="0" maxVelocity="127" distinctNotes="true" />
                </output>
        </mapping>  

Please tell me if it worked !

Original comment by bkuperb...@gmail.com on 12 Jan 2012 at 11:22

GoogleCodeExporter commented 9 years ago
Another way to do it, using the minus filter is that :

<mapping label="piededestro">   
                <processor type="boolean" filter="greater_than" label="piede_dx">

                    <processor type="filtered" operator="minus">
                                                <element type="joint" target="left_foot" property="position" axis="z" />
                                                <element type="joint" target="right_foot" property="position"  axis="z"/>

                    </processor>

                                        <processor type="direct">
                        <element type="value" value="250" />
                    </processor>        
                </processor>            
                <output>
                    <midi type="note" device="0" channel="1" channelMap="1" velocityMap="0" minChannel="63" maxChannel="68" minVelocity="0" maxVelocity="127" distinctNotes="true" />
                </output>
        </mapping>  

Original comment by bkuperb...@gmail.com on 12 Jan 2012 at 11:24

GoogleCodeExporter commented 9 years ago

Original comment by bkuperb...@gmail.com on 6 Jul 2012 at 10:55