init_lv2_amp   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/lv2.xtm

Implementation

;; it helps to have a little wrapper for each plugin
;; so this wrapper gives us a nice 'functional' style
;; by returning a closure wrapper for us.
(bind-func init_lv2_amp
  (lambda (samplerate)
    (let ((in_buf:float* (halloc))
          (out_buf:float* (halloc))
          (gain_buf:float* (halloc))
          (instance (lilv_load_plugin "http://plugin.org.uk/swh-plugins/amp" samplerate))
          (descriptor (tref instance 0))
          (handle (tref instance 1))
          (run (tref descriptor 4)))
      (printf "decriptor name: %s\n" (tref descriptor 0))
      ;; setup ports
      (lilv_connect_to_port instance 0 (cast gain_buf))
      (lilv_connect_to_port instance 1 (cast in_buf))
      (lilv_connect_to_port instance 2 (cast out_buf))
      ;; create closure wrapper
      (lambda (in amp)
        (pset! gain_buf 0 (dtof amp))
        (pset! in_buf 0 (dtof in))
        (fptrcall run handle 1)
        (ftod (pref out_buf 0))))))


Back to Index

Similar Entries

  • LFO_OPT_FRQ_TO_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_OSC1_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC1_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC1_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_OSC2_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC2_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC2_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_OSC3_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC3_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_OSC4_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_OSC4_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PaStreamParameters_print    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • PaStreamParameters_toString    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • Pm_Event_Timestamp    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • amp_pitch_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • apr_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/apr.xtm
  • audiofile_16bitPCM_to_sample_be    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_16bitPCM_to_sample_le    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_24bitPCM_to_sample_be    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_24bitPCM_to_sample_le    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_aiff_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_copy_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_float_to_sample_be    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_float_to_sample_le    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_wave_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • cef_init_app    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_base    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_browser    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cef_init_client    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • cerberus_amp_pitch_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_logRamp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cl:reduce-init    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • clamp    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • clear-sampler    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • clear_sample_data_    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • clock->samples    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cpBBClampVect    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpBB.xtm
  • cpvclamp    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpVect.xtm
  • dl_amp_decay    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_amp_decay    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_amp_decay_dur    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_amp_decay_dur    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_osc1_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_osc1_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_osc2_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_osc2_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_part_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_part_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • get_amp_env    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • get_midi_evt_timestamp    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • get_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • glew_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/glew.xtm
  • glfw_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_interaction_compatibility_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_init_and_create_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • gui_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • h3d_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • h3d_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • impc:compiler:print-no-redefinitions-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:initialize-closure-with-new-zone    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • init-gst    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • init-osc-vars    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • init-psys    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/particles.xtm
  • init-slides    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • init_bodies    xtlang    /digego/extempore/tree/v0.8.9/examples/core/nbody_lang_shootout.xtm
  • init_burners    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • init_draw_quad    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • init_env_map    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • init_gl    xtlang    /digego/extempore/tree/v0.8.9/examples/external/going-native.xtm
  • init_globals    xtlang    /digego/extempore/tree/v0.8.9/examples/core/fasta_lang_shootout.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • init_sky    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • init_vao    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • init_vg    xtlang    /digego/extempore/tree/v0.8.9/examples/external/going-native.xtm
  • initalize    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/hidapi.xtm
  • initialize_walkers    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mpi/random-walk.xtm
  • lilv_init_world    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/lilv.xtm
  • lilv_print_all_lv2_plugins    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/lilv.xtm
  • load-sample    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • load-sampler    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • logRamp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • new_sample    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • new_sample    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • node_reply_socket_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • nvg_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanovg.xtm
  • pa_initialize    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • pm_initialize    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • pm_initialize    unknown    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • qrampr    macro    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • ramp    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • rampr    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • sampler    scheme    /digego/extempore/tree/v0.8.9/examples/external/convolution_reverb.xtm
  • sampler    scheme    /digego/extempore/tree/v0.8.9/examples/external/sing_a_song.xtm
  • sampler-parse-filename    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler-parse-midinote-filename    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler-parse-spn-filename    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler-populate-slot    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler-set-slot-offset    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler_fx    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • sampler_note    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • sampler_note_linear    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • samples->clock    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • scheduler_init    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • set_amp_env    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • set_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • set_sample_data_    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • set_sample_offset_    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • set_sampler_audiobuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • sf_samplerate    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • sf_samples_from_file    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • sf_set_samplerate    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • some_gl_init    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • sys:compile-init-ll    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • sys:compile-init-ll-from-str    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • world_init    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • xtm_clampf    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/nanovg_helper.xtm
  • xtm_envmap_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_dof_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_light_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_quad_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_simple_bone_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_simple_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_render_init_skybox_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_skybox_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm