[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[iiwusynth-devel] Swami: No sound in iiwusynth
From: |
M. Nentwig |
Subject: |
[iiwusynth-devel] Swami: No sound in iiwusynth |
Date: |
Wed, 19 Jun 2002 10:17:48 +0300 |
Hei,
I found the problem, why Swami doesn't produce any sound with Iiwusynth.
It is indeed related to the default modulators: Swami creates two
modulators for MIDI controller 7 and 11, which have the wrong polarity.
So each of them adds 96 dB of attenuation. Setting their amount to 0 in
Swami fixed the problem temporarily.
There is no need to create default modulators, Iiwusynth will add them
by itself.
Probably it's more interesting to turn them off: Create an identical
modulator with negative amount. The definitions are in iiwu_synth.c, for
example
/* SF2.01 page 55 section 8.4.5: MIDI continuous controller 7 to
initial attenuation*/
iiwu_mod_set_source1(&default_att_mod, 7, /*
index=7 */
IIWU_MOD_CC /* CC=1
*/
| IIWU_MOD_CONCAVE /*
type=1 */
| IIWU_MOD_UNIPOLAR /* P=0
*/
| IIWU_MOD_NEGATIVE /* D=1
*/
);
iiwu_mod_set_source2(&default_att_mod, 0, 0); /* No
second source */
iiwu_mod_set_dest(&default_att_mod, GEN_ATTENUATION); /*
Target: Initial attenuation */
iiwu_mod_set_amount(&default_att_mod, 960.0); /*
Amount: 960 */
To debug modulators, edit iiwusynth and uncomment the dump_modulators
line in iiwu_voice.c:
for (i = 0; i < voice->mod_count; i++) {
iiwu_mod_t* mod = &voice->mod[i];
iiwu_real_t modval = iiwu_mod_get_value(mod, voice->channel, voice);
int dest_gen_index = mod->dest;
iiwu_gen_t* dest_gen = &voice->gen[dest_gen_index];
dest_gen->mod += modval;
/* iiwu_dump_modulator(mod); */
};
Or put some printfs there, that's what I did.
Warning: dump_modulator is a bit buggy (some source names are muddled up
with CCs); will be fixed soon.
Cheers
Markus
- [iiwusynth-devel] Swami: No sound in iiwusynth,
M. Nentwig <=