Nu:Tekt NTS-1 digital SDK  v1.1-0
Classes | Macros | Typedefs | Enumerations
Oscillator Instance (osc)

Classes

struct  user_osc_param
 Internal realtime parameters. More...
 

Macros

#define param_val_to_f32(val)   ((uint16_t)val * 9.77517106549365e-004f)
 Convert 10bit parameter values to float.
 

Typedefs

typedef struct user_osc_param user_osc_param_t
 Internal realtime parameters.
 

Enumerations

enum  user_osc_param_id_t {
  k_user_osc_param_id1 = 0, k_user_osc_param_id2, k_user_osc_param_id3, k_user_osc_param_id4,
  k_user_osc_param_id5, k_user_osc_param_id6, k_user_osc_param_shape, k_user_osc_param_shiftshape,
  k_num_user_osc_param_id
}
 User facing osc-specific parameters. More...
 

Core API

void _hook_init (uint32_t platform, uint32_t api)
 Initialization callback. More...
 
void _hook_cycle (const user_osc_param_t *const params, int32_t *yn, const uint32_t frames)
 Rendering callback. More...
 
void _hook_on (const user_osc_param_t *const params)
 Note on callback. More...
 
void _hook_off (const user_osc_param_t *const params)
 Note off callback. More...
 
void _hook_param (uint16_t index, uint16_t value)
 Parameter change callback. More...
 
#define OSC_INIT   __attribute__((used)) _hook_init
 
#define OSC_CYCLE   __attribute__((used)) _hook_cycle
 
#define OSC_NOTEON   __attribute__((used)) _hook_on
 
#define OSC_NOTEOFF   __attribute__((used)) _hook_off
 
#define OSC_MUTE   __attribute__((used)) _hook_mute
 
#define OSC_VALUE   __attribute__((used)) _hook_value
 
#define OSC_PARAM   __attribute__((used)) _hook_param
 

Detailed Description

Enumeration Type Documentation

◆ user_osc_param_id_t

User facing osc-specific parameters.

Enumerator
k_user_osc_param_id1 

Edit parameter 1.

k_user_osc_param_id2 

Edit parameter 2.

k_user_osc_param_id3 

Edit parameter 3.

k_user_osc_param_id4 

Edit parameter 4.

k_user_osc_param_id5 

Edit parameter 5.

k_user_osc_param_id6 

Edit parameter 6.

k_user_osc_param_shape 

Shape parameter.

k_user_osc_param_shiftshape 

Alternative Shape parameter: generally available via a shift function.

Definition at line 75 of file userosc.h.

Function Documentation

◆ _hook_cycle()

void _hook_cycle ( const user_osc_param_t *const  params,
int32_t *  yn,
const uint32_t  frames 
)

Rendering callback.

Must be implemented by your custom effect.

Parameters
paramsCurrent realtime parameter state.
ynOutput buffer. (1 sample per frame)
framesSize of output buffer.
Note
Implementation must support at least up to 64 frames.
Optimize for powers of two.

◆ _hook_init()

void _hook_init ( uint32_t  platform,
uint32_t  api 
)

Initialization callback.

Must be implemented by your custom effect.

Parameters
platformCurrent target platform/module. See userprg.h
apiCurrent API version. See userprg.h

◆ _hook_off()

void _hook_off ( const user_osc_param_t *const  params)

Note off callback.

Must be implemented by your custom effect.

Parameters
paramsCurrent realtime parameter state.

◆ _hook_on()

void _hook_on ( const user_osc_param_t *const  params)

Note on callback.

Must be implemented by your custom effect.

Parameters
paramsCurrent realtime parameter state.

◆ _hook_param()

void _hook_param ( uint16_t  index,
uint16_t  value 
)

Parameter change callback.

Must be implemented by your custom effect.

Parameters
indexParameter ID. See user_osc_param_id_t.
indexParameter value.
Note
10 bit resolution for shape/shift-shape.
0-200 for bipolar percent parameters. 0% at 100, -100% at 0.
0-100 for unipolar percent and typeless parameters.
k_user_osc_param_id2
Edit parameter 2.
Definition: userosc.h:79
k_user_osc_param_id3
Edit parameter 3.
Definition: userosc.h:81
k_user_osc_param_shiftshape
Alternative Shape parameter: generally available via a shift function.
Definition: userosc.h:91
k_user_osc_param_id6
Edit parameter 6.
Definition: userosc.h:87
k_user_osc_param_shape
Shape parameter.
Definition: userosc.h:89
k_user_osc_param_id1
Edit parameter 1.
Definition: userosc.h:77
k_user_osc_param_id4
Edit parameter 4.
Definition: userosc.h:83
k_user_osc_param_id5
Edit parameter 5.
Definition: userosc.h:85
user_osc_param_id_t
user_osc_param_id_t
User facing osc-specific parameters.
Definition: userosc.h:75