new controls
This commit is contained in:
parent
c92d625b24
commit
9d44b0251a
4 changed files with 52 additions and 34 deletions
|
|
@ -233,6 +233,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
|
||||||
dancer.play();
|
dancer.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.onColorloopModeChange();
|
||||||
this.toggleProperty('playing');
|
this.toggleProperty('playing');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -581,13 +582,17 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
|
||||||
console.log(mag + ',' + ratioKick);
|
console.log(mag + ',' + ratioKick);
|
||||||
|
|
||||||
var activeLights = this.get('activeLights'),
|
var activeLights = this.get('activeLights'),
|
||||||
transitionTime = 100,
|
|
||||||
onBeatBriAndColor = this.get('onBeatBriAndColor'),
|
|
||||||
lightsData = this.get('lightsData'),
|
lightsData = this.get('lightsData'),
|
||||||
color = null,
|
color = null,
|
||||||
beatInterval = 1,
|
beatInterval = 1,
|
||||||
stimulateLight = (light, brightness, hue) => {
|
stimulateLight = (light, brightness, hue) => {
|
||||||
var options = {'bri': brightness, 'transitiontime': transitionTime};
|
var options = {'bri': brightness};
|
||||||
|
|
||||||
|
if(this.get('blinkingTransitions')) {
|
||||||
|
options['transitiontime'] = 0;
|
||||||
|
} else {
|
||||||
|
options['transitiontime'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(!Em.isNone(hue)) {
|
if(!Em.isNone(hue)) {
|
||||||
options.hue = hue;
|
options.hue = hue;
|
||||||
|
|
@ -621,12 +626,12 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
|
||||||
light = activeLights[lightBopIndex];
|
light = activeLights[lightBopIndex];
|
||||||
this.set('lastLightBopIndex', lightBopIndex);
|
this.set('lastLightBopIndex', lightBopIndex);
|
||||||
|
|
||||||
if(onBeatBriAndColor) {
|
if(!this.get('colorloopMode')) {
|
||||||
color = Math.floor(Math.random() * 65535);
|
color = Math.floor(Math.random() * 65535);
|
||||||
}
|
}
|
||||||
|
|
||||||
stimulateLight(light, 254, color);
|
stimulateLight(light, 254, color);
|
||||||
setTimeout(stimulateLight, transitionTime + 50, light, 1);
|
setTimeout(stimulateLight, 100, light, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.set('paused', true);
|
this.set('paused', true);
|
||||||
|
|
@ -669,7 +674,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
|
||||||
this.set('usingMicSupported', false);
|
this.set('usingMicSupported', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'onBeatBriAndColor', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost'].forEach((item)=>{
|
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'blinkingTransitions'].forEach((item)=>{
|
||||||
if (!Em.isNone(storage.get('huegasm.' + item))) {
|
if (!Em.isNone(storage.get('huegasm.' + item))) {
|
||||||
var itemVal = storage.get('huegasm.' + item);
|
var itemVal = storage.get('huegasm.' + item);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ export default Em.Mixin.create({
|
||||||
threshold: 0.3,
|
threshold: 0.3,
|
||||||
micBoost: 5,
|
micBoost: 5,
|
||||||
oldThreshold: null,
|
oldThreshold: null,
|
||||||
|
blinkingTransitions: false,
|
||||||
|
|
||||||
playQueuePointer: -1,
|
playQueuePointer: -1,
|
||||||
playQueue: Em.A(),
|
playQueue: Em.A(),
|
||||||
|
|
@ -131,15 +132,6 @@ export default Em.Mixin.create({
|
||||||
return this.get('playing');
|
return this.get('playing');
|
||||||
}.property('playing'),
|
}.property('playing'),
|
||||||
|
|
||||||
onBeatBriAndColor: true,
|
|
||||||
onBeatBriAndColorLabel: function() {
|
|
||||||
if(this.get('onBeatBriAndColor')){
|
|
||||||
return 'Brightness & Color';
|
|
||||||
} else {
|
|
||||||
return 'Brightness';
|
|
||||||
}
|
|
||||||
}.property('onBeatBriAndColor'),
|
|
||||||
|
|
||||||
micIcon: function () {
|
micIcon: function () {
|
||||||
if (this.get('usingMicAudio')) {
|
if (this.get('usingMicAudio')) {
|
||||||
return 'mic';
|
return 'mic';
|
||||||
|
|
@ -228,10 +220,20 @@ export default Em.Mixin.create({
|
||||||
}
|
}
|
||||||
}.property('volumeMuted', 'volume'),
|
}.property('volumeMuted', 'volume'),
|
||||||
|
|
||||||
|
onColorloopModeChange: function(){
|
||||||
|
this.get('activeLights').forEach((light) => {
|
||||||
|
Em.$.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
|
||||||
|
data: JSON.stringify({'effect': (this.get('playing') && this.get('colorloopMode')) ? 'colorloop' : 'none'}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
type: 'PUT'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}.observes('colorloopMode'),
|
||||||
|
|
||||||
onOptionChange: function(self, option){
|
onOptionChange: function(self, option){
|
||||||
option = option.replace('.[]', '');
|
option = option.replace('.[]', '');
|
||||||
this.get('storage').set('huegasm.' + option, this.get(option));
|
this.get('storage').set('huegasm.' + option, this.get(option));
|
||||||
}.observes('onBeatBriAndColor', 'playQueue.[]', 'playQueuePointer'),
|
}.observes('blinkingTransitions', 'playQueue.[]', 'playQueuePointer', 'colorloopMode'),
|
||||||
|
|
||||||
onRepeatChange: function () {
|
onRepeatChange: function () {
|
||||||
var tooltipTxt = 'Repeat all', type = 'repeat';
|
var tooltipTxt = 'Repeat all', type = 'repeat';
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,7 @@
|
||||||
|
|
||||||
{{#if usingMicAudio}}
|
{{#if usingMicAudio}}
|
||||||
<div id="playAreaMic" class="{{if dimmerOn "dimmerOn"}}">
|
<div id="playAreaMic" class="{{if dimmerOn "dimmerOn"}}">
|
||||||
<div id="micBoost" class="beatOption">
|
{{paper-icon icon="mic" class=dimmerOnClass}}
|
||||||
<span data-toggle="tooltip" data-placement="bottom auto" data-title="The coefficient to boost the microphone signal by" class="optionDescription bootstrapTooltip">Microphone Boost</span>
|
|
||||||
{{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range slide="micBoostChanged" pips=beatOptions.micBoost.pips}}
|
|
||||||
<div class="text-center">{{micBoost}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if usingLocalAudio}}
|
{{#if usingLocalAudio}}
|
||||||
|
|
@ -152,17 +148,22 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="row" id="beatOptionRow">
|
<div class="row" id="beatOptionRow">
|
||||||
<div class="beatOption col-xs-8">
|
<div class="beatOption {{if usingMicAudio "col-xs-4" "col-xs-8"}}">
|
||||||
<span data-toggle="tooltip" data-placement="bottom auto" data-title="The minimum sound intensity for the beat to register" class="optionDescription bootstrapTooltip">Sensitivity</span>
|
<span data-toggle="tooltip" data-placement="bottom auto" data-title="The minimum sound intensity for the beat to register" class="optionDescription bootstrapTooltip">Sensitivity</span>
|
||||||
{{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range slide="thresholdChanged" pips=beatOptions.threshold.pips}}
|
{{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range slide="thresholdChanged" pips=beatOptions.threshold.pips}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="beatOption col-xs-4">
|
{{#if usingMicAudio}}
|
||||||
{{#paper-switch checked=onBeatBriAndColor disabled=trial}}<span data-toggle="tooltip"
|
<div class="beatOption col-xs-4">
|
||||||
data-placement="bottom auto"
|
<span data-toggle="tooltip" data-placement="bottom auto" data-title="The coefficient to boost the microphone signal by" class="optionDescription bootstrapTooltip">Microphone Boost</span>
|
||||||
data-title="The properties of the lights to change on beat"
|
{{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range slide="micBoostChanged" pips=beatOptions.micBoost.pips}}
|
||||||
class="optionDescription bootstrapTooltip">
|
<div class="text-center">{{micBoost}}</div>
|
||||||
{{onBeatBriAndColorLabel}}</span>{{/paper-switch}}
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="beatOption col-xs-4 text-left">
|
||||||
|
{{#paper-checkbox checked=blinkingTransitions}}Blinking transitions{{/paper-checkbox}}
|
||||||
|
{{#paper-checkbox checked=colorloopMode}}Colorloop Mode{{/paper-checkbox}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,23 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.introjs-overlay{
|
.introjs-overlay {
|
||||||
background: black;
|
background: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
md-checkbox.md-default-theme .md-icon {
|
||||||
|
border-color: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
md-checkbox.md-default-theme.md-checked .md-icon {
|
||||||
|
background: $secondaryThemeColor;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-left {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
.goButton:hover {
|
.goButton:hover {
|
||||||
background: darken(#3f51b5, 10%) !important;
|
background: darken(#3f51b5, 10%) !important;
|
||||||
}
|
}
|
||||||
|
|
@ -694,7 +707,7 @@ md-switch.md-default-theme.md-checked .md-thumb {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.library-music {
|
.library-music, .mic {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 40%;
|
top: 40%;
|
||||||
font-size: 100px;
|
font-size: 100px;
|
||||||
|
|
@ -926,6 +939,7 @@ body.dimmerOn {
|
||||||
.loop.dimmerOn,
|
.loop.dimmerOn,
|
||||||
.group.dimmerOn,
|
.group.dimmerOn,
|
||||||
.settings.dimmerOn,
|
.settings.dimmerOn,
|
||||||
|
.mic.dimmerOn,
|
||||||
.library-music.dimmerOn {
|
.library-music.dimmerOn {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
text-shadow: $glowingText;
|
text-shadow: $glowingText;
|
||||||
|
|
@ -1077,7 +1091,3 @@ div.ember-modal-dialog {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
top: -2px;
|
top: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#micBoost {
|
|
||||||
margin-top: 50px;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Reference in a new issue