No announcement yet.

My Jukebox !

  • Filter
  • Time
  • Show
Clear All
new posts

  • My Jukebox !

    Greetings all,

    I'm slowly pulling together quite a nice music playing facility for ED using VLC, VA and HCS but now want to take things a little further......

    Here's the story so far:

    so far,I have 20 albums in my iTunes which have playlists created through VLC and stored within each folder, When asked, ASTRA will play
    any of them by name and I can also ask her to play the playlist tracks randomly or in normal sequence on the fly, I also have next track/ previous
    track fully functional along with raising and lowering the volume. I have also created a custom 80's folder (cos I love the 80's) with only my
    favourite 80's tracks in it to the tune of around 70 tracks so far. Soon I'll be creating custom ones for 70's one along with 'Going into Battle' playlist
    to play when going into combat.... LOLOL Such fun :-D

    So what's my next step then ?

    I want to ask ASTRA to choose what to play herself so I would like to, for example, give the voice command and have VA generate a random number
    between 1 and ##, each of my playlists I have set up will have their unique ID so the random number will define which playlist to fire up. I would also
    like to create a second variable to hold the last created random number so if the next time I make this request it happens to choose the same number then
    it will be forced to pick a random again.

    I'm familiar with how to use loops & IF statements etc in VA so I feel confident I can pull this together but how do I go about getting VA to generate a random
    number between two limits like 1 to 20 for example and assign it to a variable ????

    Many Thanks from a very happy customer

  • #2
    I would be keenly interested in your setup if you're willing to share!

    That said, to answer your question:
    Set a small int and then set the floor & ceiling range.

    Search the Voice Attack help PDF:

    for the phrase: 'Set a Small Integer (Condition) Value'

    There aren't page numbers in the guide unfortunately, so you'll have to search. In that section is a screenshot where it shows "Set small integer value to:" and one option is: "A random value between # and #". That same window is also where you specify the variable name you'd like to use for the value.

    A page or two down from there shows you how to use that in a conditional if statement block. The key to remember is that if you use a Small Integer then you need to use the conditional blocks & other stuff that specifically says "Small Integer compare" (etc) or it won't work. (I.e., you can't semantically interchange a Small Integer with a regular Integer).

    I think (but am not 100% certain) there is also a way to "cast" that small integer to a 'regular' Integer if needed; google search or search the VA forums for examples.


    • #3
      Thanks Cmdr Galock,

      I'll look into that now

      It would be my pleasure to share what I have done, not sure it will be the perfect way to do it but, hey, it works at least.

      I'm going to be quite busy over the next week but as soon as I can I will add posts to this thread with a step by step guide
      from the beginning to where I am now with pics & explanations as I go.

      Keep watching & thanks again for your help, just had a look and that has given me the answers I needed