Author Topic: [TIP] Testing sound events in OS X  (Read 1229 times)


  • Full Member
  • ***
  • Posts: 29
    • View Profile
    • About Me
[TIP] Testing sound events in OS X
« on: July 28, 2015, 03:25:09 PM »
Hi all,

I wanted a quick way to play around with the various sound events supported in AM but I didn't want to download/create a bunch of different samples. I'm a coder - I'm lazy by nature. So I figured out a quick way to generating place holders.

But first there didn't seem to be any place where all the configurable sound events are listed. As a famous Jedi once said "Use the source". A quick search in github revealed the following in attract/src/fe_input.cpp

Code: [Select]
const char *FeInputMap::commandStrings[] =
   "prev_display",   // was prev_list
   "next_display",   // was next_list
   "displays_menu",   // was lists_menu
   NULL, // LAST_COMMAND... NULL required here

Using the above event names I generated a bunch of terminal invocations of the OS X "say" command and saved them into a quick shell script:

Code: [Select]
#!/usr/bin/env bash

say -v Fred select.aiff "select"
say -v Fred up.aiff "up"
say -v Fred down.aiff "down"
say -v Fred page_up.aiff "page up"
say -v Fred page_down.aiff "page down"
say -v Fred prev_display.aiff "prev display"
say -v Fred next_display.aiff "next display"
say -v Fred displays_menu.aiff "displays menu"
say -v Fred prev_filter.aiff "prev filter"
say -v Fred next_filter.aiff "next filter"
say -v Fred filters_menu.aiff "filters menu"
say -v Fred toggle_layout.aiff "toggle layout"
say -v Fred toggle_movie.aiff "toggle movie"
say -v Fred toggle_mute.aiff "toggle mute"
say -v Fred toggle_rotate_right.aiff "toggle rotate right"
say -v Fred toggle_flip.aiff "toggle flip"
say -v Fred toggle_rotate_left.aiff "toggle rotate left"
say -v Fred exit.aiff "exit"
say -v Fred exit_no_menu.aiff "exit no menu"
say -v Fred screenshot.aiff "screenshot"
say -v Fred configure.aiff "configure"
say -v Fred random_game.aiff "random game"
say -v Fred replay_last_game.aiff "replay last game"
say -v Fred add_favourite.aiff "add favourite"
say -v Fred prev_favourite.aiff "prev favourite"
say -v Fred next_favourite.aiff "next favourite"
say -v Fred add_tags.aiff "add tags"
say -v Fred screen_saver.aiff "screen saver"
say -v Fred prev_letter.aiff "prev letter"
say -v Fred next_letter.aiff "next letter"
say -v Fred intro.aiff "intro"
say -v Fred custom1.aiff "custom1"
say -v Fred custom2.aiff "custom2"
say -v Fred custom3.aiff "custom3"
say -v Fred custom4.aiff "custom4"
say -v Fred custom5.aiff "custom5"
say -v Fred custom6.aiff "custom6"
say -v Fred ambient.aiff "ambient"
say -v Fred startup.aiff "startup"
say -v Fred game_return.aiff "game return"

Run the script in the sounds folder to generate audio samples of the spoken words.

Then I added the appropriate lines to the config file and hey presto instant audio feedback from Prof. Hawking himself, errr, I mean Fred.

Hope this help someone explore the many powerful features of AM.

« Last Edit: July 29, 2015, 03:49:02 PM by tomek »