2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: preSample
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
The `preSample` hook runs just before your pattern is sampled.
|
|
|
|
|
|
|
|
It is triggered at the very start of either:
|
|
|
|
|
2022-08-20 18:07:26 -04:00
|
|
|
- the [Pattern.sampleOption()](/reference/api/pattern/sampleoption) method
|
|
|
|
- the [Pattern.sampleMeasurement()](/reference/api/pattern/samplemeasurement) method
|
|
|
|
- the [Pattern.sampleModels()](/reference/api/pattern/samplemodels) method
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
Your plugin will receive the Pattern object.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
<Note>
|
|
|
|
|
|
|
|
The `preSample` hook is rarely used.
|
|
|
|
|
|
|
|
</Note>
|