New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back volmid and volmax commands #80

Closed
roccitman opened this Issue Apr 29, 2015 · 8 comments

Comments

2 participants
@roccitman

roccitman commented Apr 29, 2015

Just wondering if you could suggest a tweak so when I use volume down it cuts the volume to say 30. Similar to using straight up applescript to cut 'sound volume'.
Thanks!

@vdesabou

This comment has been minimized.

Show comment
Hide comment
@vdesabou

vdesabou Apr 30, 2015

Owner

Hi,

You can eventually edit action.php file, line 1066 you have:

            } else if ($other_action == "volume_up") {
                if ($use_mopidy) {
                    invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 1.1 ));
                } else {
                    exec("osascript -e 'tell application \"Spotify\"
                    if it is running then
                        set sound volume to (sound volume * 1.1)
                    end if
                end tell'");
                }
                displayNotificationWithArtwork("Spotify volume has been increased", './images/volume_up.png', 'Volume Up');
                return;
            } else if ($other_action == "volume_down") {
                if ($use_mopidy) {
                    invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 0.9 ));
                } else {
                    exec("osascript -e 'tell application \"Spotify\"
                    if it is running then
                        set sound volume to (sound volume * 0.9)
                    end if
                end tell'");
                }
                displayNotificationWithArtwork("Spotify volume has been decreased", './images/volume_down.png', 'Volume Down');
                return;
            }

You see that I increase or decrease volume by 10% each time. You can change applescript to whatever you like.

If I understand correctly, you would like to be able to specify the sound volume by yourself, for example typing in Alfred volume 30? Is that correct ?

Owner

vdesabou commented Apr 30, 2015

Hi,

You can eventually edit action.php file, line 1066 you have:

            } else if ($other_action == "volume_up") {
                if ($use_mopidy) {
                    invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 1.1 ));
                } else {
                    exec("osascript -e 'tell application \"Spotify\"
                    if it is running then
                        set sound volume to (sound volume * 1.1)
                    end if
                end tell'");
                }
                displayNotificationWithArtwork("Spotify volume has been increased", './images/volume_up.png', 'Volume Up');
                return;
            } else if ($other_action == "volume_down") {
                if ($use_mopidy) {
                    invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 0.9 ));
                } else {
                    exec("osascript -e 'tell application \"Spotify\"
                    if it is running then
                        set sound volume to (sound volume * 0.9)
                    end if
                end tell'");
                }
                displayNotificationWithArtwork("Spotify volume has been decreased", './images/volume_down.png', 'Volume Down');
                return;
            }

You see that I increase or decrease volume by 10% each time. You can change applescript to whatever you like.

If I understand correctly, you would like to be able to specify the sound volume by yourself, for example typing in Alfred volume 30? Is that correct ?

@vdesabou vdesabou self-assigned this Apr 30, 2015

@roccitman

This comment has been minimized.

Show comment
Hide comment
@roccitman

roccitman Apr 30, 2015

Ahh found it. Thanks. So by default it increments the volume up or down by ten percent.

So I changed those lines from:
set sound volume to (sound volume * 1.1)
set sound volume to (sound volume * 0.9)

to
set sound volume to 99
set sound volume to 30

(oddly, it didn’t work when I used 100, but does when I use 99)

Thanks!! Didn’t see a place on your site to donate to the development fund, let me know if I missed it.
-rocco

On Apr 29, 2015, at 9:50 PM, Vincent notifications@github.com wrote:

Hi,

You can eventually edit action.php file, line 1066 you have:

        } else if ($other_action == "volume_up") {
            if ($use_mopidy) {
                invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 1.1 ));
            } else {
                exec("osascript -e 'tell application \"Spotify\"
                if it is running then
                    set sound volume to (sound volume * 1.1)
                end if
            end tell'");
            }
            displayNotificationWithArtwork("Spotify volume has been increased", './images/volume_up.png', 'Volume Up');
            return;
        } else if ($other_action == "volume_down") {
            if ($use_mopidy) {
                invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 0.9 ));
            } else {
                exec("osascript -e 'tell application \"Spotify\"
                if it is running then
                    set sound volume to (sound volume * 0.9)
                end if
            end tell'");
            }
            displayNotificationWithArtwork("Spotify volume has been decreased", './images/volume_down.png', 'Volume Down');
            return;
        }

