1WildMidi_SetOption(3)    WildMidi Programmer's Manual    WildMidi_SetOption(3)
2
3
4

NAME

6       WildMidi_SetOption - Set a library option for a specific midi
7

LIBRARY

9       libWildMidi
10

SYNOPSIS

12       #include <wildmidi_lib.h>
13
14       int  WildMidi_SetOption  (midi *handle, uint16_t options, uint16_t set‐
15       ting)
16

DESCRIPTION

18       Set a library option for a specific midi.
19
20       handle The identifier obtained from opening  a  midi  file  with  Wild‐
21              Midi_Open(3) or WildMidi_OpenBuffer(3)
22
23       options The option or options you wish to change.
24
25              WM_MO_LOG_VOLUME
26                     By  default  the  library uses linear volume levels typi‐
27                     cally used in computer MIDI  players.  These  can  differ
28                     somewhat  to  volume  levels  found on some midi hardware
29                     which may use a volume  curve  based  on  decibels.  This
30                     option  sets  the  volume  levels to what you'd expect on
31                     such devices.
32
33              WM_MO_ENHANCED_RESAMPLING
34                     By default libWildMidi uses linear interpolation for  the
35                     resampling  of  the  sound  samples.  Setting this option
36                     enables the library  to  use  a  resampling  method  that
37                     attempts to fill in the gaps giving richer sound.
38
39              WM_MO_REVERB
40                     libWildMidi  has  an 8 reflection reverb engine. Use this
41                     option to give more depth to the output.
42
43              WM_MO_LOOP
44                     Makes libWildMidi to automatically rewind when it reaches
45                     the end, so the file would play in continuous loop.
46
47              WM_MO_STRIPSILENCE
48                     Strips silence at song start.
49
50              WM_MO_SAVEASTYPE0
51                     This  option  tells  WildMidi_GetMidiOutput(3)  to output
52                     type-0 format data for type-2 files.
53
54              WM_MO_TEXTASLYRIC
55                     Some files have the lyrics in the text meta  event.  This
56                     option reads lyrics from there instead.
57
58       setting
59              To  turn  on  an option, repeat that option here. To turn off an
60              option, do not put the option here.
61
62       Example: To turn on Reverb
63              WildMidi_SetOption(handle, WM_MO_REVERB, WM_MO_REVERB);
64
65       Example: To turn off Reverb
66              WildMidi_SetOption(handle, WM_MO_REVERB, 0);
67
68       Example: To turn on Reverb and Enhanced Resampling
69              WildMidi_SetOption(handle, (WM_MO_REVERB | WM_MO_ENHANCED_RESAM‐
70              PLING), (WM_MO_REVERB | WM_MO_ENHANCED_RESAMPLING));
71

RETURN VALUE

73       Returns -1 on error, otherwise returns 0.
74

SEE ALSO

76       WildMidi_GetVersion(3),   WildMidi_Init(3),   WildMidi_MasterVolume(3),
77       WildMidi_Open(3), WildMidi_OpenBuffer(3), WildMidi_SetOption(3),  Wild‐
78       Midi_GetOutput(3),    WildMidi_GetMidiOutput(3),   WildMidi_GetInfo(3),
79       WildMidi_FastSeek(3),  WildMidi_Close(3),  WildMidi_Shutdown(3),  wild‐
80       midi.cfg(5)
81

AUTHOR

83       Chris Ison <chrisisonwildcode@gmail.com> Bret Curtis <psi29a@gmail.com>
84
86       Copyright (C) WildMidi Developers 2001-2016
87
88       This file is part of WildMIDI.
89
90       WildMIDI  is  free  software:  you  can  redistribute and/or modify the
91       player under the terms of the GNU General Public License  and  you  can
92       redistribute  and/or  modify  the  library  under  the terms of the GNU
93       Lesser General Public License as published by the Free Software Founda‐
94       tion,  either  version  3 of the licenses, or(at your option) any later
95       version.
96
97       WildMIDI is distributed in the hope that it will be useful, but WITHOUT
98       ANY  WARRANTY;  without even the implied warranty of MERCHANTABILITY or
99       FITNESS FOR A PARTICULAR PURPOSE. See the GNU  General  Public  License
100       and the GNU Lesser General Public License for more details.
101
102       You  should  have received a copy of the GNU General Public License and
103       the GNU Lesser General Public License along with WildMIDI. If not,  see
104       <http://www.gnu.org/licenses/>.
105
106       This  manpage  is licensed under the Creative Commons Attribution-Share
107       Alike 3.0 Unported License. To view  a  copy  of  this  license,  visit
108       http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Cre‐
109       ative Commons, 171 Second Street, Suite 300, San Francisco, California,
110       94105, USA.
111
112                                 10 March 2016           WildMidi_SetOption(3)
Impressum