1+ // eslint-disable-next-line no-var
12var NumarkPartyMix = { } ;
23
34// The jogwheel is behaving inconsistently
@@ -51,7 +52,7 @@ NumarkPartyMix.init = function(_id, _debugging) {
5152 engine . setValue ( "[App]" , "num_samplers" , 8 ) ;
5253 }
5354 NumarkPartyMix . deck = new components . ComponentContainer ( ) ;
54- for ( var i = 0 ; i < 2 ; i ++ ) {
55+ for ( let i = 0 ; i < 2 ; i ++ ) {
5556 NumarkPartyMix . deck [ i ] = new NumarkPartyMix . Deck ( i + 1 ) ;
5657 }
5758
@@ -69,8 +70,8 @@ NumarkPartyMix.shutdown = function() {
6970NumarkPartyMix . Deck = function ( deckNumber ) {
7071 components . Deck . call ( this , deckNumber ) ;
7172
72- var channel = deckNumber - 1 ;
73- var deck = this ;
73+ const channel = deckNumber - 1 ;
74+ const deck = this ;
7475 this . scratchModeEnabled = false ;
7576
7677 this . playButton = new components . PlayButton ( {
@@ -89,7 +90,7 @@ NumarkPartyMix.Deck = function(deckNumber) {
8990 midi : [ 0x90 + channel , 0x1B ] ,
9091 key : "pfl" ,
9192 output : function ( value ) {
92- var note = ( value === 0x00 ? 0x80 : 0x90 ) + channel ;
93+ const note = ( value === 0x00 ? 0x80 : 0x90 ) + channel ;
9394 midi . sendShortMsg ( note , 0x1B , this . outValueScale ( value ) ) ;
9495 }
9596 } ) ;
@@ -108,12 +109,12 @@ NumarkPartyMix.Deck = function(deckNumber) {
108109 } ) ;
109110
110111 this . treble = new components . Pot ( {
111- group : " [EqualizerRack1_" + this . currentDeck + " _Effect1]" ,
112+ group : ` [EqualizerRack1_${ this . currentDeck } _Effect1]` ,
112113 inKey : "parameter3"
113114 } ) ;
114115
115116 this . bass = new components . Pot ( {
116- group : " [EqualizerRack1_" + this . currentDeck + " _Effect1]" ,
117+ group : ` [EqualizerRack1_${ this . currentDeck } _Effect1]` ,
117118 inKey : "parameter1"
118119 } ) ;
119120
@@ -181,7 +182,7 @@ NumarkPartyMix.Deck = function(deckNumber) {
181182 } ) ;
182183} ;
183184
184- NumarkPartyMix . Deck . prototype = new components . Deck ( ) ;
185+ NumarkPartyMix . Deck . prototype = Object . create ( components . Deck . prototype ) ;
185186
186187NumarkPartyMix . PadSection = function ( deckNumber ) {
187188 components . ComponentContainer . call ( this ) ;
@@ -200,12 +201,12 @@ NumarkPartyMix.PadSection = function(deckNumber) {
200201 } ;
201202
202203 this . padPress = function ( channel , control , value , status , group ) {
203- var i = ( control - 0x14 ) % 8 ;
204+ const i = ( control - 0x14 ) % 8 ;
204205 this . currentMode . connections [ i ] . input ( channel , control , value , status , group ) ;
205206 } ;
206207
207208 this . setMode = function ( control ) {
208- var newMode = this . modes [ control ] ;
209+ const newMode = this . modes [ control ] ;
209210 this . currentMode . forEachComponent ( function ( component ) {
210211 component . disconnect ( ) ;
211212 } ) ;
@@ -229,9 +230,9 @@ NumarkPartyMix.ModeHotcue = function(deckNumber) {
229230 this . control = NumarkPartyMix . PadModeControls . HOTCUE ;
230231
231232 this . connections = new components . ComponentContainer ( ) ;
232- for ( var i = 0 ; i < 4 ; i ++ ) {
233+ for ( let i = 0 ; i < 4 ; i ++ ) {
233234 this . connections [ i ] = new components . HotcueButton ( {
234- group : " [Channel" + deckNumber + "]" ,
235+ group : ` [Channel${ deckNumber } ]` ,
235236 midi : [ 0x93 + deckNumber , 0x14 + i ] ,
236237 number : i + 1 ,
237238 outConnect : false
@@ -246,13 +247,13 @@ NumarkPartyMix.ModeLoop = function(deckNumber) {
246247 this . control = NumarkPartyMix . PadModeControls . AUTOLOOP ;
247248
248249 this . connections = new components . ComponentContainer ( ) ;
249- for ( var i = 0 ; i < 4 ; i ++ ) {
250+ for ( let i = 0 ; i < 4 ; i ++ ) {
250251 this . connections [ i ] = new components . Button ( {
251- group : " [Channel" + deckNumber + "]" ,
252+ group : ` [Channel${ deckNumber } ]` ,
252253 midi : [ 0x93 + deckNumber , 0x14 + i ] ,
253254 size : NumarkPartyMix . autoLoopSizes [ i ] ,
254- inKey : " beatloop_" + NumarkPartyMix . autoLoopSizes [ i ] + " _toggle" ,
255- outKey : " beatloop_" + NumarkPartyMix . autoLoopSizes [ i ] + " _enabled" ,
255+ inKey : ` beatloop_${ NumarkPartyMix . autoLoopSizes [ i ] } _toggle` ,
256+ outKey : ` beatloop_${ NumarkPartyMix . autoLoopSizes [ i ] } _enabled` ,
256257 outConnect : false
257258 } ) ;
258259 }
@@ -267,9 +268,9 @@ NumarkPartyMix.ModeLoop.prototype = Object.create(components.ComponentContainer.
267268NumarkPartyMix . ModeSampler = function ( deckNumber ) {
268269 components . ComponentContainer . call ( this ) ;
269270 this . control = NumarkPartyMix . PadModeControls . SAMPLER ;
270- var sampleoffset = ( deckNumber - 1 ) * 4 ;
271+ const sampleoffset = ( deckNumber - 1 ) * 4 ;
271272 this . connections = new components . ComponentContainer ( ) ;
272- for ( var i = 0 ; i < 4 ; i ++ ) {
273+ for ( let i = 0 ; i < 4 ; i ++ ) {
273274 this . connections [ i ] = new components . SamplerButton ( {
274275 midi : [ 0x93 + deckNumber , 0x14 + i ] ,
275276 number : 1 + i + sampleoffset ,
@@ -299,14 +300,14 @@ NumarkPartyMix.ModeEFX = function(deckNumber) {
299300
300301 this . control = NumarkPartyMix . PadModeControls . EFX ;
301302
302- var fx = [
303- " [EffectRack1_EffectUnit" + deckNumber + " _Effect1]" ,
304- " [EffectRack1_EffectUnit" + deckNumber + " _Effect2]" ,
305- " [EffectRack1_EffectUnit" + deckNumber + " _Effect3]"
303+ const fx = [
304+ ` [EffectRack1_EffectUnit${ deckNumber } _Effect1]` ,
305+ ` [EffectRack1_EffectUnit${ deckNumber } _Effect2]` ,
306+ ` [EffectRack1_EffectUnit${ deckNumber } _Effect3]`
306307 ] ;
307308
308309 this . connections = new components . ComponentContainer ( ) ;
309- var p = this . connections ;
310+ const p = this . connections ;
310311
311312 fx . forEach ( function ( fx , i ) {
312313 p [ i ] = new components . Button ( {
@@ -318,7 +319,7 @@ NumarkPartyMix.ModeEFX = function(deckNumber) {
318319 } ) ;
319320 p [ 3 ] = new components . Button ( {
320321 midi : [ 0x93 + deckNumber , 0x17 ] ,
321- group : " [EffectRack1_EffectUnit" + deckNumber + "]" ,
322+ group : ` [EffectRack1_EffectUnit${ deckNumber } ]` ,
322323 key : "mix_mode" ,
323324 type : components . Button . prototype . types . toggle ,
324325 outValueScale : function ( val ) {
@@ -332,12 +333,12 @@ NumarkPartyMix.ModeEFX.prototype = Object.create(components.ComponentContainer.p
332333NumarkPartyMix . Browse = function ( ) {
333334 components . ComponentContainer . call ( this ) ;
334335
335- var browse = this ;
336+ const browse = this ;
336337 this . knobpressed = false ;
337338
338339 this . knob = new components . Encoder ( {
339340 input : function ( channel , control , value ) {
340- var direction ;
341+ let direction ;
341342 if ( browse . knobpressed ) {
342343 if ( value > 0x40 ) {
343344 engine . setParameter ( "[Library]" , "MoveFocusForward" , 1 ) ;
0 commit comments