UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStarâ„¢
https://usdx.eu
GNU General Public License v2.0
832 stars 160 forks source link

Midi notes not playing when editing songs #438

Closed ChrisHap closed 5 years ago

ChrisHap commented 5 years ago

Actual behaviour

When editing a song and pressing SHIFT+SPACE (keybinding for "Play MIDI for current note") the animation for playing the note is shown, but no sound is playing. This also effects all other modes when trying to play the MIDI sounds.

Expected behaviour

The MIDI sound of the note(s) should be played.

Steps to reproduce

  1. Open ultrastardx
  2. Start "Sing" and select a number of players
  3. Select a song you want to edit and press "E" to open the editor
  4. Press "SHIFT+SPACE" or another combination of keys to play a midi note

Details

Provide some additional information:

s09bQ5 commented 5 years ago

Are you running a software Midi synthesizer like Fluidsynth or Timidity++? Did you set the synthesizer as default in the PmDefaults application of Portmidi?

ChrisHap commented 5 years ago

Thank you very much for taking your time and looking into this. In the last days i have looked into your suggestions and tried integrating them with my system. By now i have come as far as integrating fluidsynth with pulseaudio through the following command (not including installation): fluidsynth -a pulseaudio -m alsa_seq -i -s -p FluidSynth -R 0 -C 0 -c 2 -z 512 -r 48000 /usr/share/sounds/sf2/FluidR3_GM.sf2 When everything is working for me i will make it a user service. I can play midi files with aplaymidi when specifying the correct port, but usdx still doesn't play the midi sound.

You also suggested setting fluidsynth as default in PmDefaults, but i can find no way to install it on my machine. I have installed a version of the libportmidi library, but im guessing that is not correct...

I have just discovered the aconnect command. With this and aseqdump i was able to figure out, that ultrastar is sending midi-notes to "Midi Through" on port 14. When i connect port 14 with 128 (my fluidsynth port) i still can't hear the midi-notes. When i use aplaymidi with port 14 it is working (playing seperate files), but not showing any output in aseqdump. Do you have any advice on where to look further or what to do?

s09bQ5 commented 5 years ago

Put

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
<map MAP_XML_VERSION="1.0">
  <entry key="PM_RECOMMENDED_OUTPUT_DEVICE" value="Synth input port"/>
</map>

into ~/.java/.userPrefs/PortMidi/prefs.xml That's the file PmDefaults would create.

ChrisHap commented 5 years ago

Thank you again, but that was not what finally helped me. After looking deeper into fluidsynth i found the gui qsynth which helped me visualizing everything. I found out that the notes where playing in fluidsynth, but the songs where set too high. So after transposing the notes down a bit, they are finally playing.

Again thank you very much! You helped me find the resources on the way and i learned a lot doing this!