FIX: Midi Value creation
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
</draggable>
|
</draggable>
|
||||||
<button
|
<button
|
||||||
class="flex flex-1 items-center justify-center rounded-lg border border-zinc-800 bg-zinc-900/50 p-2 text-sm text-muted-foreground hover:bg-zinc-800 hover:text-zinc-200"
|
class="flex flex-1 items-center justify-center rounded-lg border border-zinc-800 bg-zinc-900/50 p-2 text-sm text-muted-foreground hover:bg-zinc-800 hover:text-zinc-200"
|
||||||
@click="deviceStore.addKnobValue"
|
@click="deviceStore.addKnobValue()"
|
||||||
>
|
>
|
||||||
<Plus class="mr-2" /> Add a value
|
<Plus class="mr-2" /> Add a value
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ const { nanoIpc } = window
|
|||||||
|
|
||||||
const messageCallbacks: ((title: string, message: string) => void)[] = []
|
const messageCallbacks: ((title: string, message: string) => void)[] = []
|
||||||
|
|
||||||
|
const createUpdateArray = (index: number, value) => {
|
||||||
|
const arr = Array(index + 1).fill({})
|
||||||
|
arr[index] = value
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
export const useDeviceStore = defineStore('device', {
|
export const useDeviceStore = defineStore('device', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
attachedDeviceIds: [] as string[], // list of attached device ids
|
attachedDeviceIds: [] as string[], // list of attached device ids
|
||||||
@@ -145,9 +151,12 @@ export const useDeviceStore = defineStore('device', {
|
|||||||
haptic: {
|
haptic: {
|
||||||
mode: 0,
|
mode: 0,
|
||||||
startPos: 0,
|
startPos: 0,
|
||||||
endPos: Math.PI * 2,
|
endPos: 127,
|
||||||
detentCount: 10,
|
detentCount: 127,
|
||||||
vernier: 10
|
vernier: 0,
|
||||||
|
kxForce: 0,
|
||||||
|
outputRamp: 200,
|
||||||
|
detentStrength: 4
|
||||||
}
|
}
|
||||||
} as Value,
|
} as Value,
|
||||||
defaultKeyAction: { type: 'next_profile' } as Action,
|
defaultKeyAction: { type: 'next_profile' } as Action,
|
||||||
|
|||||||
Reference in New Issue
Block a user