You see that I increase or decrease volume by 10% each time. You can change applescript to whatever you like.

If I understand correctly, you would like to be able to specify the sound volume by yourself, for example typing in Alfred volume 30? Is that correct ?


Reply to this email directly or view it on GitHub #80 (comment).

roccitman commented Apr 30, 2015

Ahh found it. Thanks. So by default it increments the volume up or down by ten percent.

So I changed those lines from:
set sound volume to (sound volume * 1.1)
set sound volume to (sound volume * 0.9)

to
set sound volume to 99
set sound volume to 30

(oddly, it didn’t work when I used 100, but does when I use 99)

Thanks!! Didn’t see a place on your site to donate to the development fund, let me know if I missed it.
-rocco

On Apr 29, 2015, at 9:50 PM, Vincent notifications@github.com wrote:

Hi,

You can eventually edit action.php file, line 1066 you have:

        } else if ($other_action == "volume_up") {
            if ($use_mopidy) {
                invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 1.1 ));
            } else {
                exec("osascript -e 'tell application \"Spotify\"
                if it is running then
                    set sound volume to (sound volume * 1.1)
                end if
            end tell'");
            }
            displayNotificationWithArtwork("Spotify volume has been increased", './images/volume_up.png', 'Volume Up');
            return;
        } else if ($other_action == "volume_down") {
            if ($use_mopidy) {
                invokeMopidyMethod($w, "core.mixer.set_volume", array('volume' => invokeMopidyMethod($w, "core.mixer.get_volume", array()) * 0.9 ));
            } else {
                exec("osascript -e 'tell application \"Spotify\"
                if it is running then
                    set sound volume to (sound volume * 0.9)
                end if
            end tell'");
            }
            displayNotificationWithArtwork("Spotify volume has been decreased", './images/volume_down.png', 'Volume Down');
            return;
        }

You see that I increase or decrease volume by 10% each time. You can change applescript to whatever you like.

If I understand correctly, you would like to be able to specify the sound volume by yourself, for example typing in Alfred volume 30? Is that correct ?


Reply to this email directly or view it on GitHub #80 (comment).

@vdesabou

This comment has been minimized.

Show comment
Hide comment
@vdesabou

vdesabou Apr 30, 2015

Owner

So I changed those lines from:
set sound volume to (sound volume * 1.1)
set sound volume to (sound volume * 0.9)

to
set sound volume to 99
set sound volume to 30

I see.. I will add a 'volmid' and 'volmax' commands (they used to exist at some point, but for some reason, I've removed them 😄 )
I'll add in next version !

Thanks!! Didn’t see a place on your site to donate to the development fund, let me know if I missed it.

Yes there is a Paypal Donate button in my signature in every article for example http://alfred-spotify-mini-player.com/articles/mopidy/ 😃

Thanks!

Owner

vdesabou commented Apr 30, 2015

So I changed those lines from:
set sound volume to (sound volume * 1.1)
set sound volume to (sound volume * 0.9)

to
set sound volume to 99
set sound volume to 30

I see.. I will add a 'volmid' and 'volmax' commands (they used to exist at some point, but for some reason, I've removed them 😄 )
I'll add in next version !

Thanks!! Didn’t see a place on your site to donate to the development fund, let me know if I missed it.

Yes there is a Paypal Donate button in my signature in every article for example http://alfred-spotify-mini-player.com/articles/mopidy/ 😃

Thanks!

@vdesabou vdesabou added this to the 6.2.2 milestone Apr 30, 2015

@vdesabou vdesabou changed the title from Not an issue, need tweak-guidance to Add back volmid and volmax commands Apr 30, 2015

@vdesabou

This comment has been minimized.

Show comment
Hide comment
@vdesabou

vdesabou Apr 30, 2015

Owner

Hey thanks for the donation!! Really appreciated!!

Owner

vdesabou commented Apr 30, 2015

Hey thanks for the donation!! Really appreciated!!

@roccitman

This comment has been minimized.

Show comment
Hide comment
@roccitman

roccitman Apr 30, 2015

You bet!

On Apr 30, 2015, at 10:37 AM, Vincent notifications@github.com wrote:

Hey thanks for the donation!! Really appreciated!!


Reply to this email directly or view it on GitHub #80 (comment).

roccitman commented Apr 30, 2015

You bet!

On Apr 30, 2015, at 10:37 AM, Vincent notifications@github.com wrote:

Hey thanks for the donation!! Really appreciated!!


Reply to this email directly or view it on GitHub #80 (comment).

vdesabou added a commit that referenced this issue May 1, 2015

@vdesabou vdesabou closed this May 1, 2015

vdesabou added a commit that referenced this issue May 1, 2015

@vdesabou

This comment has been minimized.

Show comment
Hide comment
@vdesabou

vdesabou May 1, 2015

Owner

I added volmid and volmax commands:

capture d ecran 2015-05-01 a 13 40 55

Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ

Owner

vdesabou commented May 1, 2015

I added volmid and volmax commands:

capture d ecran 2015-05-01 a 13 40 55

Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ

@roccitman

This comment has been minimized.

Show comment
Hide comment
@roccitman

roccitman May 1, 2015

Thanks man. Awesome! Again, oddly the vol max doesn’t work unless I change it to 99 (instead of 100). Must be my install or something. Oh well, nice work.

Really getting into the power of Spotify this year, and this is an excellent piece of software (and amazing use of Alfred). Next project is Mopidy but I’m bollocks with the command line so that’s a journey. The OS X client for Spotify is soo klunky.

On May 1, 2015, at 1:42 AM, Vincent notifications@github.com wrote:

I added volmid and volmax commands:

https://cloud.githubusercontent.com/assets/4061923/7429754/c795d1a2-f007-11e4-9a73-8d1921b9e2cf.png
Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ http://inft.ly/4j9rdAZ

Reply to this email directly or view it on GitHub #80 (comment).

roccitman commented May 1, 2015

Thanks man. Awesome! Again, oddly the vol max doesn’t work unless I change it to 99 (instead of 100). Must be my install or something. Oh well, nice work.

Really getting into the power of Spotify this year, and this is an excellent piece of software (and amazing use of Alfred). Next project is Mopidy but I’m bollocks with the command line so that’s a journey. The OS X client for Spotify is soo klunky.

On May 1, 2015, at 1:42 AM, Vincent notifications@github.com wrote:

I added volmid and volmax commands:

https://cloud.githubusercontent.com/assets/4061923/7429754/c795d1a2-f007-11e4-9a73-8d1921b9e2cf.png
Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ http://inft.ly/4j9rdAZ

Reply to this email directly or view it on GitHub #80 (comment).

@roccitman

This comment has been minimized.

Show comment
Hide comment
@roccitman

roccitman May 1, 2015

Btw here’s my changes: http://d.pr/n/1eaPS

On May 1, 2015, at 1:42 AM, Vincent <notifications@github.com mailto:notifications@github.com> wrote:

I added volmid and volmax commands:

https://cloud.githubusercontent.com/assets/4061923/7429754/c795d1a2-f007-11e4-9a73-8d1921b9e2cf.png
Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ http://inft.ly/4j9rdAZ

Reply to this email directly or view it on GitHub #80 (comment).

roccitman commented May 1, 2015

Btw here’s my changes: http://d.pr/n/1eaPS

On May 1, 2015, at 1:42 AM, Vincent <notifications@github.com mailto:notifications@github.com> wrote:

I added volmid and volmax commands:

https://cloud.githubusercontent.com/assets/4061923/7429754/c795d1a2-f007-11e4-9a73-8d1921b9e2cf.png
Here is a link to Beta version of 6.2.2 if you want to test: http://inft.ly/4j9rdAZ http://inft.ly/4j9rdAZ

Reply to this email directly or view it on GitHub #80 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment