|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Newbie
Join Date: Jul 2003
Posts: 5
Rep Power: 0 ![]() |
Hello!
I am new here and as an Kx drivers user, so first of all... thank you Eugene for your effort and generosity, leting us use your driver! It is great, way ahead than CL one. Now the question. I have an Audigy 1 Platinum eX (Latin American Edition) and I still mailny use the old Cakewalk for Windows v2.0 (because of the clever mouse usage, lost in further versions). I isntalled the Kx 3533b driver version. I jumped into Kx after facing the sad and poor MIDI capabilities of the CL drivers, but now I am having troubles with SoundFonts, and I believe I didn´t understood how to use them properly with Kx. While I can upload SFs (except for very large ones like Fluid3GM), I didn´t found a way to assign it to just one of the two MIDI synths, as the CL drivers allowed me to. In the other hand, it makes sense to make available in memory a SF for the two synths at once... but here is when things start blurring. The Kx MIDI interface chart states that the MIDI CC 32 is being used, adding the value to the CC 0 value to be able to address 251 banks, so it seems to me that Kx driver gathered both syths resources, as if it were just one synth, but, in the other hand, when assigning MIDI devices in WinCake, there are two separate syths to choose: "kX Synth SB0090 10k2 [e800]" and "kX Synth2 SB0090 10k2 [e800]"... but in the other hand, no matter wich one I choose, or if I choose both at once to address different tracks to each one, there is no difference. To get even more confussed, the SF manager let you assign a bank to the SF being loaded, up to me, as if t were a .SBK file with just one bank, when .SF2 files defines a whole set of banks, in CL drivers, mapeable trough the Instrument pane, and addressable via the CC 0. The late is the way I already used SFs to compose pieces with my old AWE64G that I am trying to enhance with the Audigy+Kx, loading several SFs at once, by then, ensuring the banks of all the SF doesnt overlap. But here it doesn´t matter wich bank you choose to load one SF into, because it seems the channel and bank I choose in WinCake overrides it. Did you notice that when you address an unused bank instrument, the sound you get is the one from the first instrument found in the first bank below the chosen one? Well, with Kx, the sound of both instruments overlaps, this one plus the wanted one in the next loaded bank. Example: #1 (Bank 0) 4GMGSMT1.SF2 #2 (Bank 0) Saxs.SF2 Now, 4GMGSMT1.SF2 have GM in bank 0, serveral instrument variations in other banks, GS in bank 127, but for sure the bank 10 is empty. Saxs.SF2 is a set of instruments in bank 10 exclusively, no variations nor other banks used. It doesnt matter if I load Saxs.SF2 into bank 0 or bank 10, because the behavior is the same. When you send a MIDI note on in a channel addressed to bank 10 with CC 0, it sounds, overlaped, the wanted note in Saxs.SF2 and the note corresponding to the insrument defined in 4GMGSMT1.SF2 in the fisrt used bank below the current one, i.e., same instrument from bank 0. Now, if you rearrange the order of the loaded SFs, as example, reloading Saxs.SF2, (or start up with this arrangement), again, no matter the chosen bank, to get this: #1(Bank 0) Saxs.SF2 #2(Bank 0) 4GMGSMT1.SF2 Everithing work fine, i.e., when sending the vary same MIDI note on under the same context, you get only the desired instrument. So, at first, it seems there is a "boundary" problem here, in the first case, so the driver seems to behave as if the first loaded bank were "alone" in memory, playing the note it would if it were alone, and then going up trough the list of loaded SFs and playing the second bank note too. When the loading order is reversed, the behavior seems to be, the driver find an used bank, play the note and stop right there. In other words, it seems the driver is checking whether an instrument is defined for the current bank to stop looking for further samplings in other SFs, but not to prevent playing it hoping to find out later another SF with a defined intrument. Being unable to load SFs into each one of the syths, and having this behavior, it seems to become impossible to load, let say, two different SFs each one with a whote GM set, and address an isntrument from the second one without hearing the same instrument fromt first one overlaped. So, I am lost. Is this the desired behavior? if so, wich are the adventages, and how I can load several SFs and address to each one inner bank from different tracks, without having other instruments overlapping? Thank you very much in advance. Marcos
__________________
Marcos |
|
|
|
|
|
#2 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
we currently don't support separate soundfont arrays for each kX Synth (but this is technically possible in the future)
there might be minor bugs in soundfont code that cause the issues you've mentioned I'll have a closer look over the code thanks for your detailed message!/Eugene |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Jul 2003
Posts: 5
Rep Power: 0 ![]() |
Eugene, thanks for the fast and straight answer!
(btw, it seems CL people have a lot to learn from you, not only on how to program devices for their own products). Ok, but then I have a couple of questions. 1) Not having two separated SF arrays for each synths would mean you can only use one of them? 1.a) If so, then, why there are two devices registered for each one of them? 1.b) If not, (else :-D), how can you use the second one? The Kx MIDI implementation chart say you can address 250 instruments using both MIDI CC 0 and 32, wich made me think it is a way to reach the second synth instruments, so even with your answer, I still don´t follow, I mean... it seems then you can use only 16 MIDI channels at once, but using MIDI CC you could be changing them among a set of 250 instruments loaded in memory... this is the designed behavior? Thank you again. PS: Do you need me to build up and rum some test cases to help you isolate some suspected bugs? If so, let me know.
__________________
Marcos |
|
|
|
|
|
#4 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
so, let's clarify this point
![]() there are two synth devices - Synth and Synth2 (each provides 16 MIDI channels -- so you can have 32 MIDI channels and 32 separate instruments playing simultaneously) -- the synths are completely independent there is, however, one soundfont-capable device that provides soundfont data to both synths (well, the recent driver versions behave as if there are two of them -- run Vienna to check that)anyway, in the very deep internals of the driver there's only one array of soundfonts that are shared between Synth and Synth2 (there's no technical problem implementing a more complex scheme: for instance, you'll be able to load a soundfont to be used by Synth1, Synth2 or both -- if users request this feature I will add it) now to bank selection methods ![]() there are two midi controllers for selecting banks - CC00 and CC32 the MIDI standard is not 100% clear when dealing with bank selection moreover, different creative/e-mu/third-party software process these messages differently for instance, in the recent Creative drivers there's a choice: LSB, MSB,... kX Driver uses a not-very-good-but-working scheme when the target bank is calculated this way: target_bank=CC00+CC32 that is, you can use ~250 banks (127+127; some values are reserved) and kX Synth responds to both CC00 and CC32 I'm unsure if this solution is the best simply because I implemented it a very long time ago and haven't revised it for ages. Probably a user-selectable option would be a better way of dealing with banks. that is: (1) LSB: target_bank=CC00+CC32*127 (2) MSB: target_bank=CC32+CC00*127 (3) LSB only: target_bank=CC00 (CC32 is ignored) (4) MSB only: target_bank=CC32 (CC00 is ignored) (5) kX-compatible (the present method) btw, I've just found a minor bug that might cause the CC32 to be processed incorrectly, especially if you try to send multiple CC32 messages ![]() =--- and now the third part of soundfont stuff: soundfont processing (which might cause multiple notes etc...) there's a bug when dealing with multiple soundfonts with used/unused banks the present algorithm processes soundfont array this way: for each registered soundfont: { [step 1]: find an instrument with bank=current_bank, intrument=current_program if (found) -> process corresponding samples if not found & bank # isn't 0 -> set current_bank=0 and goto to step 1 [this is done to be sure that any non-existing bank will still produce sound from bank0] } so, there's no check if the instrument was already found in the prev. soundfont ![]() and, finally, the soundfonts are processed in reversed order (the LIFO discipline) let me know of any improvements or additional bugfixes to be included in 3534 release /Eugene |
|
|
|
|
|
#5 |
|
DH Senior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64 ![]() ![]() ![]() ![]() |
Hi Eugene,
>anyway, in the very deep internals of the driver there's only one array of soundfonts that are shared >between Synth and Synth2 (there's no technical problem implementing a more complex scheme: >for>instance, you'll be able to load a soundfont to be used by Synth1, Synth2 or both -- >if users request this feature I will add it) If this means we can get 32 usable (separate) midi channels then.. Please Do! >for each registered soundfont: >{ >[step 1]: >find an instrument with bank=current_bank, intrument=current_program >if (found) -> process corresponding samples >if not found & bank # isn't 0 -> set current_bank=0 and goto to step 1 >[this is done to be sure that any non-existing bank will still produce sound from bank0] >} Aha,...I guess this explains (the rather strange behaviour) that when you load a SF in Bank0, then load a SF in bank1 and play notes on an instrument in SF bank1 which has not all keys mapped to a sample, you will hear the sound of it's Bank0 counterpart instead of silence. Regards, /LM |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Jul 2003
Posts: 5
Rep Power: 0 ![]() |
Eugene,
Thank you very much for such a detailed explanation!!! I really appreciate it. Here we have an expression I would translate this way: "Perfection is a goodies enemy", wich you use to hear among developers. You know, when you try to improve an already working feature, risking to mess it up. So, the chosen schema is more than fine for me. It just was uneclear and the little bug went against my understanding. There is a sligltly confussion allowed by the use of the term bank both as a selectable instrument via MIDI, and the SoundFont slot, so, I´d suggest to stick to (as I understand) what was the original terms used in the begining of MIDI: banks and patches. If you allow me, i´ll use them to help avoid confussion, saying that: a) an slot is an instrument set inside a SoundFont (what in Vienna is called a bank). a) a bank is the SoundFont loaded slot position in the memory array. b) a patch is the mapping between the sequencer and the bank, the number used to refer to that particular instrument, selectable via MIDI CC 0+CC 32.. I know I am not properly sticking to MIDI terminology, and also that there are no formal deffinition for those terms. But this way we have three different words to solve the ambiguity. Now, please, let me make a "multiple choice" to get it straight: Both CC 0 and CC 32 are "conmutative operands", i.e.: CC 0 value = 120, CC 32 value = 25, the selected patch is 145. CC 0 value = 25, CC 32 value = 120, the selected patch is 145 too. CC 0 value = 121, CC 32 value = 24, the selected patch is 145 again. 1.a) True 1.b) False There are reserved "patches" so you just have 250 of them to choose. But also, you usually can reach the bank 127 by specifying the patch 127, so, may I assume the patches goes from 1 to 127, reaching the bank 127 with this last value? 2.a) True. 2.b) False. Since version 2.0, the SoundFonts support several slots or banks: Having a SoundFont with several slots defined, should we translate them as "zero based", adding the slot number to the bank assigned to it, so the chosen bank on loading would refer to the SoundFont slot 0, and you can select further slots incrementing the patch, implicitily refering to the next slots in the same SoundFont? As example, assuming a SoundFont have a slot 0, a slot 10, and a slot 127, if we load it in bank 10, then: MIDI CC0+CC32 value (patch) 10, reffers to the SF slot 0 MIDI CC0+CC32 value (patch) 20, reffers to the SF slot 10 MIDI CC0+CC32 value (patch) 137, reffers to the SF slot 127 And further, if we load another SoundFont with the same bank arrangement in the bank 1, then: patch 10 reffers to SF slot 0 on bank 0 patch 11 reffers to SF slot 0 on bank 1 patch 20 reffers to SF slot 10 on bank 0 patch 21 reffers to SF slot 10 on bank 1 patch 137 reffers to SF slot 127 on bank 0 patch 138 reffers to SF slot 128 on bank 1 3.a) True. 3.b) False. If all the above is true, the only problem would be to be able to reach at once the slots 127 from two SoundFonts loaded in memory, but to solve the problem you wouldn´t have to change your current schema. I think all we need is a tool to make a SoundFont "batch editing", enabling us to easily rearrange the slots inside the file. The program would have to ask for the original slot and the new one, and make a copy of the SoundFont file, replacing the slot numbers (or rearranging the array content, I don´t know the SF structure details). I am pretty busy right now, but with some support on the SF inner structure, I could contribute writing such a tool. Thank you again.
__________________
Marcos |
|
|
|
|
|
#7 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
slot: the starting number of the first bank
bank: a set of instruments selectable via MIDI CC00/32 1: should be; but due to minor bug it is not this way at the moment (at least it depends on the order CC0 and CC32 are sent) I'll fix that in 3534b 2: you can upload a soundfont into any bank/slot (0..250) via the kX Mixer if the soundfont contains different 'banks' (say, 4,6,100) -> and you upload it into the slot 5, you will get the following 'banks': 9,11,105 you can select the banks either by using CC0 or by using CC32 or by using both (provided the bug is fixed )the '250' number was used because it is approximately 127+127 (maximum CC value) >250 values are reserved for Vienna /Eugene |
|
|
|
|
|
#8 |
|
DriverHeaven Junior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 68
Rep Power: 0 ![]() |
I have a request for an improvement of the SoundFont system: could I be made possible to assign a drum channel to every channel and a non-drum channel to channel 10?
Harm |
|
|
|
|
|
#9 |
|
kX Project Lead Programmer and Coordinator
Join Date: Dec 2002
Posts: 3,119
Rep Power: 75 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
>> could I be made possible to assign a drum channel to every channel and a non-drum channel to channel 10?
probably yes -- in the future /E |
|
|
|
![]() |
| Thread Tools | |
|
|