iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iiwusynth-devel] Puzzle involving multiple soundfonts


From: M. Nentwig
Subject: Re: [iiwusynth-devel] Puzzle involving multiple soundfonts
Date: Wed, 11 Dec 2002 11:52:10 +0200

Hi,

for some reason this didn't make it to the list. So here I send it
again.

> Hi,
>
> In my understanding the 'feature' is a bug, I have encountered the
same
> problem.
>
> When you load a sound font, instrument 0 is automagically assigned to
> channel 0, instrument 1 to 1 etc. Convenient for lazy
> single-soundfont-users like me. But it's practically impossible to use

> several soundfonts at once: 'prog' or 'select' always tries to look up

> the desired program from the last soundfont loaded. Only if the preset

> does not exist there, then the previously loaded soundfont is tried,
> etc (sound font stack).
>
> If your two sound fonts use different bank IDs, then you can use the
> 'select' command:
> select 0 1 2 puts instrument 2 from bank 1 into channel 0. But you
said,
> both are bank 0, so that doesn't work.
>
> Here is a workaround / hack / one-line-patch (based on the latest CVS
> version):
> - Edit iiwusynth/src/iiwu_synth.c
> - Find the following routine:
>
> * iiwu_synth_program_reset
>  *
>  * Resend a bank select and a program change for every channel. This
>  * function is called mainly after a soundfont has been loaded,
>  * unloaded or reloaded.  */
> int
> iiwu_synth_program_reset(iiwu_synth_t* synth)
> {
>   int i;
>   /* try to set the correct presets */
>   for (i = 0; i < synth->settings.midi_channels; i++){
>     iiwu_synth_program_change(synth, i,
> iiwu_channel_get_prognum(synth->channel[i]));
>   }
>   return IIWU_OK;
> }
>
> - comment out one line and make install:
> /* iiwu_synth_program_change(synth, i,
> iiwu_channel_get_prognum(synth->channel[i])); */
>
> That's what I did when I faced the same problem. Now you'll have to
load
> the programs by hand after loading a soundfont, as in
> load somesoundfont.sf2
> prog 0 0
> load someothersoundfont.sf2
> prog 1 0
>
> Please let me know, if you have problems finding the right lines in
your
> version (send your iiwu_synth.c).
>
>
>
>
> As a permanent solution we could limit iiwu_synth_program_reset to the

> first sound font on the stack (automatic program assignment will not
> happen for the 2nd, 3rd etc sound font). But maybe there are better
ways
> to handle this. Ideas?
>
> -Markus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]