Menu

Command-line usage

Bogdan Drozdowski

Type 'info imyplay' to get help.

Syntax:

imyplay [options] file.imy [...]

Command line options (in the full version):

-d|--device dev

Try to use the given device (ALSA, OSS, GStreamer, PC-speaker), driver ID (libao), server name (JACK1, PulseAudio) for sound output or the sampling rate and samples' format (case-insensitive: s16le, s16be, u16le, u16be, s8le, s8be, u8le, u8be), e.g. "--dev 44100:s16le" for the FILE, Allegro, PortAudio and SDL backends.

-e|--exec program

Execute the given program instead of normal sound output. Read below for options. Overrides -o/--output and -f/--file.

-f|--file file

Write raw samples to this file instead of normal sound output. Overrides -o/--output. Changes any ".imy" file extension to ".raw" in the output file's name if filename not provided.

-h|--help

Print help.

-l|--license

Print license information.

--midi-instr number

Use the given MIDI instrument number in MIDI output.

-o|--output system

Use the given sound output system (allegro, sdl, alsa, oss, ao/libao, portaudio/port, jack, pulseaudio/pulse, gstreamer/gst, speaker/pcspeaker/spkr/pcspkr). Names are NOT case-sensitive. PC-Speaker output under Linux may require the "snd-pcsp" kernel module to be loaded and permissions to access /dev/console.

--to-midi

Convert the given files to MIDI format (if the target file exists, it is deleted). Overrides -o/--output, -f/--file and -e/--exec. Changes any ".imy" file extension to ".mid" in the output file's name if filename not provided.

-V|--version

Print version numbers.

Alternatively to using the --output option, you can launch the program as imyplay-alsa, imyplay-allegro and so on (these can be symbolic links or copies of the executable file). This overrides the default order of output systems, but does NOT override the --to-midi, -f/--file and -e/--exec options.

Executed program's options - you can pass the following expressions in theprogram argument and these will get substituted by the correct values when the program is about to be started:

%i - the tone frequency as an integer (rounded), example: 523. Zero means a pause.
%f - the tone frequency as a floating point number (accurate), example: 523.250916. Zero means a pause.
%d - the tone/pause duration in seconds as an integer (rounded), example: 1. This equals to %m divided by 1000.
%s - the tone/pause duration in seconds as a floating point number (accurate), example: 1.25. This equals to %l divided by 1000.
%m - the tone/pause duration in milliseconds as an integer (rounded), example: 1250. This equals to %d (not rounded) times 1000.
%l - the tone/pause duration in milliseconds as a floating point number (accurate), example: 1250.3. This equals to %s (not rounded) times 1000.
%v - the tone's volume, from 0 to 15 inclusive.

Any other %X expressions will NOT be altered.

JACK output: if the JACK server doesn't start automatically, you can run it yourself with e.g.

jackd -d alsa -r 44100 -p 8192 &

Related

Wiki: Home