Skip to content

Commit

Permalink
--wip--
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfbiter committed Aug 14, 2016
1 parent 33855c3 commit a752567
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 12 additions & 0 deletions app/components/mix-builder/precision-controls/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@ export default Ember.Component.extend({
// optional params
jumpTrackTask: null,
jumpTrack: Ember.K,
quantizeBeat: Ember.K,

track: Ember.computed.reads('clip.track'),

actions: {
analyzeTrack() {
const analyzeTask = this.get('track.analyzeTask');
analyzeTask.perform();
},

setGrid() {
Ember.RSVP.resolve(this.get('clip')).then((clip) => {
const beat = this.get('clip.arrangement.metronome.seekBeat');
const time = clip.getAudioTimeFromArrangementBeat(beat);

clip.setProperties({
audioStartTime: time,
});
});
}
}
});
Expand Down
7 changes: 4 additions & 3 deletions app/templates/components/mix-builder/precision-controls.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
clip=selectedTransition.fromTrackClip
jumpTrackTask=jumpTrackTask

quantizeBeat=(action quantizeBeat)
jumpTrack=(action jumpTrack selectedTransition.fromTrackClip.mixItem)
}}
</div>

<div class="six wide column">
{{mix-builder/precision-controls/transition
clip=selectedTransition.transitionClip
showAutomation=attrs.showAutomation
showAutomation=showAutomation

quantizeBeat=(action attrs.quantizeBeat)
toggleShowAutomation=(action attrs.toggleShowAutomation)
quantizeBeat=(action quantizeBeat)
toggleShowAutomation=(action toggleShowAutomation)
}}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
Analyze Track
</div>

<div class="inverted basic tiny ui button"
{{!-- <div class="inverted basic tiny ui button"
{{action "resetDownbeat"}}>
Reset Downbeat
</div>

--}}
<div class="inverted basic tiny ui button"
{{action "setDownbeat"}}>
Set Downbeat
{{action "setGrid"}}>
Set Grid
</div>

{{!-- <div>
Expand Down

0 comments on commit a752567

Please sign in to comment.