Control your music with Siri and Shortcuts
Link:
Music Control Import
Commands
You can call the Shortcut via Siri or the Shortcuts App.
The following commands will be interpreted. The order of the complete spoken command is not relevant, but you'll always have to add the name of the SB you want to react.
Examples
Preparations after importing
Change the following to your needs:
Annotations
Feel free to take this Shortcut as a start and expand it to your needs.
If you have any questions, I'll try to help. But don't expect me to extend it. Altering the code by shifting blocks all over the screen sometimes was a PITA. :-)
Since I usually don't write instructions, let alone in English, I would feel happy about your feedback, if something is unclear.
Link:
Music Control Import
Commands
You can call the Shortcut via Siri or the Shortcuts App.
The following commands will be interpreted. The order of the complete spoken command is not relevant, but you'll always have to add the name of the SB you want to react.
- Play
- Stop
- Pause (no toggling)
- Sleep (end of track)
- On/Off
- Shuffle [End] (title)
- Repeat [End] (alle titles)
- Next/Previous
- Up/Down (volume up/down)
- Volume n (n>12?: since Siri writes numbers as words, if they are small enough. And I didn't want to parse those little rascals.)
- Artist <Artist> loads everything of the named artist
- Playlist <Name> (Loads the named playlist if it's in the default path.)
- Presets <One, Two, ..., Ten>
Examples
- "Artist Foreigner Kitchen"
- "Patio Playlist The Who" (Blanks in names are working.)
- "Bathroom Shuffle"
- "Repeat Boom End" (repeat off)
Preparations after importing
Change the following to your needs:
- rename the shortcut
- IP-Address and Port in the first Text field
- Names and MAC addresses of your SBen
- the spoken commands
- the relative change of the volume of +-10
Annotations
- SB names and commands must consist of one single word. Everything else is considered as data.
- This Shortcut actually plays just all titles of the given artist. There is no code to parse genre or album names.
- Every word of the spoken command will be considered as one of the following: name, command (bothe single words) and the rest as data. There takes no filtering of filling words like prepositions place.
Playlist Leonard Cohen Live in Parterre would lead to:
<Parterre-MAC> playlist play Leonard Cohen Live in.m3u - Ambigous terms won't work: if a SB is named Grey, an artist or a playlist named either, won't be played. There is no check for consistency, or so.
- The Data Must Be Written With Leading Capitals: Simon And Garfunkel, but not Simon and Garfunkel. You'll have to either change the names in your system or adapt the Code of this Shortcut to your needs.
- You can only call playlists that are stored in the default playlists path. Slashes in pathes were always escaped by design: Code:
/media/playlists -> \/media\/playlists
Feel free to take this Shortcut as a start and expand it to your needs.
If you have any questions, I'll try to help. But don't expect me to extend it. Altering the code by shifting blocks all over the screen sometimes was a PITA. :-)
Since I usually don't write instructions, let alone in English, I would feel happy about your feedback, if something is unclear.