Vex speaker issues

We are trying to program our vex speaker to play part of the mortal kombat theme. But we keep on getting this one error that says** illegal NXT/EV3 file name **or something like that. I’ve checked online but the wiki doesn’t seem to offer any help.

any suggestions?

https://vexforum.com/t/playing-sound-files-w-robotc/28923/1
A couple of threads with similar issues. Make sure the file is the right format (8-bit mono wav), and try some of the other suggestions in the threads above (I think there’s a test file on one of them which should work and would then tell you whether it’s a code/compiler problem or an audio file format problem)

everything is correct (8-bit, mono, .wav, 8000hz, etc) but it keeps on giving me the error. the test sound runs fine but my own audio isn’t playing.

We had this exact same problem last year. I followed all of the advice from people on the forums and could never get it resolved. :mad:

I will look into this today and figure out what is happening. I know my team has been using the speaker but that are also still using V3.65 (ie. not V4.XX)

Try uploading the file that you have used here so we can give it a try. I personally have not had issues using the play file function. Most people just mess up the format or mess up using the file utility.

EDIT: O look Jpearman hit 4000 posts.

I will also try with the newest version of RobotC…perhaps it will work now. This was last year when we were having issues.

The error is generated by the compiler incorrectly (in V4.XX) , it is trying to validate the filename for some non-VEX platforms. If the file is a valid sound file in the correct format (8 bit, mono wav, less than 64k (I think) ) then it will download and play correctly. I will and try and get a fix in the next release.

I always create my sound files using a program called Audacity. Export the audio and select “other compressed files” as the format. Click the options button and then select “WAV (Microsoft)” and “Unsigned 8-bit PCM” as the encoding. I usually set the sample rate down at 8KHz, other sample rates will work but not all.

Try this code.

task main()
{ 
    while(1){
        playSoundFile("testtone.wav");
        wait1Msec(5000);
    }
}

with the attached sound file.
testtone.wav.zip (14 KB)

I have heard about some people not being able to pass inspections because they had music on their speakers, I don’t know but I think you will be ok if you get it to work. If all else fails just take it off. It really isn’t that big of part of your robot to be worth wasting time or getting delayed in inspection with.

Unless the music is in poor taste it should not be a problem. There is no rule saying you cannot play music, just the opposite in fact.

I’m using audacity to convert our sound clip. It just gives me the NXT error and doesn’t play at all. I have it set to play when we press the lower left trigger on our joystick. How do I solve it?

Some people actually use the speaker for legitimate purposes so “take it off” doesn’t quite work. Example below

Specifically the rules say:

So doing something practical and cool ( like from the link tabor shared :stuck_out_tongue: ) or having something ‘in good taste’ like cool music when you win or something should be fine :).

I’m trying to figure out how to get it to play! The sound clip is for during autonomous or at the end of driver control. Can someone tell me what the NXT/EV3 error means and how to fix it?

My team has a similar issue. I tried formatting our file twice, and I tried formatting the test file, but it didn’t work. I did the 8 bit mono, microsoft wav, etc…:confused:

Ignore that error, it has no effect. It will be removed in V4.51.

Have you both tested using the testtone.wav file I posted? Did that work?

PM me a link to the file you cannot get to work.

The James Pearman revolution at RobotC has begun! Thanks for taking care of that…could never quite understand why we were getting a Lego (I believe) error code.

I feel like soon we will have oscilloscopes standard with every ROBOTC purchase :smiley:

We were having trouble with it yesteday, the problem was that the RobotC wiki guide doesn’t tell you to make sure it’s mono. In Audacity, click on the dropdown of the track, then ‘split stereo to mono’. Delete one of the two tracks before you export.

What if you cant hit “split stereo to mono?”
ssplit sterio not an option.jpg