Module audio
Audio class
The norns script reference has examples for this module.
Functions
headphone_gain (gain) | set headphone gain. |
level_adc (level) | set level for ADC input. |
level_dac (level) | set level for both output channels. |
level_monitor (level) | set monitor level for both input channels. |
monitor_mono () | set monitor mode to mono. |
monitor_stereo () | set monitor mode to stereo. |
level_tape (level) | set tape level. |
level_cut (level) | set cut master level. |
pitch_on () | enable input pitch analysis. |
pitch_off () | disable input pitch analysis (saves CPU). |
restart () | restart the audio engine (recompile sclang). |
Effects functions
rev_on () | reverb on. |
rev_off () | reverb off. |
level_monitor_rev (val) | reverb Monitor level. |
level_eng_rev (val) | reverb ENGINE level. |
level_tape_rev (val) | reverb TAPE level. |
level_rev_dac (val) | reverb DAC level. |
rev_param (name, val) | set reverb parameter. |
comp_on () | turn on compressor. |
comp_off () | turn off compressor. |
comp_mix (val) | compressor mix amount. |
comp_param (name, val) | set compressor parameter. |
Tape Functions
tape_play_open (file) | open a tape file. |
tape_play_start () | start tape playing. |
tape_play_stop () | stop tape playing. |
tape_record_open (file) | open a tape recording file. |
tape_record_start () | start tape recording. |
tape_record_stop () | stop tape recording. |
Softcut levels
level_adc_cut (value) | softcut adc level. |
level_eng_cut (value) | softcut eng level. |
level_tape_cut (value) | softcut tape level. |
level_cut_rev (value) | softcut cut reverb level. |
global functions
vu (in1, in2, out1, out2) | callback for VU meters. |
helpers
set_audio_level (value) | set output level, clamped, save state. |
adjust_output_level (delta) | adjust output level, clamped, save state. |
file_info (path) | print audio file info |
Functions
- headphone_gain (gain)
-
set headphone gain.
Parameters:
- gain number (0-64)
- level_adc (level)
-
set level for ADC input.
Parameters:
- level in [0, 1]
- level_dac (level)
-
set level for both output channels.
Parameters:
- level in [0, 1]
- level_monitor (level)
-
set monitor level for both input channels.
Parameters:
- level in [0, 1]
- monitor_mono ()
- set monitor mode to mono. both inputs will be mixed to both outputs.
- monitor_stereo ()
- set monitor mode to stereo. each input will be monitored on the respective output.
- level_tape (level)
-
set tape level.
Parameters:
- level [0,1]
- level_cut (level)
-
set cut master level.
Parameters:
- level [0,1]
- pitch_on ()
- enable input pitch analysis.
- pitch_off ()
- disable input pitch analysis (saves CPU).
- restart ()
- restart the audio engine (recompile sclang).
Effects functions
- rev_on ()
- reverb on.
- rev_off ()
- reverb off.
- level_monitor_rev (val)
-
reverb Monitor level.
Parameters:
- val number
- level_eng_rev (val)
-
reverb ENGINE level.
Parameters:
- val number
- level_tape_rev (val)
-
reverb TAPE level.
Parameters:
- val number
- level_rev_dac (val)
-
reverb DAC level.
Parameters:
- val number
- rev_param (name, val)
-
set reverb parameter.
Parameters:
- name string
- val number
- comp_on ()
- turn on compressor.
- comp_off ()
- turn off compressor.
- comp_mix (val)
-
compressor mix amount.
Parameters:
- val number
- comp_param (name, val)
-
set compressor parameter.
Parameters:
- name string
- val number
Tape Functions
- tape_play_open (file)
-
open a tape file.
Parameters:
- file
- tape_play_start ()
- start tape playing.
- tape_play_stop ()
- stop tape playing.
- tape_record_open (file)
-
open a tape recording file.
Parameters:
- file
- tape_record_start ()
- start tape recording.
- tape_record_stop ()
- stop tape recording.
Softcut levels
- level_adc_cut (value)
-
softcut adc level.
Parameters:
- value number
- level_eng_cut (value)
-
softcut eng level.
Parameters:
- value number
- level_tape_cut (value)
-
softcut tape level.
Parameters:
- value number
- level_cut_rev (value)
-
softcut cut reverb level.
Parameters:
- value number
global functions
- vu (in1, in2, out1, out2)
-
callback for VU meters.
scripts should redefine this.
Parameters:
- in1 input level 1 in [0, 63], audio taper
- in2
- out1
- out2
helpers
- set_audio_level (value)
-
set output level, clamped, save state.
Parameters:
- value number audio level (0-64)
- adjust_output_level (delta)
-
adjust output level, clamped, save state.
Parameters:
- delta number amount to change output level
- file_info (path)
-
print audio file info
Parameters:
- path string (from dust directory)
Returns:
- integer number of audio channels
- integer number of samples
- integer sample rate