Skip to content

Commit

Permalink
Merge pull request #12 from merttoka/master
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
merttoka authored Apr 12, 2017
2 parents e0a244f + 776343f commit af60b5f
Show file tree
Hide file tree
Showing 13 changed files with 150 additions and 136 deletions.
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
node_modules/rx/ts/core/observable.ts
deps/
config/
.DS_Store
19 changes: 10 additions & 9 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"userpath": "/Users/canince",
"userpath": "C:\\Users\\Mert",
"debug": true,
"ghcipath": "/Library/Frameworks/GHC.framework/Versions/8.0.1-x86_64/usr/bin/ghci-8.0.1",
"sclang": "/Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang",
"scsynth": "/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth",
"sclang_conf": "/Users/canince/Library/Application Support/SuperCollider/sclang_conf.yaml",
"port": 3001,
"path" : "/Users/canince/Documents/Github/sq/config/config.json",
"tidal_boot": "/Users/canince/Documents/Github/sq/config/tidal-boot-default.hs",
"scd_start": "/Users/canince/Documents/Github/sq/config/scd-start-default.scd"
"ghcipath": "C:\\Program Files\\Haskell Platform\\8.0.1\\bin\\ghci.exe",
"sclang": "C:\\Program Files\\SuperCollider-3.8.0\\sclang.exe",
"scsynth": "C:\\Program Files\\SuperCollider-3.8.0\\scsynth.exe",
"sclang_conf": "C:\\Users\\Mert\\AppData\\Local\\SuperCollider\\sclang_conf.yaml",
"port":3001,
"samples_path": "C:\\Users\\Mert\\Dropbox\\Whalehouse\\Samples\\*",
"path": "C:\\GitHub\\Siren\\config\\config.json",
"tidal_boot": "C:\\GitHub\\Siren\\config\\tidal-boot-default.hs",
"scd_start": "C:\\GitHub\\Siren\\config\\scd-start-default.scd",
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Siren",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"devDependencies": {
"babel": "^6.5.2",
Expand Down
24 changes: 10 additions & 14 deletions src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function sendZapier(data) {
console.log(response);
})
.catch(function (error) {
console.log(error);
console.error(error);
});
}

Expand Down Expand Up @@ -429,7 +429,6 @@ export const sendPatterns = (server,vals, patterns =[], solo, transition, channe
const getMathExpr = (v) => {
var maths = [];
_.map(_.split(v, /[&]+/g), (p1, p2) => {
console.log(p1, p2);
p1 = _.trim(p1);

if(p1 !== "") maths.push(p1);
Expand Down Expand Up @@ -523,7 +522,7 @@ export const sendPatterns = (server,vals, patterns =[], solo, transition, channe
}

var pattern = soloHolder + transitionHolder +globalTransformations+ newCommand + " " + globalCommands;
if (_.indexOf(channels,_k) === _.indexOf(channels, 'JV')){
if (_.indexOf(channels,_k) === _.indexOf(channels, 'm1')){
pattern = "m1 $ " + newCommand;
storedPatterns[_k-1] = '';
storedPatterns[_k-1] = pattern;
Expand All @@ -541,7 +540,7 @@ export const sendPatterns = (server,vals, patterns =[], solo, transition, channe
axios.post('http://' + server.replace('http:', '').replace('/', '').replace('https:', '') + '/patterns', { 'patterns': x })
.then((response) => {
}).catch(function (error) {
console.log(error);
console.error(error);
});
}
}
Expand All @@ -552,7 +551,7 @@ export const continousPattern = (server, pattern) => {
axios.post('http://' + server.replace('http:', '').replace('/', '').replace('https:', '') + '/pattern', { 'pattern': [x,"sendOSC d_OSC $ Message \"tree\" [string \"command\", string \""+6+"\"]"] })
.then((response) => {
}).catch(function (error) {
console.log(error);
console.error(error);
});
}
}
Expand Down Expand Up @@ -619,27 +618,24 @@ export const consoleSubmit = (server, expression) => {
axios.post('http://' + server.replace('http:', '').replace('/', '').replace('https:', '') + '/pattern', { 'pattern': [expression] })
.then((response) => {
}).catch(function (error) {
console.log(error);
console.error(error);
});
}
}

export const resetPattern = () => ({type: 'RESET_CC'});
export const fetchPattern = () => ({type: 'FETCH_CC'});



var timer = [];
export function startIndividualTimer(_index,_duration, _steps) {
console.log("HERE");
timerWorker[_index].postMessage({type : "start", id: _index, duration: _duration, steps: _steps, timer: timer[_index]});
timerWorker[_index].postMessage({type : "start", id: _index, duration: _duration, steps: _steps, timer: timer[_index]});
}

export const updateTimerduration = (_index,_duration,_steps) => {
//timerWorker[_index].postMessage({type : "update", id: _index, duration: _duration, steps: _steps,timer: timer[_index]});
return {
type: 'UPDATE_TIMER', payload: _index, duration : _duration
}
if(_duration === "" || !isNaN(parseInt(_duration)))
return {
type: 'UPDATE_TIMER', payload: _index, duration : _duration
}
}

var timerWorker= [];
Expand Down
3 changes: 0 additions & 3 deletions src/actions/tworker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
self.onmessage=function(e){
if (e.data.type == "start") {
var interval= e.data.duration / e.data.steps * 1000;
console.log("starting");
var t = setInterval(function(){postMessage({type:"tick", id:e.data.id, msg: t});},interval)

}
else if (e.data.type == "update") {
var interval= e.data.duration / e.data.steps * 1000;
Expand All @@ -13,7 +11,6 @@ self.onmessage=function(e){
}
}
else if (e.data.type == "stop" || e.data.type == "pause") {
console.log("stopping");
clearInterval(e.data.timer);
e.data.timer=null;

Expand Down
2 changes: 1 addition & 1 deletion src/assets/_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

.cm-s-_style.CodeMirror { background: #f5f5f5; color: #202020; height: auto; }
.cm-s-_style.CodeMirror { background: #f5f5f5; color: #202020; height: 150px; }
.cm-s-_style div.CodeMirror-selected { background: #3a3a3a; }
.cm-s-_style .CodeMirror-line::selection, .cm-s-_style .CodeMirror-line > span::selection, .cm-s-_style .CodeMirror-line > span > span::selection { background: #487283; }
.cm-s-_style .CodeMirror-line::-moz-selection, .cm-s-_style .CodeMirror-line > span::-moz-selection, .cm-s-_style .CodeMirror-line > span > span::-moz-selection { background: #487283; }
Expand Down
2 changes: 1 addition & 1 deletion src/components/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ body {
color: #ddd;
border-bottom: 1px solid rgba(125,125,125, 0.8);
font-size: 10px;
width:100px;
width: 95%;
}


Expand Down
12 changes: 12 additions & 0 deletions src/components/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
margin: 2px;
}

@keyframes example {
from {color: white;}
to {color: rgba(255,255,102, 0.75);}
}

#login {
animation-name: example;
animation-duration: 0.5s;
animation-iteration-count: infinite;
animation-direction: alternate;
}

.spinner {
width: 40px;
border: 0;
Expand Down
Loading

0 comments on commit af60b5f

Please sign in to comment.