Page 5 of 7 FirstFirst 1234567 LastLast
Results 41 to 50 of 62

Thread: controlling winamp volume

  1. #41
    Constant Bitrate
    Join Date
    Mar 2007
    Location
    manchester, UK
    Posts
    145
    thanks for this, get some sleep. but when you do have time i cannot get that to work.

    i firstly tried to put the extra bits into my existing code. but then i just tried your code straight off.

    i changed the voting to

    <do function="Send Key To Foreground" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="UP" vote_priority="Low"></do>

    which is working when i use a digital switch. but when in your code just does nothing.

  2. #42
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Did you change:

    Code:
          <variable name="variable_hysteresis">0.25</variable>
    to something more reasonable? To match what you had before it would be: 0.06 instead of 0.25 which would make a huge difference. I made it that big so I could test it, but didnt have time.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #43
    Constant Bitrate
    Join Date
    Mar 2007
    Location
    manchester, UK
    Posts
    145
    yes i tried this at 0.25 and 0.06 but got no response from either.

  4. #44
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Just so you know, this is on my things to do list. I will try to get my code I posted tested tomorrow-ish.

    This summer has been crazy...
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  5. #45
    Constant Bitrate
    Join Date
    Mar 2007
    Location
    manchester, UK
    Posts
    145
    thank you, it is appreciated.

  6. #46
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    I'm coding now just FYI...
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  7. #47
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Ok, well I went a little overkill but I layed the ground work for external plugins. Right now the potentiometer is internal to the source but within the next few releases that programming could go outside and really do whatever in real programming terms

    First run your updater. You need to make sure your version is 5.0.0.234 or nothing will work. Seriously, update...

    Then in your config file on the same level as the "all_statements" and "all_tasks" nodes (nested in the "logic" node), you can place:
    Code:
        <custom_scripts>
          <custom id="wilgartw_Potentiometer_2009_07_16">
            <votes minimum_delta_vote_time="250">
              <up>
                <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="KEY8" vote_priority="Low"></do>
              </up>
              <down>
                <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="KEY2" vote_priority="Low"></do>
              </down>
            </votes>
            <thresholds low="0.06" high="0.06"></thresholds>
            <io analogue_port="Potentiometer_Input"></io>
          </custom>
        </custom_scripts>
    Do not change the ID. That is how it knows to evaluate the rest of the code as a potentiometer input as defined by this thread hence your username, the date, and a general description in the ID. It is unique.

    You can change the minimum delta vote time to whatever you want. Smaller the number, more button presses per second, larger, less presses per second.

    The stuff between the "up" and "down" nodes (nested in "votes") can be however long you want. Any standard do statement will work. I just copy pasted your above code and changed the keys to volume up and down.

    I can see it getting into the parsing, so if you can get it to work by pressing a display button (not hardware, but GUI based), then it will work with this code. I tested that. I am testing with a virtual brain as my current FB's are somewhat inoperable at the moment because I am flashing new firmware for my senior design project on them, so they dont work for this anymore until I am finished with that. So the virtual brain says it will work... You may need to change the actual do statements to something else, but I can see in the program it gets to the right spot.

    The thresholds are exactly like in version 2 of the software, and I am using the values as in your above code. You may need to adjust those, just whatever works best.

    The io's "analogue_port" I should have named "analogue_id" but I didnt as I am very sleepy and I dont want to recompile everything for that stupid syntactical error. So change "Potentiometer_Input" to whatever the analogue input's id is that you have your potentiometer connected to (as defined in the major io section [same node level as "logic" and "general" and "gui"]).

    The code behind it is copy/paste from version 2 with minor changes to get it to compile and accept XML.

    Enjoy...

    Now I am off to bed before the sun rises.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  8. #48
    Constant Bitrate
    Join Date
    Mar 2007
    Location
    manchester, UK
    Posts
    145
    sorry, i cannot get that to work, my mdx updater says i am up to date, but how can i tell which version i am on?

    this is my whole xml.
    i have tried it with "UP" and "DOWN" in the vote options, but in case there was a problem with this i have replaced with "B" as i can see this working with analogue_id "b4_fwd"

    i have set the delta tiem to 20ms, as if i turn it up fast i need it to trigger a keysroke every 0.06 increment.

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <FusionControlCentreConfiguration version="3.0.0.0" author="Me" date_created="Monday, July 06, 2009 at 8:23:09 PM" last_modified="Thursday, July 09, 2009 at 7:17:26 PM">
    
      <require>
      <!-- Begin Function Instances -->
      <!-- End Function Instances -->
    
      <!-- Begin Fusion Font Instances -->
          <font name="Verdana" originalSize="25" font_config="content\fonts\Verdana.xml"></font>
      <!-- End Fusion Font Instances -->
      </require>
    
      <speech enabled="false" global_politeness="true">
      <!-- Begin System Speech Instances -->
      <!-- End System Speech Instances -->
    
      <!-- Begin System Speech Definition Instances -->
          <system_definitions>
          </system_definitions>
      <!-- End System Speech Definition Instances -->
    
      <!-- Begin Custom Speech Definition Instances -->
          <custom_definitions>
          </custom_definitions>
      <!-- End Custom Speech Definition Instances -->
    
      <!-- Begin Custom Query Instances -->
          <custom_queries>
          </custom_queries>
      <!-- End Custom Query Instances -->
      </speech>
    
      <general>
      <!-- Begin Remote Control Configuration -->
        <remote status="disabled" user_name="default" port="4242"></remote>
      <!-- End Remote Control Configuration -->
    
      <!-- Begin COM -->
        <com status="disabled">
          <commands>
          </commands>
          <executable_commands>
          </executable_commands>
        </com>
      <!-- End COM -->
      </general>
    
      <graphics>
      <!-- Begin Global Graphic Settings -->
          <main_display designed_for_size="800,600" show_at_size="800,600" menubar="Sizeable" RunInSystemTray="False" MinimizeToSystemTray="True"></main_display>
      <!-- End Global Graphic Settings -->
    
      <!-- Begin Background Images -->
      <!-- End Background Images -->
    
      <!-- Begin Static Images -->
      <!-- End Static Images -->
    
      <!-- Begin Variable Location Images -->
      <!-- End Variable Location Images -->
    
      <!-- Begin Graph Instances -->
      <!-- End Graph Instances -->
    
      <!-- Begin Display Buttons -->
      <!-- End Display Buttons -->
    
      <!-- Begin Multi Images -->
      <!-- End Multi Images -->
    
      <!-- Begin Text Labels -->
          <text_label id="volume" text="" auto_monitor="analogue input" auto_monitorTarget="volume">
            <font font_id="verdana" font_size="12" colour="255,0,0,0"></font>
            <display location="0,0" page="0"></display>
            <config decimals="1" max_size="100,100"></config>
          </text_label>
      <!-- End Text Labels -->
      </graphics>
    
      <io>
      <!-- Begin Fusion Brain Instances -->
          <brain id="radio" version="4">{5545f2ff-00f5-45cb-9ec7-dbebff701f0b}</brain>
      <!-- End Fusion Brain Instances -->
    
      <!-- Begin Timer Setup -->
          <timer id="input" interval="75"></timer>
          <timer id="output" interval="100"></timer>
          <timer id="gui" interval="50"></timer>
          <timer id="logic" interval="50"></timer>
      <!-- End Timer Setup -->
    
      <!-- Begin Digital Output Instances -->
      <!-- End Digital Output Instances -->
    
      <!-- Begin Analogue Input Instances -->
          <iochannel id="b2_rwd" port="9" brain="radio" type="analogue_input">
            <options history="0" auto_average="false"></options>
          </iochannel>
          <iochannel id="b3_play" port="10" brain="radio" type="analogue_input">
            <options history="0" auto_average="false"></options>
          </iochannel>
          <iochannel id="b4_fwd" port="11" brain="radio" type="analogue_input">
            <options history="0" auto_average="false"></options>
          </iochannel>
          <iochannel id="volume" port="0" brain="radio" type="analogue_input">
            <options history="0" auto_average="true"></options>
          </iochannel>
      <!-- End Analogue Input Instances -->
      </io>
    
      <logic>
      <!-- Begin Logging Setup -->
        <all_logging>
        </all_logging>
      <!-- End Logging Setup -->
    
      <!-- Begin Variable Declarations -->
        <all_variables>
        </all_variables>
      <!-- End Variable Declarations -->
    
      <!-- Begin Logic Declarations -->
        <all_statements>
          <if fire_on="logic" minimum_delta_vote_time="500" id="Root Function #">
            <boolean_operation type="greater than">
              <parameter1>
                <analogue id="b2_rwd" time="0"></analogue>
              </parameter1>
              <parameter2>
                <number>3</number>
              </parameter2>
            </boolean_operation>
            <then>
              <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="Z" vote_priority="Low"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="Root Function #2">
            <boolean_operation type="greater than">
              <parameter1>
                <analogue id="b3_play" time="0"></analogue>
              </parameter1>
              <parameter2>
                <number>3</number>
              </parameter2>
            </boolean_operation>
            <then>
              <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="C" vote_priority="Low"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="Root Function #3">
            <boolean_operation type="greater than">
              <parameter1>
                <analogue id="b4_fwd" time="0"></analogue>
              </parameter1>
              <parameter2>
                <number>3</number>
              </parameter2>
            </boolean_operation>
            <then>
              <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="B" vote_priority="Low"></do>
            </then>
          </if>
        </all_statements>
      <!-- End Logic Declarations -->
    	<custom_scripts>
    		 <custom id="wilgartw_Potentiometer_2009_07_16">
    			 <votes minimum_delta_vote_time="20"> 
    				<up> <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="B" vote_priority="Low"></do></up>
    				 <down> <do function="Send Key" functionTargetID="Winamp v1.x:Winamp v1.x" vote_opinion="DOWN" vote_priority="Low"></do> </down> 
    			</votes>
    		 	<thresholds low="0.06" high="0.06"></thresholds>
    			 <io analogue_port="volume"></io>
    		 </custom>
    	 </custom_scripts>
      </logic>
    </FusionControlCentreConfiguration>

  9. #49
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    And when you make a button with the same vote options does it work when you click? Because the logic above in both cases is correct and working I have verified.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  10. #50
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Check your version number by just hovering over the *.exe.

    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

Page 5 of 7 FirstFirst 1234567 LastLast

Similar Threads

  1. Replies: 16
    Last Post: 01-03-2009, 04:59 AM
  2. Volume leveling DSP plugin for winamp?
    By DeaconC in forum Newbie
    Replies: 0
    Last Post: 05-01-2008, 12:33 AM
  3. Volume Slider
    By garto in forum Road Runner
    Replies: 0
    Last Post: 05-13-2007, 12:11 PM
  4. Road Runner Volume Issues ! ! !
    By rewindnottm in forum Road Runner
    Replies: 8
    Last Post: 03-20-2007, 03:38 AM
  5. Replies: 3
    Last Post: 11-23-2006, 10:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •