United Kingdom
Asked — Edited

Sound Board (Pc) Question

Just a quick question.

How many songs (CD quality, MP3 format) can a PC sound board, or in fact an ARC project hold? So far I have added 9, but if I add any more and save the project I get the following message...

User-inserted image

I wanted to add a load of songs (far far more than 9) to use with voice recognition and the stop, pause and random Cheat Sheet commands. Any ideas?


Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.


That answer is impossible because it will be different per computer, and even different for the current state of the computer. The amount of memory available to a program varies based on your hardware or what else is currently running.

United Kingdom

Thanks for responding DJ.

If it helps, there is only AVG antivirus software, basic system resources, and ocasionally a web browser running while running my project. The laptop is running an i5 processor and has over 300GB of free HDD space in a 500GB drive. I don't have many apps installed on it as it's fairly new, so system space shouldn't be an issue from what I can see. I managed to add another song, so it's up to 10, but anything after that I get the same message. So with all that in mind, I should be able to store more than 10 MP3 songs on a sound board, right?


memory, not hard disk space. How many gigs of memory do you have. Based on DJ's answer and the error message you are getting, I can surmise that the project is attempting to load the MP3s into memory (which makes sense for quick access), making system memory the limiting factor.


United Kingdom


Good point. I forgot to say. It's 8 Gig. So how does the sound board actually work. Does it open a pathway to music files stored on the system, or does it duplicate the MP3 file?


It sounds like it loads the mp3's into ram. If you have large mp3's you might want to use an mp3 board for them and put the smaller ones in ARC.

United Kingdom

Thanks for the advice David. What I might actually do for the larger music files then is create a music script manager and use the Exec() command to launch and play music from iTunes. It's a lot more work, but sounds like a better way for me to go without tying up ram space.


