iiwusynth-devel
[Top][All Lists]
Advanced

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

[iiwusynth-devel] New settings system


From: Peter Hanappe
Subject: [iiwusynth-devel] New settings system
Date: Thu, 19 Dec 2002 02:50:41 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1


Hi all,

Major changes. Probably major bugs, too :| Changing the settings was
more work than I initially thought but I think the system is a good
basis to build upon later. It's currently only used for the already
existing settings; I haven't used it, yet, to set the reverb parameters,
for example. Together with the settings, I redid the interface to the
audio and midi drivers.

Creating the synthesizer, and an audio thread, goes like this:

    iiwu_settings_t* settings;
    iiwu_synth_t* synth;
    iiwu_audio_driver_t* adriver;

    settings = new_iiwu_settings();
    iiwu_settings_setstr(settings, "audio.driver", "alsa");
    // ... change settings ...
    synth = new_iiwu_synth(settings);
    adriver = new_iiwu_audio_driver(settings, synth);

    // do your thing

    delete_iiwu_audio_driver(adriver);
    delete_iiwu_synth(synth);
    delete_iiwu_settings(settings);

As you can see, the synth object no longer depends on the audio
drivers. There 15 functions in total to create/destroy and deal with
settings.  I won't explain them here. Documentation is coming,
remember?  The ones you probably need most are

  - iiwu_settings_setstr/iiwu_settings_getstr, and
  - iiwu_settings_setnum/iiwu_settings_getnum.

'string' settings can now have an associated list of possible values.
They also have a 'hints' field, to indicate that the setting is an
option list or a file name.

The list of all currently available settings, with their default
values, is:

    audio.periods            16.000000
    audio.alsa.device        default
    audio.sample-format      16bits
    audio.period-size        64.000000
    audio.oss.device         /dev/dsp
    audio.driver             alsa
    audio.jack.id            iiwusynth
    audio.jack.multi         no
    midi.alsa.device         default
    midi.alsa_seq.device     default
    midi.alsa_seq.id         pid
    midi.oss.device          /dev/midi
    midi.driver              alsa
    synth.reverb.active      yes
    synth.ladspa.active      no
    synth.midi-channels      16.000000
    synth.polyphony          256.000000
    synth.sample-rate        44100.000000
    synth.verbose            no
    synth.chorus.active      yes
    synth.effects-channels   2.000000
    synth.gain               0.200000
    synth.audio-channels     1.000000
    synth.dump               no
    synth.audio-groups       1.000000
    shell.prompt             >


Note the "shell.prompt". I thought that was smart.  The shell commands
to handle/view settings are 'settings', 'set', 'get', and 'info'.  For
example 'info audio.driver' will show you the list of possible audio
drivers.

I hope I didn't break too many things. I updated the windows version
as well as I could (my win machine has hardware problems), but I didn't
update the macintosh version.

BTW, iiwuplay is obsolete and no longer compiled.

Cheers!
Peter




reply via email to

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