cerberus_create_lfos   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm

Implementation

(bind-func cerberus_create_lfos
  (lambda (lfos:|4,|8,[SAMPLE,i64,i64]*||* i:i64 frequency:SAMPLE onecycleinhz:SAMPLE mod_amp:|4,SAMPLE|* mod_frq:|4,SAMPLE|* mod_phase:|4,SAMPLE|* mod_options:|4,i32|* mod_attack:|4,SAMPLE|* mod_decay:|4,SAMPLE|* mod_attack_slope:|4,SAMPLE|* mod_decay_slope:|4,SAMPLE|*)
    (let ((opts (aref mod_options i))
          (notedur:SAMPLE (if (> (& opts LFO_OPT_NOTEDUR) 0) onecycleinhz 1.0))
          (amod:SAMPLE (if (> (& opts LFO_OPT_FRQ_TO_AMP) 0) frequency 1.0))
          (fmod:SAMPLE (* notedur (if (> (& opts LFO_OPT_FRQ_TO_FRQ) 0) frequency 1.0))))
      (aset! lfos i
        (array (let ((osc (osc_c (aref mod_phase i))))
                (lambda (chan:i64 idx:i64)
                  (osc (* amod (aref mod_amp idx))
                       (* fmod (aref mod_frq idx)))))
              (let ((osc (saw_c (aref mod_phase i))))
                (lambda (chan:i64 idx:i64)
                  (osc (* amod (aref mod_amp idx))
                       (* fmod (aref mod_frq idx)))))
              (let ((osc (pulse_c (aref mod_phase i))))
                (lambda (chan:i64 idx:i64)
                  (osc (* amod (aref mod_amp idx))
                       (* fmod (aref mod_frq idx))
                       0.5)))
              (let ((osc (tri_c (aref mod_phase i))))
                (lambda (chan:i64 idx:i64)
                  (osc (* amod (aref mod_amp idx))
                       (* fmod (aref mod_frq idx)))))
              (let ((osc (ad_c)))
                (cset! osc cycle #t i1)
                (lambda (chan:i64 idx:i64)
                  (osc chan 1.0
                        (aref mod_attack idx)
                        (aref mod_decay idx)
                        (aref mod_attack_slope idx)
                        (aref mod_decay_slope idx))))
              (lambda (chan:i64 idx:i64) (aref mod_amp idx)) ;; constant instead of WT
              (lambda (chan:i64 idx:i64) (aref mod_amp idx)) ;; constant
              (let ((cnt 0)
                    (rem:SAMPLE (* (aref mod_amp i) (random)))) ;; random S & H
                (lambda (chan:i64 idx:i64)
                  (if (and (= chan 0 )
                            (= (% cnt (ftoi64 (/ SRf (aref mod_frq idx)))) 0))
                      (begin
                        (set! cnt (+ cnt 1))
                        (set! rem (* (aref mod_amp idx) (random)))))
                  rem)) ;; random S & H
              )))
    void))


Back to Index

Similar Entries

  • FBO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • FBO_create_with_textures    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • ShaderProgram_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • ShaderProgram_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • ShaderProgram_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • ShaderProgram_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Shader_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_create_FBO_depth_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VAO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VAO_create_ss_quad    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VBO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VBO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VBO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VBO_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • apr_pool_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/apr.xtm
  • apr_pool_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/apr.xtm
  • cerberus-load-preset    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus-load-state    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus-reset    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus-save-preset    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus_amp_pitch_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_delay_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_extras_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_filter_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_filter_env_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_flanger_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_frq_from_val    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_fx    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_get_filtertype    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_get_lfo_waveform    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_get_mod_matrix    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • cerberus_get_noisetype    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_get_waveform    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_get_wt_expr    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus_lfo1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_lfo4_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
  • cerberus_main_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_matrix_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_moog_ladder_inlined    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_octave_from_val    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc1_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc2_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc3_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_osc4_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_remove_file    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_reset    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_reset_lfos    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_reverb_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_set_mod_matrix    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • cerberus_sub_noise_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • create-zone    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • create-zone1    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • create-zone2    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • create_arrows_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/arrows.xtm
  • create_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • create_fbo    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_fbo_no_depth    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_fbo_no_depth_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_fbo_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_heatmap_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/heatmap.xtm
  • create_particles_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/particles.xtm
  • create_points_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/points.xtm
  • create_post_process_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/framebuffer.xtm
  • create_raymarcher_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/raymarcher.xtm
  • create_shader    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_shader_xtm    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_shadertoy_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/shadertoy.xtm
  • create_texture_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/texture.xtm
  • create_triangle_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/simple-triangle.xtm
  • create_triangle_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/framebuffer.xtm
  • create_vbo    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_walker_array    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mpi/random-walk.xtm
  • fbo_create_depth_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fbo_create_depth_buffer_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fbo_create_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fbo_create_texture_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fluid-cube-create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-create    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • fluid_cube_create    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • glfw_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_create_fullscreen_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_create_fullscreen_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_create_interaction_window    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_create_window    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
  • impc:ir:compile:create_zone    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ti:create-scheme-wrapper    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:create-scm-wrapper?    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:create_zone-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • nnsock_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanomsg.xtm
  • nnsock_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanomsg.xtm
  • nvg_create_context    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanovg.xtm
  • nvg_create_font    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanovg.xtm
  • pa_create_default_stream    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • pa_create_stream    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • pm_create_input_stream    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • pm_create_output_stream    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • psystem_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/particles_vbo.xtm
  • psystem_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/particles.xtm
  • qr_create_l    xtlang    /digego/extempore/tree/v0.8.9/libs/external/qr-code.xtm
  • qr_create_with_level    xtlang    /digego/extempore/tree/v0.8.9/libs/external/qr-code.xtm
  • rados-pool-create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ceph.xtm
  • world_create    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • xtm-vg-create-context    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_create_path    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_create_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vg_create_contextf    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vg_create_contexti32    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm