iiwusynth-devel
[Top][All Lists]
Advanced

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

Re: [iiwusynth-devel] What I'm planning to do with iiwusynth


From: M. Nentwig
Subject: Re: [iiwusynth-devel] What I'm planning to do with iiwusynth
Date: Mon, 17 Feb 2003 07:25:57 +0200

Moi,

The generic callback capability is already there. It came with the MIDI
router.
Sorry, it's undocumented and the code is quite cryptic: The -dump
command line option invokes a callback for each MIDI event, that prints
the event data to stdout. The relevant lines from iiwusynth.c follows
after the mail (the callback functions are in iiwu_midi_router.c)

Soundfont selection: In my opinion still an unsolved problem, even if
the synth behaves like any other SF2 device. It may be less work to
implement a select command, that takes for example the bank filename as
argument, together with channel, bank and prog number.

I think you are the first person ever who is serious about using the Fx
unit. Sorry for the lack of documentation, an example is attached.

The LADSPA Fx unit can use any number of input 'groups':
The default is just one stereo group, which is the ordinary L/R output.
The command line option --audio-groups 2 changes that to two independent
outputs. Even and odd MIDI channels go to group 1 and 2, respectively.
In the Fx unit, the node names are in1_L in1_R for group 1, in2_L in2_R
for group 2 and so on. Currently only stereo output is possible, the
nodes are named out1_L, out1_R. Attached the log of a two-channel synth
session (two stereo equalizers, one branch runs through a phaser). The
plugins 'metronome' and 'tanh limiter' are not on the net yet.

Cheers

Markus

-------------------------------------------
  if (midi_in) {
    /* In dump mode, text output is generated for events going into and
out of the router.
     * The example dump functions are put into the chain before and
after the router..
     */
    router = new_iiwu_midi_router(
      settings,

*** If dump mode is on, call the dump_postrouter function, which in turn
will call synth_handle_midi_event.
*** Otherwise send the event directly to the synth
*** This happens for any event coming -out- of the MIDI router.

      dump ? midi_dump_postrouter:iiwu_synth_handle_midi_event,
      (void*)synth);

    if (router == NULL) {
      printf("Failed to create the MIDI input router; no MIDI input\n"
             "will be available. You can access the synthesizer \n"
             "through the console.\n");
    } else {
      iiwu_synth_set_midi_router(synth, router); /* Fixme, needed for
command handler */
      mdriver = new_iiwu_midi_driver(
        settings,

*** If dump mode is on, call the dump_prerouter function, which in turn
will call iiwu_midi_router_handle_midi_event..
*** Otherwise send the event directly to the router.
*** This happens for any event coming -out- of the MIDI router.

        dump ? midi_dump_prerouter:iiwu_midi_router_handle_midi_event,
        (void*) router);
      if (mdriver == NULL) {
        printf("Failed to create the MIDI thread; no MIDI input\n"
               "will be available. You can access the synthesizer \n"
               "through the console.\n");
      }
    }
  }



iiwusynth --dump --midi-channels 2 --audio-groups 2 --audio-channels 1 -o 
shell.port=9008 -s  -c 2 -z 128 -o synth.polyphony=128