If you are playing on the PC instead of the EZ-B anyway, that might be better. Or maybe use Windows Media Player instead of iTunes. Less likely to halt and pop up an 'update available' message (I love my iPod and my wife's Macbook, but I hate itunes. Horribly written UI).


United Kingdom


Yes it would play through my computer to my HiFi system. I agree with you about iTunes and WMP, but for some reason WMP keeps crashing on me when I try to import my music library. confused Rather frustrating.

United Kingdom

So, I have re-installed Windows and Windows media player is now working. I added a script manager and added a few EXEC() pathway commands to each individual music track in individual scripts, and programmed the voice recognition control to play each song to try it out, and it works great.

But as I'm not using the PC soundboard control, I don't have the ability to choose random tracks using the "random" Cheat Sheet commands (as there are none). Any ideas to how I can play random scripts from the script manager? I'm sure it can be done in a seperate script to where I would say "play a random music track" using speech rec and a random track would be played, but I'm unsure how to write it.


I have an idea about how to use random to select the destination of a goto, but need to try it.

The other idea would be to name the mp3s with something you can create a random variable from like song1, song2 etc, then you would open the file "song" +$random_variable_number or something like that.

I might have some time tonight, otherwise I probably won't until Sunday. Hopefully script master @Rich will poke his head in here before that.


United Kingdom


Thanks buddy. I'd appreciate it. I do actually have the song pathway scripts named as Track 01, Track 02 ect, so just in case I needed to copy and paste them, as it would be easier to change the numbers than writing out each track name.


Thanks for the link. I'll head over and take a look.


The script @David linked should work fine. I was over thinking it. I think I could do it with fewer if statements but this one is easy to understand and will absolutely work.


United Kingdom

Thanks for the reply Alan, and thanks for the script David. I will have a play around with it over the weekend but it does look like just what I need. Many thanks.

Same subject but slightly off topic, one thing I didn't take in to account was controlling the music tracks that are playing. I was thinking along the lines of the soundboard writing my scripts and completely overlooked the fact that this is a whole different ball of wax. What I overlooked was the fact that, apart from playing music, I can't adjust the volume, pause a track, or stop it altogether. Does anyone know the pathways for the "Stop" button for windows media player, or indeed where to look for them in Windows 8?


I am not sure if there are command line commands fie those things. Autohotkey should work, but I have had a lot of trouble getting it work on Windows 8 so can't give too much advice yet. I know Winamp could be controlled by command line statements. I think it is still available (aol was going to kill it, but I think it was saved at the last minute).


United Kingdom

Okay thanks Alan. I could kick myself for not realising this earlier. I was just getting up to 400 music track command scripts while thinking about what to script next until I realised that stopping a script won't stop the music from playing, or using the audio stop command.

It stayed in my mind that it was still the soundboard I was working on, which was what I originally was doing. It was a poor oversight on my part, but at least I can at tracks on command so not a total loss. I just need to keep thinking of a workaround (if possible) to get more control of the track scripts. I might have a look at Winamp to see if it's workable. Thanks for the advice.

United Kingdom

Thanks For the links Alan. Very helpful.

I found that Winamp changed ownership from AOL to Radionomy, but they haven't released their version yet. But I managed to find an older version of Winamp that works, and made it my default player. I also got hold of CLEveR for Winamp, and tried out the music controls from the command lines using CMD.exe. So from the Windows start menu, I hit"Run" and typed in "CMD" to pull up the CMD.exe window, typed in...

#Code for CMD.exe

C:\Users\steve_000>downloads\clever.exe play

and all worked well, so I'm a few steps closer. The only problem I'm running in to now is how to use and execute the CLEveR.exe commands using a script. I tried the following...

#Script for ARC script manager. 

exec("C:\Users\steve_000>downloads\CLEveR.exe stop")

but get the message "Error on line 1: The system cannot find the file specified". Any ideas how this script should be written?


You need a \ not a > between your uswr directory and downloads directory names.


United Kingdom


I thought you might say that;). I spotted it too (although that's how it shows in the command in the CMD window (pic below)), but didn't make any difference when I changed it.

User-inserted image


I would move the exe out of your downloads folder to its own folder eitherboff c:\ or off c:\program files(x86). User libraries are symbolic links to actual directories and have added permissions that could be interfering with the command.


United Kingdom

Cool. I'll give it a try.


United Kingdom

So I put the CLEveR files in to the C:\ file so now in the CMD window Winamp controls now use the C:\CLEVER\clever.exe play (or stop ect) which I tested and it works. But using that command line in a script...

exec("C:\CLEVER\clever.exe play

still comes up with the same error message. And that was using the "" or the ">" simbols.


I have further thoughts on how to resolve, but need to experiment some. I am tied up through tomorrow, but have free time Sunday. We'll get it figured out.


United Kingdom

Okay Alan, not a problem. I'm grateful to you for looking in to this for me. In the mean time I'll keep playing with it to see if I come up with anything.:)



Your issue was a syntax error in the exec script command.

The synatax is:

exec("path and name of your program","any parameters for the program")

So, a simple example, I already loaded and paused a song in Winamp, and my clever.exe is in c:\clever\

The following script plays the loaded song for 5 seconds than pauses it again.


You could use other commands to load mp3s, and should be able to use variables within the command.


United Kingdom

Well I tried a few other variations of script to control Winamp via CMD paths, but none of which worked, so I'm officially out of ideas. confused


I think we were posting at the same time. Look at the example I posted just above your reply.



Ha, ha... I bit my lip on this because I knew Alan you would eventually catch the syntax error....

It does work, I tried in before a while back albeit using the exec command in a slightly different way...


One note: Clever requires winamp to already be running before you can use any of the load commands, so your first script command (or in your initialization script) you will need an exec command to start Winamp.


United Kingdom


Indeed we were posting at the same time, lol. I had a look at what you posted and see I missed the "quote marks" around the play, stop commands and breaking the code up with a "," . I was already aware that Winamp had to already be running so that's cool, just havn't got around to setting up an INIT script to launch it yet (busy weekend). I'll give it a try tomorrow.

Thanks Alan.:)

United Kingdom

Just to confirm Alan, I tried your script example you posted... It worked beautifully. I see the error of my ways now in how I was writing the execute script, so it was also a good learning curve.

Thanks for all of your help. Much appreciated.:)