removing features I dont think are good enough, hue range slider, a few dependency updates, set list of songs

This commit is contained in:
Egor 2016-01-06 01:04:30 -08:00
parent 4bdf4ce506
commit b5dad4eb54
7 changed files with 96 additions and 50 deletions

View file

@ -53,11 +53,6 @@ export default Em.Component.extend({
intro: 'You can add and select music to play from your playlist here. You may listen to local audio files, stream music from soundcloud or stream directly from a connected microphone.<br><br>' +
'<i><b>TIP</b>: Songs added through Soundcloud will be saved for when you visit this page again.</i>'
},
{
element: '#usingMicAudioTooltip',
intro: 'This icon will toggle microphone mode in which the application will listen to sound through your mic.<br>' +
'Note that this is a highly experimental feature that will require your authorization to be able to listen to the microphone. Also note that the beat detection will not be nearly as accurate in this mode.'
},
{
element: '#playerArea',
intro: 'The audio playback may be controlled with the controls here. Basic music visualization effects may be shown here by selecting them from the menu ( eyeball icon in the bottom right ).'
@ -66,9 +61,9 @@ export default Em.Component.extend({
element: '#beatOptionRow',
intro: 'These are the settings for the music tab:<br>' +
'<b>Sensitivity</b> - The sensitivity of the beat detector ( more sensitivity results in more registered beats )<br>' +
'<b>Hue Range</b> - The hue range that the lights may change to on beat.<br>' +
'<b>Flashing Transitions</b> - Quickly flash the lights on beat<br>' +
'<b>Colorloop</b> - Slowly cycle the lights through all the colors while the music is playing<br>' +
'<b>Ambience</b> - Periodically turn the lights on and off to create a cool looking ambience<br>' +
'<i><b>TIP</b>: Your sensitivity settings are saved per song as indicated by the red star icon in the top left corner. These settings they will be restored if you ever listen to the same song again.</i>',
position: 'top'
},

View file

@ -155,7 +155,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
song = this.get('playQueue')[playQueuePointer];
if(this.get('soundCloudFuckUps') >= this.get('maxSoundCloudFuckUps')) {
this.get('notify').alert({html: this.get('tooManySoundCloudFuckUps'), closeAfter: 10000});
this.get('notify').alert({html: this.get('tooManySoundCloudFuckUps')});
this.send('play');
this.set('soundCloudFuckUps', 0);
} else {
@ -385,6 +385,9 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
thresholdChanged(value) {
this.changePlayerControl('threshold', value, true);
},
hueRangeChanged(value) {
this.changePlayerControl('hueRange', value);
},
micBoostChanged(value) {
this.set('micBoost', value);
this.get('storage').set('huegasm.micBoost', value);
@ -464,7 +467,6 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
changePlayerControl(name, value, saveBeatPrefs){
this.set(name, value);
if(name === 'threshold'){
this.get('kick').set({threshold: value});
}
@ -514,6 +516,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
var activeLights = this.get('activeLights'),
lightsData = this.get('lightsData'),
workedLights = this.get('ambienceWorkedLights'),
hueRange = this.get('hueRange'),
ambienceWorkedLightsHandles = this.get('ambienceWorkedLightsHandles'),
lightOff = (light)=>{
if(this.get('ambienceMode') && this.get('playing')){
@ -546,7 +549,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
}
lights.forEach((light)=>{
var options = {'hue': Math.floor(Math.random()*65535), 'bri': Math.floor(Math.random()*200) + 1, 'transitiontime': transitionTime};
var options = {'hue': Math.floor(Math.random()*(hueRange[1] - hueRange[0] + 1)+hueRange[0]), 'bri': Math.floor(Math.random()*200) + 1, 'transitiontime': transitionTime};
if(lightsData[light].state.on === false){
options.on = true;
@ -737,7 +740,9 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
this.set('lastLightBopIndex', lightBopIndex);
if(!this.get('colorloopMode')) {
color = Math.floor(Math.random() * 65535);
var hueRange = this.get('hueRange');
color = Math.floor(Math.random()*(hueRange[1] - hueRange[0] + 1)+hueRange[0]);
}
if(transitiontime){
@ -791,7 +796,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
this.set('usingMicSupported', false);
}
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode'].forEach((item)=>{
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{
if (!Em.isNone(storage.get('huegasm.' + item))) {
var itemVal = storage.get('huegasm.' + item);
@ -861,7 +866,10 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/ahh-ooh-carefree-with-me');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/odesza/light-feat-little-dragon');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/crywolf-slow-burn');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/clozee-red-forest');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/elo-method-subranger-solace');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/90-pounds-of-pete-waited-too-long-feat-devon-baldwin');
this.send('handleNewSoundCloudURL', 'https://soundcloud.com/mrsuicidesheep/draper-eyes-open');
this.get('storage').set('huegasm.firstVisit', false);

View file

@ -34,6 +34,30 @@ export default Em.Mixin.create({
}
}
},
hueRange: {
range: {min: 0, max: 65535},
step: 1,
defaultValue: 0.3,
pips: {
mode: 'values',
values: [0, 25500, 46920, 65535],
density: 10,
format: {
to: function ( value ) {
if(value === 0 || value === 65535) {
value = 'Red';
} else if(value === 25500 ) {
value = 'Green';
} else {
value = 'Blue';
}
return value;
},
from: function ( value ) { return value; }
}
}
},
micBoost: {
range: {min: 1, max: 11},
step: 0.5,
@ -51,6 +75,7 @@ export default Em.Mixin.create({
},
threshold: 0.3,
hueRange: [0, 65535],
micBoost: 5,
oldThreshold: null,
@ -60,7 +85,7 @@ export default Em.Mixin.create({
timeTotal: 0,
lastLightBopIndex: 0,
usingMicSupported: true,
usingMicSupported: false,
// 0 - local, 1 - mic, possibly more to come
audioMode: 0,
usingLocalAudio: Em.computed.equal('audioMode', 0),

View file

@ -64,13 +64,13 @@
<li><a href="#" {{action "toggleIsShowingAddSoundCloudModal"}}>SoundCloud</a></li>
</ul>
{{#if (and usingLocalAudio playQueueNotEmpty)}}
{{!--{{#if (and usingLocalAudio playQueueNotEmpty)}}
<div id="extraOptionsMenu" class="hidden-xs">
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip" id="shuffleTooltip" data-title={{shuffleTooltipTxt}} {{action "shuffleChanged"}}>{{paper-icon icon="shuffle" class=shuffleClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip" id="repeatTooltip" data-title={{repeatTooltipTxt}} {{action "repeatChanged"}}>{{paper-icon icon=repeatIcon class=repeatClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip" data-title="Clear playlist" {{action "clearPlaylist"}}>{{paper-icon icon="clear-all" class="playerControllIcon"}}</span>
</div>
{{/if}}
{{/if}} --}}
{{/if}}
{{#if usingMicSupported}}
@ -78,9 +78,9 @@
{{/if}}
{{#if usingLocalAudio}}
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip visible-xs-inline" id="shuffleTooltip" data-title={{shuffleTooltipTxt}} {{action "shuffleChanged"}}>{{paper-icon icon="shuffle" class=shuffleClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip visible-xs-inline" id="repeatTooltip" data-title={{repeatTooltipTxt}} {{action "repeatChanged"}}>{{paper-icon icon=repeatIcon class=repeatClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip visible-xs-inline" data-title="Clear playlist" {{action "clearPlaylist"}}>{{paper-icon icon="clear-all" class="playerControllIcon"}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip" id="shuffleTooltip" data-title={{shuffleTooltipTxt}} {{action "shuffleChanged"}}>{{paper-icon icon="shuffle" class=shuffleClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltipe" id="repeatTooltip" data-title={{repeatTooltipTxt}} {{action "repeatChanged"}}>{{paper-icon icon=repeatIcon class=repeatClass}}</span>
<span data-toggle="tooltip" data-placement="bottom auto" class="bootstrapTooltip" data-title="Clear playlist" {{action "clearPlaylist"}}>{{paper-icon icon="clear-all" class="playerControllIcon"}}</span>
{{/if}}
</div>
@ -154,6 +154,11 @@
{{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range slide="thresholdChanged" pips=beatOptions.threshold.pips}}
</div>
<div class="beatOption col-xs-4">
<span data-toggle="tooltip" data-placement="bottom" data-title="The hue range that the lights may change to on beat." class="optionDescription bootstrapTooltip">Hue Range</span>
{{range-slider start=hueRange orientation="vertical" step=beatOptions.hueRange.step range=beatOptions.hueRange.range slide="hueRangeChanged" pips=beatOptions.hueRange.pips}}
</div>
{{#if usingMicAudio}}
<div class="beatOption col-xs-4">
<span data-toggle="tooltip" data-placement="bottom" data-title="The coefficient to boost the microphone signal by" class="optionDescription bootstrapTooltip">Mic Boost</span>
@ -161,7 +166,7 @@
</div>
{{/if}}
<div id="lightOption" class="beatOption {{if usingMicAudio "col-xs-4" "col-sm-4 col-xs-8"}}">
<div id="lightOption" class="beatOption col-xs-4">
<span data-toggle="tooltip" data-placement="bottom auto" data-title="Quickly flash the lights on beat" class="bootstrapTooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{#paper-checkbox checked=flashingTransitions}}Flashing Transitions{{/paper-checkbox}}
</span>
@ -170,33 +175,33 @@
{{#paper-checkbox checked=colorloopMode}}Colorloop{{/paper-checkbox}}
</span>
<span data-toggle="tooltip" data-placement="bottom auto" data-title="Periodically turn the lights on and off to create a cool looking ambience" class="bootstrapTooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{#paper-checkbox checked=ambienceMode}}Ambience{{/paper-checkbox}}
</span>
{{!--<span data-toggle="tooltip" data-placement="bottom auto" data-title="Periodically turn the lights on and off to create a cool looking ambience" class="bootstrapTooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{#paper-checkbox checked=ambienceMode}}Ambience{{/paper-checkbox}}
</span>--}}
</div>
</div>
</div>
<div id="beatContainer" class="col-sm-5 col-xs-12">
<div class="bezel">
<div class="rivet1"></div>
<div class="rivet2"></div>
<div class="rivet3"></div>
<div class="rivet4"></div>
<div class="rivet5"></div>
<div class="rivet6"></div>
<div class="rivet7"></div>
<div class="rivet8"></div>
<div id="beatSpeakerCenterOuter">
<div id="beatSpeakerCenterInner" class="cursorPointer" {{action "clickSpeaker"}}>
</div>
</div>
</div>
</div>
</div>
<div id="beatContainer" class="col-sm-5 col-xs-12">
<div class="bezel">
<div class="rivet1"></div>
<div class="rivet2"></div>
<div class="rivet3"></div>
<div class="rivet4"></div>
<div class="rivet5"></div>
<div class="rivet6"></div>
<div class="rivet7"></div>
<div class="rivet8"></div>
<div id="beatSpeakerCenterOuter">
<div id="beatSpeakerCenterInner" class="cursorPointer" {{action "clickSpeaker"}}>
</div>
</div>
</div>
</div>
</div>
{{ember-notify closeAfter=5000}}
{{ember-notify closeAfter=100000 classPrefix="customNotify"}}
{{add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}}

View file

@ -51,6 +51,13 @@ md-checkbox.md-default-theme.md-checked .md-icon {
background: $secondaryThemeColor;
}
md-checkbox .md-label {
width: 125px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-left {
text-align: left !important;
}
@ -742,9 +749,15 @@ md-switch.md-default-theme.md-checked .md-thumb {
}
}
.ember-notify-cn {
.customNotify {
top: 0;
bottom: auto;
position: absolute;
right: 20px;
max-width: 400px;
.alert-box {
position: relative;
overflow: hidden;
}
}
.songArtist {

View file

@ -5,9 +5,9 @@
"ember": "~2.2.0",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "0.2.1",
"ember-data": "~2.1.0",
"ember-data": "~2.2.1",
"ember-load-initializers": "0.1.7",
"ember-qunit": "0.4.16",
"ember-qunit": "0.4.18",
"ember-qunit-notifications": "0.1.0",
"ember-resolver": "~0.1.20",
"hammerjs": "~2.0.4",

View file

@ -32,14 +32,14 @@
"ember-cli-nouislider": "0.7.0",
"ember-cli-qunit": "^1.0.4",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "5.1.0",
"ember-cli-sass": "5.2.1",
"ember-cli-sri": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-windows-addon": "^1.2.2",
"ember-data": "2.1.0",
"ember-data": "2.2.1",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-modal-dialog": "0.8.2",
"ember-modal-dialog": "0.8.3",
"ember-notify": "^4.0.1",
"ember-paper": "https://github.com/miguelcobain/ember-paper.git",
"ember-truth-helpers": "1.2.0"