Sound Command
#11
(12-23-2022, 01:53 AM)johnno56 Wrote: My next question is in relation to 'channels'... When it comes to midi playback is QB64pe capable of being polyphonic?

Can an individual instrument be selected from the soundfont or must the soundfont be of only one instrument?

I haven't gotten around to testing the MIDI/SF2 functionality of QB64PE.

Otherwise, it depends on the capabilities of the Soundfont player. Some players are rather inefficient, forcing the user to load one SF2 file for each MIDI channel which gobbles up a lot of RAM. Others (like Muse Score) could only support one Soundfont for the 16 MIDI channels. I remember Qsynth has a system to load Soundfonts but it's not for people who like consistent settings for MIDI bank and program. What I mean is, the order of load of Soundfonts in that program is very important. One doesn't want to load an SF2 file with only one "instrument" which was "recorded by hand", before a 128-instrument SF2 file, when the music calls for more instruments than is supported by the file "recorded by hand".

My guess is QB64PE supports one Soundfont at a time, for up to 16 MIDI channels. Each MIDI channel should have an assignment for program at least, from 1 to 128. Bank is possible too but it depends on the Soundfont to support more than one bank which would increase its size. QB64PE could ignore the bank requested by a channel in the MIDI file, always assuming the first bank. Most of the General MIDI sound banks have only one bank of 128 instruments anyway. It gets dicey if drum kits should be supported as well, like those loved so well out of R____d and Y____a.

EDIT: Since you are already tinkering, you should get a good MIDI editor which allows changing the MIDI program for a given MIDI channel. A single-digit program is usually for piano; try changing it to 32 or so to get a bass sound, to around 50 to get a string sound, to at least 112 to get ethnic percussion and so on. The MIDI channel 10 should be reserved for drum sounds in some music creation software.
Reply
#12
After examining the $MIDISOUNDFONT and _SNDPLAYFILE commands, I am going to assume that, the safest bet would be only one instrument at a time (soundfont) as the PLAYFILE command can play a multi-instrument midi file as it is....  So, I would have to conclude, as previously suggested, obtain a midi editor and an application that will create individual soundfonts for specific instruments....

Sounds like fun... (no pun intended)...
May your journey be free of incident. Live long and prosper.
Reply
#13
Good luck with your Cello World program. (Pun definitely intended).

Pete
Reply
#14
(12-23-2022, 04:20 AM)johnno56 Wrote: After examining the $MIDISOUNDFONT and _SNDPLAYFILE commands, I am going to assume that, the safest bet would be only one instrument at a time (soundfont) as the PLAYFILE command can play a multi-instrument midi file as it is....  So, I would have to conclude, as previously suggested, obtain a midi editor and an application that will create individual soundfonts for specific instruments....

https://muse-sequencer.github.io/

For Linux only, this program might be enough for it. I have used it for a short while but to arrange audio, it really sucks for timestretching and tempo-matching. But it seems to be pretty good handling MIDI. I wish I could tell you that I have used it with Soundfonts, my patience wasn't enough because I have something else that is "industrial stronger".

Disregard what is said below, otherwise it's at your own risk!



https://www.polyphone-soundfonts.com/

I have never used it, so you'll be better than me on it. It might be a better alternative than one available for a long time for Windows called Viena. Yes it's from the capital of Austria which was the same name as the Creative Labs Soundfont editor LOL. This Viena however was very buggy, I don't think it ever left "beta" version. It was confusing to use. Also there's no way to make use of special attributes like reverb, chorus and filter, away from E-Mu/Creative Labs equipment.

A program that I bought would be more clunky for you to use but I'm going to mention it anyway. It's called Chainer, it's a VST2 plug-in that could load as many other VST2 instruments and effects as your machine could handle, and play it all back with a MIDI controller. It has a feature to export to single-file SF2. You have to enable recording, play a key on your keyboard, stop it recording and then export. However, some Soundfont players can't read a file that Chainer creates by this method. I don't remember if Chainer saves a wave file somewhere so it could be edited, because no doubt it would have spaces and glitches that should be cut away.

EDIT: Almost forgot to mention that Chainer wasn't ported to 64-bit. To use it you would need an "older" machine, ie. one capable of only running Windows7 and/or the earliest versions of Ubuntu Studio. Wine could be used but things are starting to go against the older VST plug-ins built in the decade-2000, as the latest updates on Arch Linux, Fedora, Void Linux and a few others. Might want to get Debian "Bullseye" while you still can which has a version of Wine which is considered outdated but has worked very well for me with the older plug-ins. There's a successor to the VST2 format by Steinberg called VST3 which is a headache and incredible mess, to say the least possible. In the very least among free software, you're expected to use the latest releases of Ardour for that.

Now I'm not saying this stuff to discourage you, but this is just in case you want to go further in sample playback, much more capable than cheap pulsey sound from a PC speaker while towercase computers barely contained them, and a soundcard like Soundblaster Pro was still a "costly extra". With Soundfonts could certainly meet or exceed the standards set by IBM PCjr and Tandy1000 at least to play 3-note chords at a time. Smile
Reply




Users browsing this thread: 8 Guest(s)