Giter Site home page Giter Site logo

Comments (13)

Wohlstand avatar Wohlstand commented on June 3, 2024 1

So, to get fixed this issue you need to use the "Alternative Native MIDI for Windows" module built to make sure the MIDI volume will don't affect the application-wide volume.

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Recently I have found that there are existing a MIDI drivers are don't affecting master MIDI volume change and keeping playing music with full volume. Roland Virtual Sound Canvas and Yamaha XG drivers on Windows XP are does that.

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Recently I have re-tested this on Windows 10: this behavior is absolutely same as in the past. Workaround is still be needed.

from sdl-mixer-x.

MyreMylar avatar MyreMylar commented on June 3, 2024

Quick question, as I'm not a MIDI expert and related to the above linked pygame bug.

Would changing the MIDI back-end to something open source like FluidSynth also resolve this issue for a user of SDL Mixer? Assuming those changes of yours eventually make it into the official SDL Mixer version?

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

@MyreMylar, yes, this issue does NOT affects other synthesizers like FluidSynth, Timididty and these are added to MixerX exclusively: libADLMIDI and libOPNMIDI. This issue affects only the NativeMidi, happens only on Windows, happens only in a condition you will use Microsoft GS synthesizer as default MIDI synthesizer. Another way to avoid this issue is installing of a custom system-wide MIDI synthesizer (like Yamaha SyXG50).

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Because of this issue, a libADLMIDI is used in MixerX as a default system independent MIDI synthesizer.

from sdl-mixer-x.

MyreMylar avatar MyreMylar commented on June 3, 2024

Thanks! That was what I was assuming.

So it sounds like the issue with windows MIDI volume affecting all sounds in pygame might resolve itself if your changes all get ported into the Official SDL Mixer that pygame uses (assuming pygame also updates to the latest SDL at that point).

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

This issue happens with MSGS only and doesn't depends on Mixer itself. Therefore I told that I should to develop a workaround to completely resolve this problem and allow using of Native MIDI safely.

from sdl-mixer-x.

rversteegen avatar rversteegen commented on June 3, 2024

Recently I have found that there are existing a MIDI drivers are don't affecting master MIDI volume change and keeping playing music with full volume. Roland Virtual Sound Canvas and Yamaha XG drivers on Windows XP are does that.

I'm not sure I understand what you wrote here. Do you mean that those MIDI drivers are broken and ignore the master MIDI volume? So you think that injecting per-channel volume commands could also fix that problem too?

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Do you mean that those MIDI drivers are broken and ignore the master MIDI volume?

Microsoft GS Wavetable Synthesizer is only buggy. Yes, per-channel volume injecting should resolve this issue. Look at algorithm:

  • keep the global factor 1.0...0.0 as a volume level (full or silent).
  • on a moment of volume change, multiply last sent CC7 value multiplied to the factor and immediately send it to MIDI output (per every channel).
  • every time CC7 is sending by MIDI stream, you should multiply it with to a factor (per every channel).
  • midiOutputVolume() set to maximum since initialization.

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Anyway, current code doesn't allows to implement this workaround quickly, therefore I going to implement some sort of this to use in MixerX instead of old code: https://github.com/Wohlstand/BW_Midi_Sequencer/tree/master/examples/win32-midiOut
However, it's C++, and may looks unapproveable if the pure-C only is needed. Note that this thing is not ready yet and I still need to implement that workaround, however, with my code it looks easier to implement it.

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Okay, since ages, I desired to finally fix out this. So, meet the alternative NativeMIDI for Windows: 8277fe5

  • I had to use my own MIDI sequencer to extend functionality: full seekability, loop points, XMI/MUS formats support.
  • I tricked over 7'th controller and I applied the volume factor to all channels. In result, the workaround for MSGS now works.

from sdl-mixer-x.

Wohlstand avatar Wohlstand commented on June 3, 2024

Anyway, until I'll rewrite the MIDI Sequencer into pure C, this update will be MixerX exclusive (I don't think the official Mixer would take the C++-coded part into project).

from sdl-mixer-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.