|
#31
|
||||
|
||||
|
Re: Vex Speaker
Quote:
The problem seems to be probably a bug in the way ROBOTC parses the wave header. I created a short 1000Hz sine wave sampled at 8K, 8 bit mono in quicktime, this played OK. I then tried converting that using the switch sound converter software, the only change to the file was to the "fmt" chuck which was two bytes longer but still valid, this will not play in ROBOTC. I also had a look at the files on the ROBOTC blog, these have an extra (unneeded) chunk in the header, I tried modifying the converted file by adding this and adjusting the data size field, the file would now play. Here is a hex dump of the header of each of these three files, 1k_qt.wav plays, 1k_switch.wav will not play, 1k_switch_a.wav will play. Guess I will send this info the CMU and report as a bug. |
|
#33
|
||||
|
||||
|
Re: Vex Speaker
Read the last dozen or so posts on this thread - it covers what WAV files will and won't play.
Quote:
Cheers, - Dean |
|
#34
|
||||
|
||||
|
Re: Vex Speaker
Quote:
What would be even cooler is each robot "singing" it's own part. Galileo coming from one robot and then answered by the other? That'd be sweet! Maybe all the pauses will reduce the file size enough to work. I guess now we'll see exactly how in sync robots really are from when they get the autonomous switched on or driver controlled loops. Come on KTOR, get programming! |
|
#36
|
||||
|
||||
|
Re: Vex Speaker
Quote:
|
|
#37
|
||||
|
||||
|
Re: Vex Speaker
Mark
It occurred to me today that I did not actually try audacity as a converter. This was mostly due to the fact that the version on my Mac was old (V1.3) and I did not realize that it did indeed have the option of exporting wav files as 8 bit. So I downloaded V2.0 for PC and created a test wav file, it works with no problems and the header looks similar to the quicktime version. One other thing I did not mention yesterday is that there is currently a 128K file size limit for files on the cortex, anything larger fails to download, perhaps this is your problem. It means that audio files are limited to 15.9 seconds in 8 bit mono 8KHz sampling. |
|
#38
|
|||
|
|||
|
Re: Vex Speaker
I had to *shudder* manually enter the code by hand, otherwise it threw errors for me as well.
|
|
#39
|
||||
|
||||
|
Re: Vex Speaker
Quote:
|
|
#40
|
||||
|
||||
|
Re: Vex Speaker
I have the Star Wars "Imperial March" converted to where it plays on the Cortex. Now if I can learn a bit more about RobotC to get it to work while the autonomous mode is going. I placed the code in my competition template, but have not discovered which command will let it play simultaneously during the autonomous period. Right now it plays all the way through and then begins to execute the rest of the code. Any advice from someone who has a good grasp on RobotC would be appreciated!
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|