Skip to content

Commit fe971b3

Browse files
committed
Doc - add doc for set_mixer_control!
1 parent 63cdf16 commit fe971b3

File tree

1 file changed

+27
-3
lines changed
  • app/server/sonicpi/lib/sonicpi/mods

1 file changed

+27
-3
lines changed

app/server/sonicpi/lib/sonicpi/mods/sound.rb

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,31 @@ def recording_delete
853853
hide: true
854854

855855

856+
857+
858+
def set_mixer_control!(opts)
859+
@mod_sound_studio.mixer_control(opts)
860+
end
861+
doc name: :set_mixer_control!,
862+
introduced: Version.new(2,7,0),
863+
summary: "Control master mixer",
864+
doc: "The master mixer is the final mixer that all sound passes through. This fn gives you control over the master mixer allowing you to manipulate all the sound playing through Sonic Pi at once. For example, you can sweep a lpf or hpf over the entire sound.",
865+
args: [],
866+
opts: {pre_amp: "Controls the amplitude of the signal prior to th e FX stage of the mixer (prior to lpf/hpf stages). Has slide opts. Default 1.",
867+
amp: "Controls the amplitude of the signal after the FX tage. Has slide opts. Default 1.",
868+
hpf: "Global hpf FX. Has slide opts. Default 0.",
869+
lpf: "Global lpf FX. Has slide opts. Default 135.5.",
870+
hpf_bypass: "Bypass the global hpf. 0=no bypass, 1=bypass. Default 0.",
871+
lpf_bypass: "Bypass the global lpf. 0=no bypass, 1=bypass. Default 0.",
872+
limiter_bypass: "Bypass the final limiter. 0=no bypass, 1=bypass. Default 0.",
873+
leak_dc_bypass: "Bypass the final DC leak correction FX. 0=no bypass, 1=bypass. Default 0."},
874+
accepts_block: false,
875+
examples: ["
876+
set_mixer_control! lpf: 30, lpf_slide: 16 # slide the global lpf to 30 over 16 beats."]
877+
878+
879+
880+
856881
def set_mixer_invert_stereo!
857882
@mod_sound_studio.mixer_invert_stereo(true)
858883
end
@@ -869,9 +894,8 @@ def set_mixer_mono_mode!
869894
@mod_sound_studio.mixer_mono_mode
870895
end
871896

872-
def set_mixer_control!(opts)
873-
@mod_sound_studio.mixer_control(opts)
874-
end
897+
898+
875899

876900
def synth(synth_name, *args)
877901
ensure_good_timing!

0 commit comments

Comments
 (0)