Next: Return values, Previous: How to compile?, Up: Top [Contents]
Basic syntax is:
‘imyplay [options] ringtone.imy [...]’
The ringtone.imy part stands for a supported iMelody file.
Options in the full version:
-d <dev>
--device <dev>
Try to use the given device (ALSA, OSS, GStreamer, PC-speaker), driver ID (libao), server name (JACK1, JACK2, PulseAudio) for sound output or set 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 <program>
--exec <program>
Execute the given program instead of normal sound output. Overrides -o/--output and -f/--file options.
You can pass the following expressions in the ‘<program>’ 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, form 0 to 15 inclusive.
Any other
%X
expressions will NOT be altered.
-f <file>
--file <file>
Write raw samples to this file instead of normal sound output. Overrides the -o/--output. Changes any .imy file extension to .raw in the output file’s name if filename not provided. Use --dev to specify the sampling rate and samples’ format.
-h
--help
Print help and exit.
-l
--license
--licence
Print license information and exit.
--midi-instr <number>
Use the given MIDI instrument number in MIDI output.
-o <system>
--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 or pcspkr (or similar) kernel module to be loaded and permissions to access /dev/console.
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 &’
--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 and exit.
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.
If imyplay-exec
is called, the -e/--exec is still
required to provide the program to run.
The default MinGW build has just the SDLv2 backend enabled, with a default
driver. If that doesn’t work for you, you can set the environment variable
SDL_AUDIODRIVER
to a value which works for you. Check the SDL documentation
for known drivers. Examples: directsound
, dsound
, waveout
,
winmm
.
Next: Return values, Previous: How to compile?, Up: Top [Contents]