MIDISynth.Keyboard.change_program
You're seeing just the function
change_program
, go back to MIDISynth.Keyboard module for more information.
Specs
change_program( GenServer.server(), MIDISynth.Command.program(), MIDISynth.Command.channel() ) :: :ok
Change the current program (e.g., the current instrument)
The soundfont that's supplied to MIDISynth.start_link/2
determines the
mapping from program numbers to instruments. The default is to use a general
MIDI soundfont, and instrument mappings for those can be found by looking at
the General MIDI
1 and
General MIDI 2
specifications.
Example
# Play a violin iex> {:ok, synth} = MIDISynth.start_link([]) iex> MIDISynth.Keyboard.change_program(synth, 41) :ok iex> MIDISynth.Keyboard.play(synth, 60, 100) :ok