Skip to content

Commit 218a243

Browse files
committed
Improved MIDI configuration, device helper update
1 parent 41d69bd commit 218a243

File tree

12 files changed

+440
-123
lines changed

12 files changed

+440
-123
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Version 4.0.x:
22

3+
* New options midi_in_device, midi_out_device, midi_mt32_device.
34
* Read Data/Devs/Controllers/gamecontrollerdb.txt.
45
* Updated libslirp to version 4.6.1.
56
* Device helper is updated to work with new hotplug functionality in
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FIXME: Check if sticky keys (or what the're called) is still an issue for full
2+
keyboard emulation and document if so.

docs/midi.md

+56-10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ On Windows, yet another name is used:
3434
But double-check that the device name is correct for yor system. See the
3535
section "Finding the MIDI device name".
3636

37+
For FS-UAE 4.0.XXX FIXME:
38+
39+
Alternatively, you can split the option into two:
40+
41+
serial_port = mt32:
42+
mt32_device = Mt-32 Synth Emulator
43+
44+
You can also in many cases drop specifying `mt32_device`. In this case, FS-UAE
45+
will try the following devices depending on platform: "Standard" (Linux), "Mt32EmuPort" (macOS), "Mt-32 Synth Emulator" (Windows).
46+
3747
## Linux
3848

3949
You can run `acconnect -o` to give a listing of ALSA MIDI sequencer names.
@@ -47,29 +57,65 @@ Example output while having both fluidsynth and munt/mt32 running:
4757
0 'Standard
4858

4959
The names you need to use with the `serial_port` option _with this exact setup_
50-
is 'Synth input port (11883:0)' and 'Standard'.
60+
is 'Synth input port (11883:0)' and 'Standard'. You might want to rename the
61+
port name of FluidSynth. See the "FluidSynth" section for more information.
5162

5263
Note, you can now also use `fs-uae-device-helper list-portmidi-devices` to find
5364
the device names.
5465

55-
## Fluidsynth
66+
## FluidSynth
67+
68+
The default FluidSynth sequencer name on Linux includes the process PID, which
69+
will change each time FluidSynth is started. It is a good idea to run
70+
FluidSynth with a static name, for example `--portname=FluidSynth`:
5671

57-
The default fluidsynth sequencer name on Linux includes the process PID, which
58-
will change each time fluidsynth is started. It is a good idea to run
59-
fluidsynth with a static name, for example `--portname=Fluidsynth`:
72+
fluidsynth -a alsa -m alsa_seq -l -i -s --portname=FluidSynth \
73+
/usr/share/sounds/sf2/FluidR3_GM.sf2
6074

61-
fluidsynth -a alsa -m alsa_seq -l -i /usr/share/sounds/sf2/FluidR3_GM.sf2 \
62-
-s --portname=Fluidsynth
75+
In this case, the device will always remain the same, and you can then use the
76+
option `serial_port = midi:FluidSynth` and it will work across reboots.
6377

64-
You can then use the option `serial_port = midi:Fluidsynth`.
78+
On macOS, a relatively easy way to get fluidsynth installed is to install it
79+
via Homebrew:
80+
81+
brew install fluidsynth
82+
83+
You need a soundfount as well. A good choice is FluidR3_GM.sf2.
84+
FIXME: Download link for FluidR3_GM.zip on fs-uae.net
85+
86+
fluidsynth -l -i -s --portname=FluidSynth FluidR3_GM.sf2
6587

6688
## Suggestions for future improvements
6789

6890
Split midi device name out from the serial port option? `serial_port_type` ?
6991

70-
serial_port_type = serial|midi|midi-mt32 ?
92+
serial_port_type = serial|midi|mt32 ?
7193
midi_device = xxx ?
72-
midi_mt32_device = yyy ?
94+
mt32_device = yyy ?
95+
96+
Maybe also allow `midi_device = fluidsynth` and dynamically try to deduce the
97+
port name ("Synth input port" on Linux, etc). Even more, with midi_device
98+
missing, perhaps try to default to FluidSynth on Linux (if found), the default
99+
software midi sequencer on Windows, and (???) on macOS?
100+
101+
### Package FluidSynth as a plugin?
102+
103+
Maybe include as Utilities/FluidSynth? Soundfonts can be included in the
104+
FluidSynth package.
105+
106+
### Notes
107+
108+
Default device names (process numbers are examples):
109+
110+
Fluidsynth:
111+
112+
Linux: Synth input port (547769:0)
113+
macOS: FluidSynth virtual port (17220)
114+
115+
MT32Emu-qt:
116+
117+
Linux: Standard
118+
macOS: Mt32EmuPort
73119

74120
## Credits
75121

docs/options/fullscreen

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Description: "Start FS-UAE in fullscreen mode"
1+
Description: "Start emulator in fullscreen mode"
22
Default: 0
33
Example: 1
44
Type: boolean

docs/options/fullscreen_mode

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Summary: "Fullscreen Mode"
1+
Summary: "Fullscreen mode"
22
Default: desktop
33
Example: fullscreen
44
Type: Choice
@@ -8,6 +8,5 @@ the fake fullscreen support (a borderless window the size of the current
88
display will be created instead of switching to real fullscreen).
99

1010
Value: fullscreen ("Fullscreen") - Classic fullscreen mode (SDL_FULLSCREEN)
11-
Value: desktop ("Fullscreen Desktop") - New fullscreen mode (SDL_FULLSCREEN_DESKTOP)
12-
Value: window ("Fullscreen Window") - Frameless window with same size as desktop
13-
11+
Value: desktop ("Fullscreen desktop") - New fullscreen mode (SDL_FULLSCREEN_DESKTOP)
12+
Value: window ("Fullscreen window") - Frameless window with same size as desktop

fsdeps/packages/portmidi

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ index 4919b78..c329001 100644
4545
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
4646
4747
-set(CMAKE_OSX_ARCHITECTURES i386 ppc x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE)
48-
+set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE)
48+
+# set(CMAKE_OSX_ARCHITECTURES i386 ppc x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE)
4949
5050
PROJECT(portmidi)
5151

libfsemu/src/ml/input.c

+4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ int fs_ml_post_event(fs_ml_event* event)
7373

7474
char *fs_ml_input_fix_joystick_name(const char *name, int upper)
7575
{
76+
if (name == NULL) {
77+
return g_strdup("NULL");
78+
}
79+
7680
char *n, *temp;
7781
n = g_strdup(name);
7882
g_strstrip(n);

0 commit comments

Comments
 (0)