Sampler#

class pyflp.channel.Sampler[source]#

Bases: _SamplerInstrument

Represents the native Sampler, either as a clip or a channel.

arp#

Miscellaneous functions -> Arpeggiator

au_sample_rate: int | None#

AU-format sample specific.

content: Content#

Sample settings ‣ Content

cut_group#

Cut group in the form of (Cut self, cut by).

Miscellaneous functions ‣ Group

Hint

To cut itself when retriggered, set the same value for both.

delay#

Miscellaneous functions -> Echo delay / fat mode

property envelopes: dict[Literal['Panning', 'Volume', 'Mod X', 'Mod Y', 'Pitch'], pyflp.channel.Envelope] | None#

An Envelope each for Volume, Panning, Mod X, Mod Y and Pitch.

Envelope / instruement settings

filter: Filter#
fx: FX#

Sample settings (page) ‣ Precomputed effects

insert#

The index of the Insert the channel is routed to according to FL.

“Current” insert = -1, Master = 0 and so on… till Mixer.max_inserts.

level_adjusts#

Miscellaneous functions -> Level adjustments

property lfos: dict[Literal['Panning', 'Volume', 'Mod X', 'Mod Y', 'Pitch'], pyflp.channel.SamplerLFO] | None#

An LFO each for Volume, Panning, Mod X, Mod Y and Pitch.

Envelope / instruement settings (page)

property pitch_shift: int | None#

-4800 to +4800 (cents).

Raises:

PropertyCannotBeSet – When a ChannelID.Levels event is not found.

playback: Playback#

Sample settings (page) ‣ Playback

polyphony#

Miscellaneous functions -> Polyphony

property sample_path: Path | None#

Absolute path of a sample file on the disk.

Sample settings (page) ‣ File

Contains the string %FLStudioFactoryData% for stock samples.

stretching: TimeStretching#

Sample settings (page) ‣ Time stretching

time#

Miscellaneous functions -> Time

property tracking: dict[str, pyflp.channel.Tracking] | None#

A Tracking each for Volume & Keyboard.

Miscellaneous functions -> Tracking

class pyflp.channel.Content[source]#

Used by Sampler.

declick_mode: DeclickMode | None#
https://img.shields.io/badge/FL%20Studio-9.0.0+-5f686d?labelColor=ff7629&style=for-the-badge

Defaults to DeclickMode.OutOnly.

keep_on_disk: bool | None#
https://img.shields.io/badge/FL%20Studio-2.5.0+-5f686d?labelColor=ff7629&style=for-the-badge

Whether a sample is streamed from disk or kept in RAM, defaults to False.

load_regions: bool | None#

Load regions found in the sample, if any, defaults to True.

load_slices: bool | None#

Defaults to False.

resample: bool | None#
https://img.shields.io/badge/FL%20Studio-2.5.0+-5f686d?labelColor=ff7629&style=for-the-badge

Defaults to False.

class pyflp.channel.Envelope[source]#
https://img.shields.io/badge/FL%20Studio-2.5.0+-5f686d?labelColor=ff7629&style=for-the-badge

A PAHDSR envelope for various Sampler paramters.

amount: int | None#

Linear. Bipolar.

Type

Value

Representation

Min

-128

-100%

Max

128

100%

Default

0

0%

attack: int | None#

Linear.

Type

Value

Representation

Min

100

0%

Max

65536

100%

Default

20000

31%

attack_tension: int | None#
https://img.shields.io/badge/FL%20Studio-3.5.4+-5f686d?labelColor=ff7629&style=for-the-badge

Linear. Bipolar.

Type

Value

Representation

Min

-128

-100%

Max

128

100%

Default

0

0%

decay: int | None#

Linear.

Type

Value

Representation

Min

100

0%

Max

65536

100%

Default

30000

46%

decay_tension: int | None#
https://img.shields.io/badge/FL%20Studio-3.5.4+-5f686d?labelColor=ff7629&style=for-the-badge

Linear. Bipolar.

Type

Value

Mix (wet)

Min

-128

-100%

Max

128

100%

Default

0

0%

enabled: bool | None#

Whether envelope section is enabled.

hold: int | None#

Linear.

Type

Value

Representation

Min

100

0%

Max

65536

100%

Default

20000

31%

predelay: int | None#

Linear. Defaults to minimum value.

Type

Value

Representation

Min

100

0%

Max

65536

100%

release: int | None#

Linear.

Type

Value

Representation

Min

100

0%

Max

65536

100%

Default

20000

31%

release_tension: int | None#
https://img.shields.io/badge/FL%20Studio-3.5.4+-5f686d?labelColor=ff7629&style=for-the-badge

Linear. Bipolar.

Type

Value

Mix (wet)

Min

-128

-100%

Max

128

100%

Default

-101

-79%

sustain: int | None#

Linear.

Type

Value

Representation

Min

0

0%

Max

128

100%

Default

50

39%

synced: bool | None#

Whether envelope is synced to tempo or not.

class pyflp.channel.Filter[source]#

Used by Sampler.

mod_x: int | None#

Filter cutoff. Min = 0. Max = 256. Defaults to maximum.

mod_y: int | None#

Filter resonance. Min = 0. Max = 256. Defaults to minimum.

type: FilterType | None#

Defaults to FilterType.FastLP.

class pyflp.channel.FX[source]#

Pre-computed effects used by Sampler.

See also

Sampler.fx, Reverb

boost: int | None#
https://img.shields.io/badge/FL%20Studio-1.2.12+-5f686d?labelColor=ff7629&style=for-the-badge

Pre-amp gain. Defaults to minimum value.

Min