reset
gain 0.2
load sf2/Moottoritie_00.sf2
select 0 10 0
select 1 10 1
reverb 0
chorus 1
ladspa_clear
ladspa_declnode E1_hfreq 8000
ladspa_declnode M1_bpm 120
ladspa_declnode P2_rate 1.1
ladspa_declnode R1_damping 0.5
ladspa_declnode E1_b1gain -8
ladspa_declnode P1_spread 1
ladspa_declnode E1_b2gain 0
ladspa_declnode E1_lgain 0
ladspa_declnode R1_width 0.8
ladspa_declnode E1_b1bw 1
ladspa_declnode E1_b2bw 1
ladspa_declnode P1_depth 0.5
ladspa_declnode E1_b1freq 300
ladspa_declnode E1_b3gain 0
ladspa_declnode R1_wet 0.5
ladspa_declnode P1_feedback 0.5
ladspa_declnode M1_onoff 0
ladspa_declnode E1_lslope 1
ladspa_declnode E1_b3bw 1
ladspa_declnode P2_spread 1
ladspa_declnode R1_size 0.8
ladspa_declnode E1_lfreq 100
ladspa_declnode E1_b2freq 1000
ladspa_declnode E1_hgain 0
ladspa_declnode P2_depth 0.5
ladspa_declnode R1_dry 1
ladspa_declnode M1_level 1
ladspa_declnode E1_b3freq 3000
ladspa_declnode E1_hslope 1
ladspa_declnode P2_feedback 0.5
ladspa_declnode P1_rate 0.9
ladspa_declnode L1_threshold 0.5
ladspa_add param_eq_3b_opt.so triplePara Low-shelving_gain <- E1_lgain 
Low-shelving_freq <- E1_lfreq Low-shelving_slope <-  E1_lslope Band_1_gain <- 
E1_b1gain Band_1_freq <- E1_b1freq Band_1_band <- E1_b1bw Band_2_gain <- 
E1_b2gain Band_2_freq <- E1_b2freq Band_2_band <- E1_b2bw Band_3_gain <- 
E1_b3gain Band_3_freq <- E1_b3freq  Band_3_band <- E1_b3bw High-shelving_gain 
<- E1_hgain High-shelving_freq <- E1_hfreq High-shelving_slope <- E1_hslope 
Input <- in1_L Output -> path1
ladspa_add param_eq_3b_opt.so triplePara Low-shelving_gain <- E1_lgain 
Low-shelving_freq <- E1_lfreq Low-shelving_slope <-  E1_lslope Band_1_gain <- 
E1_b1gain Band_1_freq <- E1_b1freq Band_1_band <- E1_b1bw Band_2_gain <- 
E1_b2gain Band_2_freq <- E1_b2freq Band_2_band <- E1_b2bw Band_3_gain <- 
E1_b3gain Band_3_freq <- E1_b3freq  Band_3_band <- E1_b3bw High-shelving_gain 
<- E1_hgain High-shelving_freq <- E1_hfreq High-shelving_slope <- E1_hslope 
Input <- in2_L Output -> eq_phaser
ladspa_add phasers_1217.so lfoPhaser LFO_RATE <- P1_rate LFO_depth <- P1_depth 
Feedback <- P1_feedback Spread <- P1_spread Input <- eq_phaser Output -> path2_L
ladspa_add phasers_1217.so lfoPhaser LFO_RATE <- P2_rate LFO_depth <- P2_depth 
Feedback <- P2_feedback Spread <- P2_spread Input <- eq_phaser Output -> path2_R
ladspa_add cmt.so mixer Input_1 <- path1 Input_2 <- path2_L Output -> reverb_L
ladspa_add cmt.so mixer Input_1 <- path1 Input_2 <- path2_R Output -> reverb_R
ladspa_add cmt.so freeverb3 Input_(left) <- reverb_L Input_(right) <- reverb_R 
Output_(Left) -> rev_met_L Output_(Right) -> rev_met_R Freeze_mode <- #0 
Room_size <- R1_size Damping <- R1_damping Width <- R1_width Wet <- R1_wet Dry 
<- R1_dry
ladspa_add metronome.so metronome_stereo OnOff <- M1_onoff Level <- M1_level 
BPM <- M1_bpm Input_(L <- rev_met_L Input_(R <- rev_met_R Output_(L -> 
met_lim_L Output_(R -> met_lim_R
ladspa_add tanh_limiter.so tanhlim_stereo Threshold <- L1_threshold Max <- #1 
Input_(Left) <- met_lim_L Input_(Right) <- met_lim_R Output_(Left) -> out1_L 
Output_(Right) -> out1_R
ladspa_start





router_clear
router_begin cc

router_chan 0 0 0 0
router_par1 0 127 1 0
router_par2 0 127 1 0
router_end
router_begin cc

router_chan 0 0 0 1
router_par1 0 127 1 0
router_par2 0 127 1 0
router_end
router_begin note

router_chan 0 0 0 0
router_par1 0 127 1 0
router_par2 0 127 1 0
router_end



loaded SoundFont has ID 0
Synth shutdown complete.


reply via email to

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