From 96f56bfdfb86d118dfe4d007f4da6be67a8b354b Mon Sep 17 00:00:00 2001 From: "pcASUS_grey\\esnho" Date: Wed, 16 May 2018 20:21:13 +0200 Subject: [PATCH 1/3] Fix to support a true fullscreen on MS Windows --- src/main/mainWindow.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/mainWindow.js b/src/main/mainWindow.js index 49120e39..625b9714 100644 --- a/src/main/mainWindow.js +++ b/src/main/mainWindow.js @@ -47,6 +47,8 @@ export const createMainWindow = () => { if (!isDevelopment) { setTimeout(() => { mainWindow.setFullScreen(true) + event.newGuest.setAutoHideMenuBar(true) + event.newGuest.setMenuBarVisibility(false) event.newGuest.setFullScreen(true) }, 500) } From c8abeabc90c86acdb27126e86c39bbfa300e1118 Mon Sep 17 00:00:00 2001 From: cale Date: Tue, 22 May 2018 21:43:32 -0300 Subject: [PATCH 2/3] fixed the wave timers --- src/store/clock/sagas.js | 29 +++++++++++++++++++++-------- src/utils/lfoProcess/index.js | 12 ++++++------ 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/store/clock/sagas.js b/src/store/clock/sagas.js index 2bb6b54e..26d80321 100644 --- a/src/store/clock/sagas.js +++ b/src/store/clock/sagas.js @@ -1,13 +1,18 @@ import 'babel-polyfill' -import { takeEvery, put, call } from 'redux-saga/effects' +import { + takeEvery, + put, + call +} from 'redux-saga/effects' import * as a from './actions' -import { inputFired } from '../inputs/actions' +import { + inputFired +} from '../inputs/actions' import now from 'performance-now' const ppqn = 24 -let deltaInc = Math.PI / ppqn -let pulses, delta, beats, lastBar +let pulses, delta, beats, lastBar, totalBeats let seqStepCount = 0 // Sequencer step count const ppSeqStep = ppqn / 8 // Pulses per 8th beat const seqStepPerBar = ppSeqStep * 8 * 4 @@ -16,14 +21,13 @@ export const clockReset = () => { pulses = 0 delta = 0 beats = 0 + totalBeats = 0 lastBar = now() } export const newPulse = () => { pulses++ - delta += deltaInc seqStepCount++ - if (seqStepCount > seqStepPerBar - 1) { seqStepCount = 0 } @@ -31,11 +35,18 @@ export const newPulse = () => { if (pulses > 23) { pulses = 0 beats++ + totalBeats++ if (beats > 3) { beats = 0 } } - return { pulses, beats, delta, seqStepCount } + delta = pulses / ppqn + totalBeats + return { + pulses, + beats, + delta, + seqStepCount + } } export const calcBpm = () => { @@ -47,7 +58,9 @@ export const calcBpm = () => { export function* clockUpdate () { const info = yield call(newPulse) - yield put(inputFired('lfo', info.delta, { type: 'lfo' })) + yield put(inputFired('lfo', info.delta, { + type: 'lfo' + })) if (info.seqStepCount % ppSeqStep === 0) { yield put(inputFired('seq-step', info.seqStepCount / ppSeqStep)) diff --git a/src/utils/lfoProcess/index.js b/src/utils/lfoProcess/index.js index 35ff0f35..598a5625 100644 --- a/src/utils/lfoProcess/index.js +++ b/src/utils/lfoProcess/index.js @@ -4,21 +4,21 @@ export default (delta, shape, rate) => { switch (shape) { case 'sine': - y = Math.sin(x) + y = Math.cos(x * 6.28318530718) * 0.5 + 0.5 break case 'sawtooth': - y = (x - Math.floor(x + 0.5)) * 2 + y = x % 1 break case 'rSawtooth': - y = -(x - Math.floor(x + 0.5)) * 2 + y = 1 - (x % 1) break case 'square': - y = Math.sign(Math.sin(x)) + y = Math.floor((x % 1) * 2) break case 'triangle': - y = Math.abs((x - Math.floor(x + 0.5)) * 2) + y = Math.abs((x % 1) * 2 - 1) break } - return (y + 1) / 2 // convert from -1 ~ 1 to 0 ~ 1 + return y } From 270035a68863f5f415da105ce06b4d56c2e321f2 Mon Sep 17 00:00:00 2001 From: Alex Kempton Date: Sat, 26 May 2018 14:06:53 +0100 Subject: [PATCH 3/3] Code style fix --- src/store/clock/sagas.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/store/clock/sagas.js b/src/store/clock/sagas.js index 26d80321..4a2745e9 100644 --- a/src/store/clock/sagas.js +++ b/src/store/clock/sagas.js @@ -1,15 +1,8 @@ import 'babel-polyfill' - -import { - takeEvery, - put, - call -} from 'redux-saga/effects' -import * as a from './actions' -import { - inputFired -} from '../inputs/actions' import now from 'performance-now' +import { takeEvery, put, call } from 'redux-saga/effects' +import { inputFired } from '../inputs/actions' +import * as a from './actions' const ppqn = 24 let pulses, delta, beats, lastBar, totalBeats