Author Topic: Assigning multiple soundfonts to different midi channels + Low volume  (Read 543 times)

Anthony Y

  • Posts: 7

I am playing a midi file(pre-built, not live) using BASS library.
I was wondering if I can set different soundfonts to different midi channels.

Let's say, in the midi file, channel0 is piano and channel9 is drums.
I want to set piano.sf2 to channel0 and drums.sf2 to channel9.

Can this be achieved?

Oops, I found the right document and trying it now.

I also noticed the general volume is very low and by initiating the library as [BASS.BASS_Init(-1, 44100, BASS.BASS_DEVICE_AUDIOTRACK)], it boosts up the volume a bit.
Is it something to do with the library or more to do with the soundfont that I am using?

Thanks in advance.
« Last Edit: 8 Apr '19 - 15:46 by Anthony Y »

Ian @ un4seen

  • Administrator
  • Posts: 22606
When OpenSLES output is used (BASS_DEVICE_AUDIOTRACK flag not used), it may automatically enable low latency mode, which bypasses the system's effect processing. That could result in the volume level being different on some devices. The BASS output is identical in both cases. If a stream's level is low to begin with (you can check that with BASS_ChannelGetLevelEx), you can boost that via its BASS_ATTRIB_VOL setting. The MIDI_EVENT_MASTERVOL event can also be used to change the level of a MIDI stream, and BASS_MIDI_FontSetVolume used to change the level of an individual soundfont.

Anthony Y

  • Posts: 7
Thank you Ian,

Yes, I was also using MIDI_EVENT_MASTERVOL to increase the volume.
I wasn't sure if I was doing it correctly (BASS_DEVICE_AUDIOTRACK + MIDI_EVENT_MASTERVOL), I was just worried about how it may sound on other devices.

Thank you for the tip of BASS_MIDI_FontSetVolume, it will be very needed in the future.

Thank you.