stim_upload_dir_README 31 Oct, 2005 - Stefan Tomic 1) Create a temporary directory on this computer for your stimuli. You can create this directory in your home directory (e.g. ~/tempstimdir). 2) Copy your stimuli to a temporary directory somewhere on this computer. You can use the "scp" command to copy the stimuli from another computer. For example, if you have a bunch of wav files in a directory on a local OS X machine, you can issue: scp -R /path/to/your/wavfiles thiscomputername:~/tempstimdir This will copy the local directory and its contents (/path/to/your/wavfiles) to the ~/tempstimdir directory on this computer (thiscomputername). 3) Open the script stim_upload_dir.php in this directory with your favorite text editor. 4) Modify $src_path to the location where you just copied your stims. The path can either be a relative path from the current directory you are running the script from or an absolute path. Make sure to follow the path with a forward slash ("/"). 5) Modify $dest_path to the subdirectory to which you would like to copy the files (this will be a subdirectory under /var/www/html/questionnaire/stimuli/audio/). Also follow with a forward slash. 6) Change the $error_fname to a log file name that makes sense for this set of stims. Make sure that the name isn't the same as another existing log (in the stim_upload_errors subdirectory) 7) Change the following 12 fields to values that make sense for your stim set. At the very least, you should enter a description, file format, and number of channels for your files. Note that these values will be submitted with all of your stims so if you have varying formats you will have to run the script separately for each set. If you know the mp3 compression bit rate, sample rate, or the duration of the files and they are all the same, enter these values, otherwise leave as an empty string. If there is an artist, album, or itunes playlist associated with the stims, it's much easier to organize your stims first in iTunes and then export as an XML playlist. Then use the stim_upload_itunes.php script (as opposed to stim_upload_dir.php). To use the other script, see the instructions at stim_upload_itunes_README.txt 8) Run the script from the command line by issuing: > php -f stim_upload_dir.php 9) You shouldn't see any output in the terminal. If you do, they are probably errors which need attention. 10) Look at the log file created in the stim_upload_errors directory for your run. If it has no entries, this is a good sign. 11) Finally, look in the stimuli/audio directory to make sure the files have copied, and go to phpMyAdmin and inspect the stimulus table to see if they are there.