iiwusynth-devel
[Top][All Lists]
Advanced

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

[iiwusynth-devel] API function to change voice parameters at play time


From: M. Nentwig
Subject: [iiwusynth-devel] API function to change voice parameters at play time
Date: Sun, 12 May 2002 21:38:10 +0300

> Since Swami uses the sfloader all generators/modulators will be loaded

> at note-on time. It appears from the current version of
> iiwusynth that I
> have that there isn't a way to load modulators yet via the
> sfloader API.

I'm not too deep into the sfloader stuff yet, but I thought that Swami
simply replaces the functionality in iiwu_defsfont.c?
In this case, it can add modulators with
              iiwu_voice_add_mod(voice, mod, IIWU_VOICE_ADD);

Changing -modulators- of an already running voice doesn't look too
attractive to me (in terms of 'headache per usefulness'). Generators,
yes.

> It might be nice to have a routine to set/offset a generator on a
> particular voice without using modulators though. I remember we
> discussed this a little before. I think the conclusion at
> that time was
> that iiwusynth doesn't know what voice pertains to a particular zone.
> Through the sfloader it would be possible for Swami to keep track of
> what voice is created for a zone though. The only problem I see with
> having routines that use iiwu_voice_t after it has been
> started is that
> we don't know when it will be destroyed. If there was some way to keep

> track of Swami's reference to a voice and/or have some sort
> of callback
> when a voice gets destroyed, this could be solved?

I see a way:
    Again, in iiwu_defsfont.c, a new voice is created with
          voice = iiwu_synth_alloc_voice(synth, sample, chan, key, vel);

At this time, the unique ID of the voice is set. So you can store the
voice and its unique ID.
When referring to it later, use 'voice', and check, if the ID is still
the same (and it is not off).

> I see that there is already a routine called 'iiwu_voice_gen_incr' and

> the *_set routine of course. These aren't real time though, but the
> routines would look the same at least from the callers perspective.

iiwu_voice_gen_incr should in fact do the job. The only drawback is,
that the caller has to remember the amount, that it has already added to
the generator.

>
> Do you think that a real time generator control API could be created
> with relatively little effort? :)

I think so. Maybe we don't need any additional functions.

> On a somewhat unrelated note. It doesn't appear that there is yet any
> way to set the pitch_wheel_sensitivity which I guess is
> normally a MIDI
> RPN message of 0. A simple routine like
> 'iiwu_synth_pitch_bend_sensitivity' would do the trick for what I need

> it for. I may do this myself if no one else gets around to it.

Try
 http://prdownloads.sourceforge.net/millisampler/iiwu_17_tar.bz2
I was unable to test it (no MIDI interface at hand to start the synth).
Anyway, at the moment pitch wheel sensitivity can only be accessed
through the API function (no MIDI response, no command line equivalent).

> Also I noticed a bug in iiwu_cmd.c for the 'iiwu_handle_reverbsetwet'
> routine. You'll notice that it uses iiwu_revmodel_setwidth to set the
> value, should be iiwu_revmodel_setwet? (a copy/paste foo :)
Yes, that's a bug. And now that I see it, badly hidden...

> Keep up the excellent work! Cheers.
>  Josh Green

You too!
Cheers

Markus





reply via email to

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