Still using my Microservice to convert web pages into links in JSON, this time filtering out MP3s. Fortunately there's a few web pages out there with free classical MP3s.
Next after UpdateAttribute, I check file extension in a Route on Attribute.
If it's MIDI, call the same MIDI player.
I added a second PutFile to save to /opt/demo/mp3, so that I keep my music files seperately.
Otherwise, call OSX's command line MP3 player.
In my second ExecuteStreamCommand I call /usr/bin/afplay to play those newly downloaded MP3s. It will play and once completed the next song will play. I don't recommend feeding both MIDI and MP3 pages full at the same time. It's best to pick one and let it load up a lot of files in the queues from one type and play those. I keep my GetHTTP's stopped once I get the page in as I don't want more. it is very easy to feed in a list of pages to load, add a scheduler or other feed logic in the start to control your experience. I like to manually control this part so I have control. You could also trigger this by the presence of a file or maybe when a Jenkins build fails. It's limited by your imagination and over 180 processors.
Another thing that can be added to the flow is some Audio Processing via Simon Elliston Ball's Audio Processors, that you can easily add to your NIFI.