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
  • PARAM_NOISE_AMP    scheme
  • PARAM_NOISE_AMP    scheme
  • PARAM_NOISE_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC1_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC2_AMP    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC3_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PARAM_OSC4_AMP    scheme
  • PaStreamParameters_print    xtlang
  • PaStreamParameters_toString    xtlang
  • Pm_Event_Timestamp    xtlang
  • amp_pitch_env_cc    xtlang
  • apr_init    xtlang
  • audiofile_16bitPCM_to_sample_be    xtlang
  • audiofile_16bitPCM_to_sample_le    xtlang
  • audiofile_24bitPCM_to_sample_be    xtlang
  • audiofile_24bitPCM_to_sample_le    xtlang
  • audiofile_aiff_read_samples    xtlang
  • audiofile_copy_samples    xtlang
  • audiofile_float_to_sample_be    xtlang
  • audiofile_float_to_sample_le    xtlang
  • audiofile_read_samples    xtlang
  • audiofile_wave_read_samples    xtlang
  • cef_init_app    xtlang
  • cef_init_base    xtlang
  • cef_init_browser    xtlang
  • cef_init_client    xtlang
  • cerberus_amp_pitch_env_cc    xtlang
  • cerberus_logRamp    xtlang
  • cl:reduce-init    scheme
  • clamp    macro
  • clear-sampler    scheme
  • clear_sample_data_    xtlang
  • clock->samples    scheme
  • cpBBClampVect    xtlang
  • cpvclamp    xtlang
  • dl_amp_decay    xtlang
  • dl_amp_decay    xtlang
  • dl_amp_decay_dur    xtlang
  • dl_amp_decay_dur    xtlang
  • dl_noise_amp    xtlang
  • dl_noise_amp    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc1_amp    xtlang
  • dl_osc2_amp    xtlang
  • dl_osc2_amp    xtlang
  • dl_part_amp    xtlang
  • dl_part_amp    xtlang
  • get_amp_env    xtlang
  • get_midi_evt_timestamp    xtlang
  • get_noise_amp    xtlang
  • glew_init    xtlang
  • glfw_init    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • gui_init    xtlang
  • h3d_init    xtlang
  • h3d_init    xtlang
  • impc:compiler:print-no-redefinitions-error    scheme
  • impc:ti:initialize-closure-with-new-zone    scheme
  • init-gst    xtlang
  • init-osc-vars    xtlang
  • init-psys    xtlang
  • init-slides    scheme
  • init_bodies    xtlang
  • init_burners    xtlang
  • init_draw_quad    xtlang
  • init_env_map    xtlang
  • init_gl    xtlang
  • init_globals    xtlang
  • init_sample_data    xtlang
  • init_sample_data    xtlang
  • init_sky    xtlang
  • init_vao    xtlang
  • init_vg    xtlang
  • initalize    xtlang
  • initialize_walkers    xtlang
  • lilv_init_world    xtlang
  • lilv_print_all_lv2_plugins    xtlang
  • load-sample    scheme
  • load-sampler    scheme
  • logRamp    xtlang
  • new_sample    xtlang
  • new_sample    xtlang
  • node_reply_socket_init    xtlang
  • nvg_init    xtlang
  • pa_initialize    xtlang
  • pm_initialize    xtlang
  • pm_initialize    unknown
  • qrampr    macro
  • ramp    macro
  • rampr    macro
  • sampler    scheme
  • sampler    scheme
  • sampler-parse-filename    scheme
  • sampler-parse-midinote-filename    scheme
  • sampler-parse-spn-filename    scheme
  • sampler-populate-slot    scheme
  • sampler-set-slot-offset    scheme
  • sampler_fx    xtlang
  • sampler_note    xtlang
  • sampler_note_linear    xtlang
  • samples->clock    scheme
  • scheduler_init    xtlang
  • set_amp_env    xtlang
  • set_noise_amp    xtlang
  • set_sample_data_    xtlang
  • set_sample_offset_    xtlang
  • set_sampler_audiobuffer    xtlang
  • sf_samplerate    xtlang
  • sf_samples_from_file    xtlang
  • sf_set_samplerate    xtlang
  • some_gl_init    xtlang
  • sys:compile-init-ll    scheme
  • sys:compile-init-ll-from-str    scheme
  • world_init    xtlang
  • xtm_clampf    xtlang
  • xtm_envmap_init    xtlang
  • xtm_render_init    xtlang
  • xtm_render_init_dof_shader    xtlang
  • xtm_render_init_light_shader    xtlang
  • xtm_render_init_quad_shader    xtlang
  • xtm_render_init_simple_bone_shader    xtlang
  • xtm_render_init_simple_shader    xtlang
  • xtm_render_init_skybox_shader    xtlang
  • xtm_skybox_init    xtlang