Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
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?


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

#13  
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.


Alan
United Kingdom
#14  
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?
#15  
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).

Alan
United Kingdom
#16  
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
#18  
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:

#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...

Code:

#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?
#19  
You need a \ not a > between your uswr directory and downloads directory names.

Alan
United Kingdom
#20  
@Alan.

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
#21  
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.

Alan
United Kingdom
#22  
Cool. I'll give it a try.

Thanks.:)
United Kingdom
#23  
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...

Code:

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


still comes up with the same error message. And that was using the "\" or the ">" simbols.
#24  
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.

Alan
United Kingdom
#25  
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.:)

Steve.
#26  
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.

Code:


exec("c:\clever\clever.exe","play")
sleep(5000)
exec("c:\clever\clever.exe","pause")


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

Alan
United Kingdom
#27  
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*
#28  
I think we were posting at the same time. Look at the example I posted just above your reply.

Alan
#29  
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...
#30  
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.

Alan
United Kingdom
#31  
@Alan.

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
#32  
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.:)