zds-pickers 4.0.12 → 4.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +160 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12481 -35
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/midi/ccValues.js +2 -2
- package/dist/midi/export.js +43 -1
- package/dist/other/DefaultTooltip.js +1 -1
- package/dist/other/OctavePlayer.js +4 -4
- package/dist/other/SoundFontProvider.js +1 -1
- package/dist/other/{SVGText.js → SvgText.js} +2 -3
- package/dist/pickers/CCPicker.js +4 -4
- package/dist/pickers/ChannelMappingPicker.js +2 -2
- package/dist/pickers/ChannelPicker.js +2 -2
- package/dist/pickers/Knob.js +3 -3
- package/dist/pickers/KnobPicker.js +3 -3
- package/dist/pickers/LatchPicker.js +2 -2
- package/dist/pickers/MappingPicker.js +2 -2
- package/dist/pickers/NotePicker.js +2 -2
- package/dist/pickers/PianoPicker.js +4 -4
- package/dist/pickers/PolarityPicker.js +2 -2
- package/dist/pickers/ResponseCurve.js +14 -56
- package/dist/pickers/ResponseCurvePicker.js +6 -5
- package/dist/pickers/Select.js +1 -1
- package/dist/pickers/StatusPicker.js +2 -2
- package/dist/pickers/ValuePicker.js +2 -2
- package/dist/pickers/knobSkin10.js +1 -1
- package/dist/rotaryKnob/InternalInput.js +1 -1
- package/dist/rotaryKnob/helpers/DrawCircle.js +1 -1
- package/dist/rotaryKnob/helpers/DrawLine.js +1 -1
- package/dist/rotaryKnob/helpers/HelpersOverlay.js +1 -1
- package/dist/rotaryKnob/helpers/KnobVisualHelpers.js +6 -6
- package/dist/rotaryKnob/index.js +6 -6
- package/dist/rotaryKnob/utils.js +4 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/midi/ccValues.d.ts +2 -2
- package/dist/types/midi/export.d.ts +12 -1
- package/dist/types/other/DefaultTooltip.d.ts +1 -1
- package/dist/types/other/OctavePlayer.d.ts +1 -1
- package/dist/types/other/SoundFontProvider.d.ts +1 -1
- package/dist/types/other/{SVGText.d.ts → SvgText.d.ts} +2 -3
- package/dist/types/pickers/CCPicker.d.ts +1 -1
- package/dist/types/pickers/ChannelMappingPicker.d.ts +1 -1
- package/dist/types/pickers/ChannelPicker.d.ts +1 -1
- package/dist/types/pickers/Knob.d.ts +1 -1
- package/dist/types/pickers/KnobPicker.d.ts +1 -1
- package/dist/types/pickers/LatchPicker.d.ts +1 -1
- package/dist/types/pickers/MappingPicker.d.ts +1 -1
- package/dist/types/pickers/NotePicker.d.ts +1 -1
- package/dist/types/pickers/PianoPicker.d.ts +1 -1
- package/dist/types/pickers/PolarityPicker.d.ts +1 -1
- package/dist/types/pickers/ResponseCurve.d.ts +4 -15
- package/dist/types/pickers/ResponseCurvePicker.d.ts +2 -2
- package/dist/types/pickers/Select.d.ts +1 -1
- package/dist/types/pickers/StatusPicker.d.ts +1 -1
- package/dist/types/pickers/ValuePicker.d.ts +1 -1
- package/dist/types/pickers/knobSkin10.d.ts +1 -1
- package/dist/types/rotaryKnob/InternalInput.d.ts +1 -1
- package/dist/types/rotaryKnob/helpers/DrawCircle.d.ts +1 -1
- package/dist/types/rotaryKnob/helpers/DrawLine.d.ts +1 -1
- package/dist/types/rotaryKnob/helpers/HelpersOverlay.d.ts +1 -1
- package/dist/types/rotaryKnob/index.d.ts +1 -1
- package/dist/types/rotaryKnob/utils.d.ts +1 -7
- package/lib/index.ts +2 -2
- package/lib/midi/ccValues.ts +2 -2
- package/lib/midi/export.ts +58 -2
- package/lib/other/DefaultTooltip.ts +1 -1
- package/lib/other/OctavePlayer.tsx +4 -4
- package/lib/other/SoundFontProvider.tsx +1 -1
- package/lib/other/{SVGText.tsx → SvgText.tsx} +2 -4
- package/lib/pickers/CCPicker.tsx +4 -4
- package/lib/pickers/ChannelMappingPicker.tsx +2 -2
- package/lib/pickers/ChannelPicker.tsx +2 -2
- package/lib/pickers/Knob.tsx +3 -3
- package/lib/pickers/KnobPicker.tsx +3 -3
- package/lib/pickers/LatchPicker.tsx +2 -2
- package/lib/pickers/MappingPicker.tsx +2 -2
- package/lib/pickers/NotePicker.tsx +2 -2
- package/lib/pickers/PianoPicker.tsx +4 -4
- package/lib/pickers/PolarityPicker.tsx +2 -2
- package/lib/pickers/ResponseCurve.tsx +22 -75
- package/lib/pickers/ResponseCurvePicker.tsx +6 -5
- package/lib/pickers/Select.tsx +1 -1
- package/lib/pickers/StatusPicker.tsx +2 -2
- package/lib/pickers/ValuePicker.tsx +2 -2
- package/lib/pickers/knobSkin10.tsx +1 -1
- package/lib/rotaryKnob/InternalInput.tsx +1 -1
- package/lib/rotaryKnob/helpers/DrawCircle.tsx +1 -1
- package/lib/rotaryKnob/helpers/DrawLine.tsx +1 -1
- package/lib/rotaryKnob/helpers/HelpersOverlay.tsx +1 -1
- package/lib/rotaryKnob/helpers/KnobVisualHelpers.tsx +6 -7
- package/lib/rotaryKnob/index.tsx +6 -6
- package/lib/rotaryKnob/utils.ts +1 -1
- package/package.json +1 -1
- package/stories/assets/utils.js +1 -1
- package/stories/picker.stories.tsx +15 -15
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './midi/ccValues';
|
|
|
2
2
|
export * from './midi/export';
|
|
3
3
|
export * from './other/DefaultTooltip';
|
|
4
4
|
export * from './other/OctavePlayer';
|
|
5
|
-
export * from './other/
|
|
5
|
+
export * from './other/SvgText';
|
|
6
6
|
export * from './pickers/ChannelMappingPicker';
|
|
7
7
|
export * from './pickers/ChannelPicker';
|
|
8
8
|
export * from './pickers/Knob';
|
|
@@ -21,7 +21,7 @@ export type * from './midi/export';
|
|
|
21
21
|
export type * from './other/DefaultTooltip';
|
|
22
22
|
export type * from './other/OctavePlayer';
|
|
23
23
|
export type * from './other/SoundFontProvider';
|
|
24
|
-
export type * from './other/
|
|
24
|
+
export type * from './other/SvgText';
|
|
25
25
|
export type * from './pickers/CCPicker';
|
|
26
26
|
export type * from './pickers/ChannelMappingPicker';
|
|
27
27
|
export type * from './pickers/ChannelPicker';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Option } from '../pickers/Select';
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
2
|
+
declare const changeControllerOptions: Option<number>[];
|
|
3
|
+
export { changeControllerOptions };
|
|
@@ -18,4 +18,15 @@ declare const extractStatusAndChannel: (status: number) => {
|
|
|
18
18
|
status: Status;
|
|
19
19
|
channel: number;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
declare const RESPONSE_CURVE_0 = 0;
|
|
22
|
+
declare const RESPONSE_CURVE_1 = 1;
|
|
23
|
+
declare const RESPONSE_CURVE_2 = 2;
|
|
24
|
+
declare const RESPONSE_CURVE_3 = 3;
|
|
25
|
+
declare const RESPONSE_CURVE_4 = 4;
|
|
26
|
+
declare const RESPONSE_CURVE_5 = 5;
|
|
27
|
+
declare const RESPONSE_CURVE_6 = 6;
|
|
28
|
+
declare const RESPONSE_CURVE_7 = 7;
|
|
29
|
+
type Curve = typeof RESPONSE_CURVE_0 | typeof RESPONSE_CURVE_1 | typeof RESPONSE_CURVE_2 | typeof RESPONSE_CURVE_3 | typeof RESPONSE_CURVE_4 | typeof RESPONSE_CURVE_5 | typeof RESPONSE_CURVE_6 | typeof RESPONSE_CURVE_7;
|
|
30
|
+
declare const responseCurves: Option<Curve>[];
|
|
31
|
+
export { combineStatusWithChannel, extractStatusAndChannel, getStatusLabel, MASK_CHANNEL, MASK_STATUS, responseCurves, Statuses, statusOptions, };
|
|
32
|
+
export type { Curve, Status };
|
|
@@ -6,5 +6,5 @@ type TooltipProps = {
|
|
|
6
6
|
declare const DefaultTooltip: ({ children }: React.PropsWithoutRef<TooltipProps>) => import("react").FunctionComponentElement<{
|
|
7
7
|
children?: import("react").ReactNode | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
9
|
+
export { DefaultTooltip };
|
|
10
10
|
export type { TooltipProps };
|
|
@@ -22,5 +22,5 @@ type WithProviderProps = {
|
|
|
22
22
|
width: number;
|
|
23
23
|
};
|
|
24
24
|
declare const WithProvider: ({ format, height, hostname, instrumentName, octave, onChange, onClick, onDoubleClick, onKeyMouseEnter, onKeyMouseLeave, soundfont, Tooltip, width, }: WithProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export
|
|
25
|
+
export { WithProvider as OctavePlayer };
|
|
26
26
|
export type { OctavePlayerProps, WithProviderProps };
|
|
@@ -14,5 +14,5 @@ type SoundfontProviderProps = {
|
|
|
14
14
|
soundfont?: 'MusyngKite' | 'FluidR3_GM';
|
|
15
15
|
};
|
|
16
16
|
declare const SoundfontProvider: (props: SoundfontProviderProps) => import("react").ReactNode;
|
|
17
|
-
export
|
|
17
|
+
export { SoundfontProvider };
|
|
18
18
|
export type { SoundfontProviderProps };
|
|
@@ -22,7 +22,6 @@ type TextProps = Partial<HTMLOrSVGElement> & {
|
|
|
22
22
|
x?: number;
|
|
23
23
|
y?: number;
|
|
24
24
|
};
|
|
25
|
-
declare const
|
|
26
|
-
export
|
|
27
|
-
export { MEASUREMENT_ELEMENT_ID };
|
|
25
|
+
declare const SvgText: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { SvgText, MEASUREMENT_ELEMENT_ID };
|
|
28
27
|
export type { TextProps, WordWidths, WordsByLine };
|
|
@@ -3,5 +3,5 @@ import type { Option, SelectProps } from './Select';
|
|
|
3
3
|
type CCPickerProps = SelectProps<number>;
|
|
4
4
|
type CCPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
5
5
|
declare const CCPicker: import("react").ForwardRefExoticComponent<CCPickerProps & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
|
|
6
|
-
export
|
|
6
|
+
export { CCPicker };
|
|
7
7
|
export type { CCPickerProps, CCPickerRef };
|
|
@@ -11,5 +11,5 @@ interface ChannelMappingPickerProps extends SelectProps<InternalValue> {
|
|
|
11
11
|
}
|
|
12
12
|
type ChannelMappingPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
13
13
|
declare const ChannelMappingPicker: import("react").ForwardRefExoticComponent<ChannelMappingPickerProps & import("react").RefAttributes<SelectInstance<Option<InternalValue>, false, GroupBase<Option<InternalValue>>>>>;
|
|
14
|
-
export
|
|
14
|
+
export { ChannelMappingPicker };
|
|
15
15
|
export type { ChannelMappingOption, ChannelMappingPickerProps, ChannelMappingPickerRef, };
|
|
@@ -4,5 +4,5 @@ type Channel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
|
|
|
4
4
|
type ChannelPickerProps = SelectProps<Channel>;
|
|
5
5
|
type ChannelPickerRef = SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>;
|
|
6
6
|
declare const ChannelPicker: import("react").ForwardRefExoticComponent<ChannelPickerProps & import("react").RefAttributes<SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>>>;
|
|
7
|
-
export
|
|
7
|
+
export { ChannelPicker };
|
|
8
8
|
export type { Channel, ChannelPickerProps, ChannelPickerRef };
|
|
@@ -23,5 +23,5 @@ declare const KnobPicker: import("react").ForwardRefExoticComponent<SelectProps<
|
|
|
23
23
|
wheelSensitivity?: number;
|
|
24
24
|
value: number;
|
|
25
25
|
} & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
|
|
26
|
-
export
|
|
26
|
+
export { KnobPicker };
|
|
27
27
|
export type { KnobPickerProps, KnobPickerRef };
|
|
@@ -4,5 +4,5 @@ import type { Option, SelectProps } from './Select';
|
|
|
4
4
|
type LatchPickerProps = SelectProps<Polarity>;
|
|
5
5
|
type LatchPickerRef = SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>;
|
|
6
6
|
declare const LatchPicker: import("react").ForwardRefExoticComponent<LatchPickerProps & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
|
|
7
|
-
export
|
|
7
|
+
export { LatchPicker };
|
|
8
8
|
export type { LatchPickerProps, LatchPickerRef };
|
|
@@ -7,5 +7,5 @@ type MappingPickerRef = SelectInstance<Option<string>, false, GroupBase<Option<s
|
|
|
7
7
|
declare const MappingPicker: import("react").ForwardRefExoticComponent<SelectProps<string> & {
|
|
8
8
|
allowClearing: boolean;
|
|
9
9
|
} & import("react").RefAttributes<SelectInstance<Option<string>, false, GroupBase<Option<string>>>>>;
|
|
10
|
-
export
|
|
10
|
+
export { MappingPicker };
|
|
11
11
|
export type { MappingPickerProps, MappingPickerRef };
|
|
@@ -16,5 +16,5 @@ declare const NotePicker: import("react").ForwardRefExoticComponent<SelectProps<
|
|
|
16
16
|
mapping?: Mapping;
|
|
17
17
|
onChange: (value: number) => void;
|
|
18
18
|
} & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
|
|
19
|
-
export
|
|
19
|
+
export { NotePicker };
|
|
20
20
|
export type { NotePickerProps, NotePickerRef };
|
|
@@ -5,5 +5,5 @@ type PianoProps = {
|
|
|
5
5
|
width: number;
|
|
6
6
|
};
|
|
7
7
|
declare const WithProvider: ({ format, height, hostname, instrumentName, onChange, onClick, onDoubleClick, onKeyMouseEnter, onKeyMouseLeave, soundfont, width, }: WithProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export
|
|
8
|
+
export { WithProvider as PianoPicker };
|
|
9
9
|
export type { PianoProps };
|
|
@@ -10,5 +10,5 @@ declare const PolarityPicker: import("react").ForwardRefExoticComponent<SelectPr
|
|
|
10
10
|
labelOff?: string;
|
|
11
11
|
labelOn?: string;
|
|
12
12
|
} & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
|
|
13
|
-
export
|
|
13
|
+
export { PolarityPicker };
|
|
14
14
|
export type { Polarity, PolarityPickerProps, PolarityPickerRef };
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
+
import { type Curve } from '../midi/export';
|
|
1
2
|
import { type TooltipProps } from '../other/DefaultTooltip';
|
|
2
|
-
|
|
3
|
-
declare const RESPONSE_CURVE_0 = 0;
|
|
4
|
-
declare const RESPONSE_CURVE_1 = 1;
|
|
5
|
-
declare const RESPONSE_CURVE_2 = 2;
|
|
6
|
-
declare const RESPONSE_CURVE_3 = 3;
|
|
7
|
-
declare const RESPONSE_CURVE_4 = 4;
|
|
8
|
-
declare const RESPONSE_CURVE_5 = 5;
|
|
9
|
-
declare const RESPONSE_CURVE_6 = 6;
|
|
10
|
-
declare const RESPONSE_CURVE_7 = 7;
|
|
11
|
-
type Curve = typeof RESPONSE_CURVE_0 | typeof RESPONSE_CURVE_1 | typeof RESPONSE_CURVE_2 | typeof RESPONSE_CURVE_3 | typeof RESPONSE_CURVE_4 | typeof RESPONSE_CURVE_5 | typeof RESPONSE_CURVE_6 | typeof RESPONSE_CURVE_7;
|
|
12
|
-
type ResponseCurve = {
|
|
3
|
+
type ResponseCurveType = {
|
|
13
4
|
value: Curve;
|
|
14
5
|
label: React.ReactNode;
|
|
15
6
|
c1: number;
|
|
@@ -21,7 +12,6 @@ type ResponseCurve = {
|
|
|
21
12
|
labelX: number;
|
|
22
13
|
labelY: number;
|
|
23
14
|
};
|
|
24
|
-
declare const RESPONSE_CURVES: Option<Curve>[];
|
|
25
15
|
type ResponseCurveProps = {
|
|
26
16
|
autosize: boolean;
|
|
27
17
|
disabled?: boolean;
|
|
@@ -35,6 +25,5 @@ type ResponseCurveProps = {
|
|
|
35
25
|
value: Curve;
|
|
36
26
|
};
|
|
37
27
|
declare const ResponseCurve: (props: ResponseCurveProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export
|
|
39
|
-
export {
|
|
40
|
-
export type { Curve, ResponseCurve, ResponseCurveProps };
|
|
28
|
+
export { ResponseCurve };
|
|
29
|
+
export type { ResponseCurveType, ResponseCurveProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
|
+
import { type Curve } from '../midi/export';
|
|
2
3
|
import { type TooltipProps } from '../other/DefaultTooltip';
|
|
3
|
-
import { type Curve } from './ResponseCurve';
|
|
4
4
|
import type { Option, SelectProps } from './Select';
|
|
5
5
|
type ResponseCurvePickerProps = SelectProps<Curve> & {
|
|
6
6
|
inverted?: boolean;
|
|
@@ -11,5 +11,5 @@ declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<Sel
|
|
|
11
11
|
inverted?: boolean;
|
|
12
12
|
Tooltip?: React.FC<TooltipProps>;
|
|
13
13
|
} & import("react").RefAttributes<SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>>>;
|
|
14
|
-
export
|
|
14
|
+
export { ResponseCurvePicker };
|
|
15
15
|
export type { ResponseCurvePickerProps, ResponseCurvePickerRef };
|
|
@@ -25,5 +25,5 @@ type SelectProps<T> = {
|
|
|
25
25
|
declare const Select: <T>(props: SelectProps<T> & {
|
|
26
26
|
ref?: React.ForwardedRef<SelectInstance<Option<T>, false, GroupBase<Option<T>>>>;
|
|
27
27
|
}) => JSX.Element;
|
|
28
|
-
export
|
|
28
|
+
export { Select };
|
|
29
29
|
export type { Option, SelectProps };
|
|
@@ -8,5 +8,5 @@ type StatusPickerRef = SelectInstance<Option<Status>, false, GroupBase<Option<St
|
|
|
8
8
|
declare const StatusPicker: import("react").ForwardRefExoticComponent<SelectProps<Status> & {
|
|
9
9
|
statuses: Option<Status>[];
|
|
10
10
|
} & import("react").RefAttributes<SelectInstance<Option<Status>, false, GroupBase<Option<Status>>>>>;
|
|
11
|
-
export
|
|
11
|
+
export { StatusPicker };
|
|
12
12
|
export type { StatusPickerProps, StatusPickerRef };
|
|
@@ -11,5 +11,5 @@ declare const ValuePicker: import("react").ForwardRefExoticComponent<SelectProps
|
|
|
11
11
|
max?: number;
|
|
12
12
|
min?: number;
|
|
13
13
|
} & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
|
|
14
|
-
export
|
|
14
|
+
export { ValuePicker };
|
|
15
15
|
export type { ValuePickerProps, ValuePickerRef };
|
|
@@ -40,10 +40,4 @@ declare function transformBoundingClientRectToDocument(box: DOMRect): {
|
|
|
40
40
|
width: number;
|
|
41
41
|
height: number;
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
toRadians: typeof toRadians;
|
|
45
|
-
getQuadrant: typeof getQuadrant;
|
|
46
|
-
getAngleForPoint: typeof getAngleForPoint;
|
|
47
|
-
transformBoundingClientRectToDocument: typeof transformBoundingClientRectToDocument;
|
|
48
|
-
};
|
|
49
|
-
export default _default;
|
|
43
|
+
export { toRadians, getQuadrant, getAngleForPoint, transformBoundingClientRectToDocument, };
|
package/lib/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './midi/export'
|
|
|
3
3
|
|
|
4
4
|
export * from './other/DefaultTooltip'
|
|
5
5
|
export * from './other/OctavePlayer'
|
|
6
|
-
export * from './other/
|
|
6
|
+
export * from './other/SvgText'
|
|
7
7
|
|
|
8
8
|
export * from './pickers/ChannelMappingPicker'
|
|
9
9
|
export * from './pickers/ChannelPicker'
|
|
@@ -26,7 +26,7 @@ export type * from './midi/export'
|
|
|
26
26
|
export type * from './other/DefaultTooltip'
|
|
27
27
|
export type * from './other/OctavePlayer'
|
|
28
28
|
export type * from './other/SoundFontProvider'
|
|
29
|
-
export type * from './other/
|
|
29
|
+
export type * from './other/SvgText'
|
|
30
30
|
|
|
31
31
|
export type * from './pickers/CCPicker'
|
|
32
32
|
export type * from './pickers/ChannelMappingPicker'
|
package/lib/midi/ccValues.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Option } from '../pickers/Select'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const changeControllerOptions = [
|
|
4
4
|
'Bank Select',
|
|
5
5
|
'Modulation Wheel',
|
|
6
6
|
'Breath Controller',
|
|
@@ -136,4 +136,4 @@ const CC_NAMES = [
|
|
|
136
136
|
}),
|
|
137
137
|
)
|
|
138
138
|
|
|
139
|
-
export
|
|
139
|
+
export { changeControllerOptions }
|
package/lib/midi/export.ts
CHANGED
|
@@ -41,13 +41,69 @@ const extractStatusAndChannel = (
|
|
|
41
41
|
channel: status & MASK_CHANNEL,
|
|
42
42
|
})
|
|
43
43
|
|
|
44
|
+
const RESPONSE_CURVE_0 = 0
|
|
45
|
+
const RESPONSE_CURVE_1 = 1
|
|
46
|
+
const RESPONSE_CURVE_2 = 2
|
|
47
|
+
const RESPONSE_CURVE_3 = 3
|
|
48
|
+
const RESPONSE_CURVE_4 = 4
|
|
49
|
+
const RESPONSE_CURVE_5 = 5
|
|
50
|
+
const RESPONSE_CURVE_6 = 6
|
|
51
|
+
const RESPONSE_CURVE_7 = 7
|
|
52
|
+
|
|
53
|
+
type Curve =
|
|
54
|
+
| typeof RESPONSE_CURVE_0
|
|
55
|
+
| typeof RESPONSE_CURVE_1
|
|
56
|
+
| typeof RESPONSE_CURVE_2
|
|
57
|
+
| typeof RESPONSE_CURVE_3
|
|
58
|
+
| typeof RESPONSE_CURVE_4
|
|
59
|
+
| typeof RESPONSE_CURVE_5
|
|
60
|
+
| typeof RESPONSE_CURVE_6
|
|
61
|
+
| typeof RESPONSE_CURVE_7
|
|
62
|
+
|
|
63
|
+
const responseCurves: Option<Curve>[] = [
|
|
64
|
+
{
|
|
65
|
+
value: RESPONSE_CURVE_7,
|
|
66
|
+
label: 'Always maxed out.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: RESPONSE_CURVE_6,
|
|
70
|
+
label: 'Most sensitive.',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: RESPONSE_CURVE_5,
|
|
74
|
+
label: 'Moderately sensitive.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
value: RESPONSE_CURVE_4,
|
|
78
|
+
label: 'A little sensitive.',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: RESPONSE_CURVE_0,
|
|
82
|
+
label: 'Linear, no change.',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: RESPONSE_CURVE_1,
|
|
86
|
+
label: 'A little less sensitive.',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: RESPONSE_CURVE_2,
|
|
90
|
+
label: 'Even less sensitive.',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
value: RESPONSE_CURVE_3,
|
|
94
|
+
label: 'Least sensitive.',
|
|
95
|
+
},
|
|
96
|
+
]
|
|
97
|
+
|
|
44
98
|
export {
|
|
45
99
|
combineStatusWithChannel,
|
|
46
100
|
extractStatusAndChannel,
|
|
47
101
|
getStatusLabel,
|
|
48
102
|
MASK_CHANNEL,
|
|
49
103
|
MASK_STATUS,
|
|
50
|
-
|
|
104
|
+
responseCurves,
|
|
51
105
|
Statuses,
|
|
52
|
-
|
|
106
|
+
statusOptions,
|
|
53
107
|
}
|
|
108
|
+
|
|
109
|
+
export type { Curve, Status }
|
|
@@ -2,7 +2,7 @@ import type Soundfont from 'soundfont-player'
|
|
|
2
2
|
import { /* Midi, */ Note } from 'tonal'
|
|
3
3
|
import { Piano as ReactPiano } from 'zds-react-piano'
|
|
4
4
|
import type { TooltipProps } from './DefaultTooltip'
|
|
5
|
-
import SoundfontProvider from './SoundFontProvider'
|
|
5
|
+
import { SoundfontProvider } from './SoundFontProvider'
|
|
6
6
|
|
|
7
7
|
const baseNotes = [
|
|
8
8
|
'C',
|
|
@@ -38,7 +38,7 @@ type OctavePlayerProps = {
|
|
|
38
38
|
width: number
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const BaseOctavePlayer = ({
|
|
42
42
|
octave,
|
|
43
43
|
height,
|
|
44
44
|
width,
|
|
@@ -116,7 +116,7 @@ const WithProvider = ({
|
|
|
116
116
|
<div>
|
|
117
117
|
<h2>Octave: {octave}</h2>
|
|
118
118
|
</div>
|
|
119
|
-
<
|
|
119
|
+
<BaseOctavePlayer
|
|
120
120
|
disabled={isLoading}
|
|
121
121
|
{...{
|
|
122
122
|
height,
|
|
@@ -136,6 +136,6 @@ const WithProvider = ({
|
|
|
136
136
|
/>
|
|
137
137
|
)
|
|
138
138
|
|
|
139
|
-
export
|
|
139
|
+
export { WithProvider as OctavePlayer }
|
|
140
140
|
|
|
141
141
|
export type { OctavePlayerProps, WithProviderProps }
|
|
@@ -127,6 +127,6 @@ const SoundfontProvider = (props: SoundfontProviderProps) => {
|
|
|
127
127
|
// https://gleitz.github.io/midi-js-soundfonts/MusyngKite/acoustic_grand_piano-mp3.js
|
|
128
128
|
// https://gleitz.github.io/midi-js-soundfonts/FluidR3_GM/.js
|
|
129
129
|
|
|
130
|
-
export
|
|
130
|
+
export { SoundfontProvider }
|
|
131
131
|
|
|
132
132
|
export type { SoundfontProviderProps }
|
|
@@ -91,7 +91,7 @@ type TextProps = Partial<HTMLOrSVGElement> & {
|
|
|
91
91
|
y?: number
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const
|
|
94
|
+
const SvgText = (props: TextProps) => {
|
|
95
95
|
const {
|
|
96
96
|
className = '',
|
|
97
97
|
dx = 0,
|
|
@@ -216,8 +216,6 @@ const Text = (props: TextProps) => {
|
|
|
216
216
|
)
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
export
|
|
220
|
-
|
|
221
|
-
export { MEASUREMENT_ELEMENT_ID }
|
|
219
|
+
export { SvgText, MEASUREMENT_ELEMENT_ID }
|
|
222
220
|
|
|
223
221
|
export type { TextProps, WordWidths, WordsByLine }
|
package/lib/pickers/CCPicker.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react'
|
|
2
2
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
3
|
-
import
|
|
4
|
-
import Select from './Select'
|
|
3
|
+
import { changeControllerOptions } from '../midi/ccValues'
|
|
4
|
+
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
7
|
type CCPickerProps = SelectProps<number>
|
|
@@ -18,11 +18,11 @@ const CCPicker = forwardRef<
|
|
|
18
18
|
>((props, ref) => (
|
|
19
19
|
<Select
|
|
20
20
|
{...props}
|
|
21
|
-
options={
|
|
21
|
+
options={changeControllerOptions}
|
|
22
22
|
ref={ref}
|
|
23
23
|
/>
|
|
24
24
|
))
|
|
25
25
|
|
|
26
|
-
export
|
|
26
|
+
export { CCPicker }
|
|
27
27
|
|
|
28
28
|
export type { CCPickerProps, CCPickerRef }
|
|
@@ -2,7 +2,7 @@ import cl from 'classnames'
|
|
|
2
2
|
import { forwardRef, useCallback, useEffect, useState } from 'react'
|
|
3
3
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
4
4
|
import { arraySequence } from '../utils'
|
|
5
|
-
import Select from './Select'
|
|
5
|
+
import { Select } from './Select'
|
|
6
6
|
import type { Option, SelectProps } from './Select'
|
|
7
7
|
|
|
8
8
|
type InternalValue = number | 'separator'
|
|
@@ -130,7 +130,7 @@ const ChannelMappingPicker = forwardRef<
|
|
|
130
130
|
)
|
|
131
131
|
})
|
|
132
132
|
|
|
133
|
-
export
|
|
133
|
+
export { ChannelMappingPicker }
|
|
134
134
|
|
|
135
135
|
export type {
|
|
136
136
|
ChannelMappingOption,
|
|
@@ -2,7 +2,7 @@ import cl from 'classnames'
|
|
|
2
2
|
import { forwardRef } from 'react'
|
|
3
3
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
4
4
|
import { arraySequence } from '../utils'
|
|
5
|
-
import Select from './Select'
|
|
5
|
+
import { Select } from './Select'
|
|
6
6
|
import type { Option, SelectProps } from './Select'
|
|
7
7
|
|
|
8
8
|
type Channel =
|
|
@@ -71,6 +71,6 @@ const ChannelPicker = forwardRef<
|
|
|
71
71
|
)
|
|
72
72
|
})
|
|
73
73
|
|
|
74
|
-
export
|
|
74
|
+
export { ChannelPicker }
|
|
75
75
|
|
|
76
76
|
export type { Channel, ChannelPickerProps, ChannelPickerRef }
|
package/lib/pickers/Knob.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback } from 'react'
|
|
2
2
|
import useStateWithDynamicDefault from '../hooks/useStateWithDynamicDefault'
|
|
3
|
-
import RotaryKnob from '../rotaryKnob'
|
|
3
|
+
import { RotaryKnob } from '../rotaryKnob'
|
|
4
4
|
import { assertRange } from '../utils'
|
|
5
|
-
import knobSkin10 from './knobSkin10'
|
|
5
|
+
import { knobSkin10 } from './knobSkin10'
|
|
6
6
|
|
|
7
7
|
type KnobProps = {
|
|
8
8
|
disabled?: boolean
|
|
@@ -88,6 +88,6 @@ const Knob = (props: KnobProps) => {
|
|
|
88
88
|
)
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export
|
|
91
|
+
export { Knob }
|
|
92
92
|
|
|
93
93
|
export type { KnobProps }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef, useMemo } from 'react'
|
|
2
2
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
3
3
|
import { arraySequence } from '../utils'
|
|
4
|
-
import Knob from './Knob'
|
|
5
|
-
import Select from './Select'
|
|
4
|
+
import { Knob } from './Knob'
|
|
5
|
+
import { Select } from './Select'
|
|
6
6
|
import type { Option, SelectProps } from './Select'
|
|
7
7
|
|
|
8
8
|
type KnobPickerProps = SelectProps<number> & {
|
|
@@ -88,6 +88,6 @@ const KnobPicker = forwardRef<
|
|
|
88
88
|
)
|
|
89
89
|
})
|
|
90
90
|
|
|
91
|
-
export
|
|
91
|
+
export { KnobPicker }
|
|
92
92
|
|
|
93
93
|
export type { KnobPickerProps, KnobPickerRef }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react'
|
|
2
2
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
3
3
|
import type { Polarity } from './PolarityPicker'
|
|
4
|
-
import Select from './Select'
|
|
4
|
+
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
7
|
const options: Option<Polarity>[] = [
|
|
@@ -28,6 +28,6 @@ const LatchPicker = forwardRef<
|
|
|
28
28
|
/>
|
|
29
29
|
))
|
|
30
30
|
|
|
31
|
-
export
|
|
31
|
+
export { LatchPicker }
|
|
32
32
|
|
|
33
33
|
export type { LatchPickerProps, LatchPickerRef }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef, useMemo } from 'react'
|
|
2
2
|
import type { GroupBase, SelectInstance } from 'react-select'
|
|
3
3
|
import { getStockNames, getUserMappingNames } from 'zds-mappings'
|
|
4
|
-
import Select from './Select'
|
|
4
|
+
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
7
|
type MappingPickerProps = SelectProps<string> & {
|
|
@@ -63,6 +63,6 @@ const MappingPicker = forwardRef<
|
|
|
63
63
|
)
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
export
|
|
66
|
+
export { MappingPicker }
|
|
67
67
|
|
|
68
68
|
export type { MappingPickerProps, MappingPickerRef }
|
|
@@ -4,7 +4,7 @@ import { Midi } from 'tonal'
|
|
|
4
4
|
import { type MapItem, type Mapping, emptyMapping } from 'zds-mappings'
|
|
5
5
|
import useStateWithDynamicDefault from '../hooks/useStateWithDynamicDefault'
|
|
6
6
|
import { assertRange } from '../utils'
|
|
7
|
-
import Select from './Select'
|
|
7
|
+
import { Select } from './Select'
|
|
8
8
|
import type { Option, SelectProps } from './Select'
|
|
9
9
|
|
|
10
10
|
const { midiToNoteName } = Midi
|
|
@@ -90,6 +90,6 @@ const NotePicker = forwardRef<
|
|
|
90
90
|
)
|
|
91
91
|
})
|
|
92
92
|
|
|
93
|
-
export
|
|
93
|
+
export { NotePicker }
|
|
94
94
|
|
|
95
95
|
export type { NotePickerProps, NotePickerRef }
|