-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Fruity Slicer #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: Fruity Slicer #158
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ | |
| "FruityFastDist", | ||
| "FruityNotebook2", | ||
| "FruitySend", | ||
| "FruitySlicer", | ||
| "FruitySoftClipper", | ||
| "FruityStereoEnhancer", | ||
| "Plucked", | ||
|
|
@@ -155,6 +156,49 @@ class FruitySendEvent(StructEventBase): | |
| ).compile() | ||
|
|
||
|
|
||
| class FruitySlicerEvent(StructEventBase): | ||
| STRUCT = c.Struct( | ||
| "_u1" / c.Bytes(8), | ||
| "bpm" / c.Float32l, | ||
| "pitch_shift" / c.Int32sl, | ||
| "time_stretch" / c.Int32sl, | ||
| "stretching_method" | ||
| / c.Enum( | ||
| c.Int32ul, | ||
| fill_gaps=0, | ||
| alt_fill_gaps=1, | ||
| pro_default=2, | ||
| pro_transient=3, | ||
| transient=4, | ||
| tonal=5, | ||
| monophonic=6, | ||
| speech=7, | ||
| ), | ||
| "fade_in" / c.Int32ul, | ||
| "fade_out" / c.Int32ul, | ||
| "file_path" / c.PascalString(c.Int8ul, "utf-8"), | ||
| "slices" | ||
| / c.PrefixedArray( | ||
| c.Int32ul, | ||
| c.Struct( | ||
| "name" / c.PascalString(c.Int8ul, "utf-8"), | ||
|
||
| "sample_offset" / c.Int32ul, | ||
| "key" / c.Int32sl, | ||
| "_u1" / c.Float32l, | ||
| "reversed" / c.Flag, | ||
| ), | ||
| ), | ||
| "animate" / c.Flag, | ||
| "starting_note" / c.Int32ul, | ||
|
||
| "play_to_end" / c.Flag, | ||
| "bitrate" / c.Int32ul, | ||
| "auto_dump" / c.Flag, | ||
| "declick" / c.Flag, | ||
| "auto_fit" / c.Flag, | ||
| "view_spectrum" / FourByteBool, | ||
| ).compile() | ||
|
|
||
|
|
||
| class FruitySoftClipperEvent(StructEventBase): | ||
| STRUCT = c.Struct("threshold" / c.Int32ul, "post" / c.Int32ul).compile() | ||
|
|
||
|
|
@@ -1007,6 +1051,84 @@ class FruitySend(_PluginBase[FruitySendEvent], _IPlugin, ModelReprMixin): | |
| """ | ||
|
|
||
|
|
||
| class FruitySlicer(_PluginBase[FruitySlicerEvent], _IPlugin, ModelReprMixin): | ||
| """""" | ||
|
|
||
| INTERNAL_NAME = "Fruity Slicer" | ||
| bpm = _NativePluginProp[float]() | ||
| """The BPM (beats per minute) of the sample.""" | ||
|
|
||
| pitch_shift = _NativePluginProp[int]() | ||
| """Pitch shift, in cents. Linear, 1:1. | ||
|
||
|
|
||
| | Type | Value | Representation | | ||
| |---------|-------|----------------| | ||
| | Min | -1200 | -1200 cents | | ||
| | Max | 1200 | +1200 cents | | ||
| | Default | 0 | +0 cent | | ||
| """ | ||
|
|
||
| time_stretch = _NativePluginProp[int]() | ||
| """Logarithmic. | ||
|
|
||
| | Type | Value | Representation | | ||
| |---------|--------|--------------------------| | ||
| | Min | -20000 | 25% / 60 bpm to 240 bpm | | ||
|
||
| | Max | 20000 | 400% / 60 bpm to 15 bpm | | ||
| | Default | 0 | 100% / 0 bpm to 0 bpm | | ||
| """ | ||
|
|
||
| stretching_method = _NativePluginProp[ | ||
| Literal[ | ||
| "fill_gaps", | ||
| "alt_fill_gaps", | ||
| "pro_default", | ||
| "pro_transient", | ||
| "transient", | ||
| "tonal", | ||
| "monophonic", | ||
| "speech", | ||
| ] | ||
| ]() | ||
| """The stretching method to use on the sample when `time_stretch` is not 0.""" | ||
|
|
||
| fade_in = _NativePluginProp[int]() | ||
| """Slice fade in, in milliseconds.""" | ||
|
|
||
| fade_out = _NativePluginProp[int]() | ||
| """Slice fade out, in milliseconds.""" | ||
|
|
||
| file_path = _NativePluginProp[str]() | ||
| """The file path of the sample.""" | ||
|
|
||
| slices = _NativePluginProp[list[dict]]() | ||
| """A list of slices.""" | ||
|
|
||
| animate = _NativePluginProp[bool]() | ||
| """Whether to highlight the slices as they are played.""" | ||
|
|
||
| starting_note = _NativePluginProp[int]() | ||
|
||
| """The MIDI note for slicing to start on. Default 60.""" | ||
|
|
||
| play_to_end = _NativePluginProp[bool]() | ||
| """Whether to play slices to the end of the sample.""" | ||
|
|
||
| bitrate = _NativePluginProp[int]() | ||
| """The bitrate of the sample.""" | ||
|
|
||
| auto_dump = _NativePluginProp[bool]() | ||
| """Whether to automatically dump slices to the piano roll.""" | ||
|
|
||
| declick = _NativePluginProp[bool]() | ||
| """Whether to prevent clicking on slices.""" | ||
|
|
||
| auto_fit = _NativePluginProp[bool]() | ||
| """Whether to automatically fit the beat to the project tempo on load.""" | ||
|
|
||
| view_spectrum = _NativePluginProp[bool]() | ||
| """Whether to view the slices as a spectrum instead of a waveform.""" | ||
|
|
||
|
|
||
| class FruitySoftClipper(_PluginBase[FruitySoftClipperEvent], _IPlugin, ModelReprMixin): | ||
| """""" | ||
|
|
||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a
VarIntprefixed string. If 2 bytes are used to encode a path having >127 characters then its definitely VarInt prefixed.