Max

0

256

clip: bool | None#

Whether output is clipped at 0dB for boost.

crossfade: int | None#

Linear. Defaults to minimum value

Type

Value

Representation

Min

0

0%

Max

256

100%

cutoff: int | None#

Filter Mod X. Defaults to maximum value. Min = 16. Max = 1024.

fade_in: int | None#

Quick fade-in. Defaults to minimum value. Min = 0. Max = 1024.

fade_out: int | None#
https://img.shields.io/badge/FL%20Studio-1.7.6+-5f686d?labelColor=ff7629&style=for-the-badge

Quick fade-out. Defaults to minimum value. Min = 0. Max = 1024.

fade_stereo: bool | None#

Properties derived from enum flags.

fix_trim: bool | None#

Trim ‣ Fix legacy precomputed length.

Has no effect on the value of trim.

freq_tilt: int | None#

Shifts the frequency balance. Bipolar.

Min

Max

Default

0

256

128

inverted: bool | None#

Named Reverse polarity in FL’s interface.

length: float | None#

Min = 0.0, Max = 1.0. Defaults to minimum value.

Named SMP START in FL’s interface.

normalize: bool | None#

Maximizes volume without clipping by normalizing peaks to 0dB.

pogo: int | None#

Pitch bend effect. Bipolar.

Min

Max

Default

0

512

256

remove_dc: bool | None#
https://img.shields.io/badge/FL%20Studio-2.5.0+-5f686d?labelColor=ff7629&style=for-the-badge

Whether DC offset (if present) is removed.

resonance: int | None#

Filter Mod Y. Min = 0. Max = 640. Defaults to minimum value.

reverb: Reverb#
reverse: bool | None#

Whether sample is reversed or not.

ringmod: Tuple[int, int] | None#

Ring modulation returned as a tuple of (mix, frequency).

Limits for both:

Min

Max

Default

0

256

128

start: float | None#

Min = 0.0, Max = 1.0. Defaults to minimum value.

Always set to 0.0 irrespective of the knob position unless a sample is loaded.

stereo_delay: int | None#
https://img.shields.io/badge/FL%20Studio-1.3.56+-5f686d?labelColor=ff7629&style=for-the-badge

Linear. Bipolar.

Min

Max

Default

0

4096

2048

swap_stereo: bool | None#

Whether left and right channels are swapped or not.

trim: int | None#

Silence trimming threshold. Defaults to minimum. Linear.

Type

Value

Representation

Min

0

0%

Max

256

100%

class pyflp.channel.Playback[source]#

Used by Sampler.

ping_pong_loop: bool | None#

Properties bound directly to one of fixed size or string events.

start_offset: int | None#

Linear. Defaults to minimum value.

Type

Value

Representation

Min

0

0%

Max

1072693248

100%

use_loop_points: bool | None#

Properties derived from enum flags.

class pyflp.channel.Reverb[source]#
https://img.shields.io/badge/FL%20Studio-1.4.0+-5f686d?labelColor=ff7629&style=for-the-badge

Precalculated reverb used by Sampler.

property mix: int | None#

Mix % (wet). Defaults to minimum value.

Min

Max

0

256

property type: ReverbType | None#
class pyflp.channel.SamplerLFO[source]#
https://img.shields.io/badge/FL%20Studio-2.5.0+-5f686d?labelColor=ff7629&style=for-the-badge

A basic LFO for certain Sampler parameters.

See also

Sampler.lfos

amount: int | None#

Linear. Bipolar.

Type

Value

Representation

Min

-128

-100%

Max

128

100%

Default

0

0%

attack: int | None#

Linear.

Type

Value

Representation

Min

100

0%

Max

65536

100%

Default

20000

31%

predelay: int | None#

Linear. Defaults to minimum value.

Type

Value

Representation

Min

100

0%

Max

65536

100%

retrig: bool | None#

Whether LFO phase is in global / retriggered mode.

shape: LFOShape | None#

Sine.

Type:

Sine, triangle or pulse. Default

speed: int | None#

Logarithmic. Provides tempo synced options.

Type

Value

Representation

Min

200

0%

Max

65536

100%

Default

32950

50% (16 steps)

synced: bool | None#

Whether LFO is synced with tempo.

class pyflp.channel.TimeStretching[source]#
https://img.shields.io/badge/FL%20Studio-5.0+-5f686d?labelColor=ff7629&style=for-the-badge

Used by Sampler.

mode: StretchMode | None#

Properties obtained from a construct.Struct.

multiplier: float | None#

Logarithmic. Bipolar.

Type

Value

Representation

Min

0.25

25%

Max

4.0

400%

Default

0

100%

pitch: int | None#

Pitch shift (in cents). Min = -1200. Max = 1200. Defaults to 0.

time: MusicalTime | None#

Returns a tuple of (bars, beats, ticks).

Enums#

class pyflp.channel.DeclickMode[source]#
Crossfade = 5#
Generic = 3#
OutOnly = 0#
Smooth = 4#
Transient = 2#
TransientNoBleeding = 1#
class pyflp.channel.LFOShape[source]#

Used by LFO.shape.

Pulse = 2#
Sine = 0#
Triangle = 1#
class pyflp.channel.ReverbType[source]#

Used by Reverb.type.

A = 0#
B = 65536#
class pyflp.channel.StretchMode[source]#
Auto = 5#
E2Generic = 6#
E2Mono = 8#
E2Speech = 9#
E2Transient = 7#
E3Generic = 1#
E3Mono = 2#
Resample = 0#
SliceMap = 4#
SliceStretch = 3#
Stretch = -1#
../../_images/stretch-mode.png