mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-11-26 12:51:30 -08:00
2 lines
53 KiB
JavaScript
2 lines
53 KiB
JavaScript
|
(this["webpackJsonpdrum-machine-react"]=this["webpackJsonpdrum-machine-react"]||[]).push([[0],{12:function(e,a,t){},22:function(e,a,t){e.exports=t(40)},31:function(e,a,t){},32:function(e,a,t){},33:function(e,a,t){},34:function(e,a,t){},38:function(e,a,t){},39:function(e,a,t){},40:function(e,a,t){"use strict";t.r(a);var C=t(0),r=t.n(C),o=t(14),n=t.n(o),d=t(5),i=t(10),l=["Q","W","E","A","S","D","Z","X","C"],h=function(){l.forEach((function(e){sessionStorage.hasOwnProperty(e+"volume")||sessionStorage.setItem(e+"volume","+0")}))},s=function(){l.forEach((function(e){sessionStorage.hasOwnProperty(e+"isMetronome")||sessionStorage.setItem(e+"isMetronome",!1)}))},v=function(){l.forEach((function(e){sessionStorage.hasOwnProperty(e+"metronomeTempo")||sessionStorage.setItem(e+"metronomeTempo",652)}))},c=function(){sessionStorage.hasOwnProperty(l[0])||sessionStorage.setItem(l[0],"Assorted-Hits/Cymbals/CYCdh_Crash-01.wav"),sessionStorage.hasOwnProperty(l[1])||sessionStorage.setItem(l[1],"Assorted-Hits/Cymbals/CYCdh_MultiCrash-01.wav"),sessionStorage.hasOwnProperty(l[2])||sessionStorage.setItem(l[2],"Assorted-Hits/Cymbals/CYCdh_MultiCrashHi-01.wav"),sessionStorage.hasOwnProperty(l[3])||sessionStorage.setItem(l[3],"Assorted-Hits/Cymbals/CYCdh_MultiCrashLo-01.wav"),sessionStorage.hasOwnProperty(l[4])||sessionStorage.setItem(l[4],"Assorted-Hits/Snares/Ludwig-A/CYCdh_LudFlamA-05.wav"),sessionStorage.hasOwnProperty(l[5])||sessionStorage.setItem(l[5],"Assorted-Hits/Snares/Ludwig-A/CYCdh_LudRimA-07.wav"),sessionStorage.hasOwnProperty(l[6])||sessionStorage.setItem(l[6],"Assorted-Hits/Kicks/Loose-Kick/CYCdh_LooseKick-08.wav"),sessionStorage.hasOwnProperty(l[7])||sessionStorage.setItem(l[7],"Assorted-Hits/Snares/Ludwig-A/CYCdh_LudSnrA-05.wav"),sessionStorage.hasOwnProperty(l[8])||sessionStorage.setItem(l[8],"Assorted-Hits/Snares/Ludwig-A/CYCdh_LudSnrOffA-08.wav")},m=function(){var e={};return l.forEach((function(a){e[a]=sessionStorage.getItem(a)})),e},u=function(e){return{type:"CHANGEVOLUME",volume:e}},_=30;sessionStorage.hasOwnProperty("volume")?_=sessionStorage.getItem("volume"):sessionStorage.setItem("volume","30");var w=function(e){return{type:"DRUMPADGRID",drumPadGrid:e}},Y=function(e){return{type:"SELECTIONMENU",selectionMenu:e}},K=function(e,a){return{type:"TOGGLEMETRONOME",key:e,metronomeIsPlaying:a}},p=function(e,a){return{type:"RESTARTMETRONOME",key:e,restartMetronome:a}},S=Object(i.b)({samplesUrls:function(e,a){switch(e||(c(),e=m()),a.type){case"SETSAMPLE":return e[a.key]=a.sample,e;default:return e=m()}},volumeOffSets:function(e,a){return e||(h(),e=function(){var e={};return l.forEach((function(a){e[a+"volume"]=sessionStorage.getItem(a+"volume")})),e}()),a.type,e},volume:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"CHANGEVOLUME":return a.volume;default:return e}},drumPadGrid:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"drumPadGrid",a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"DRUMPADGRID":return a.drumPadGrid;default:return e}},selectionMenu:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pads",a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"SELECTIONMENU":return a.selectionMenu;default:return e}},metronomeStatuses:function(e,a){return s(),a.type,function(){var e={};return l.forEach((function(a){e[a+"isMetronome"]=sessionStorage.getItem(a+"isMetronome")})),e}()},metronomeTempos:function(e,a){switch(e||(v(),e=function(){var e={};return l.forEach((function(a){e[a+"metronomeTempo"]=parseInt(sessionStorage.getItem(a+"metronomeTempo"))})),e}()),a.type){case"SETMETRONOMETEMPO":return e[a.key+"metronomeTempo"]=a.tempo,e;default:return e}},metronomePlayingStates:function(e,a){switch(e||(e=function(){var e={};return l.forEach((function(a){e[a+"metronomeIsPlaying"]=!1})),e}()),a.type){case"TOGGLEMETRONOME":return e[a.key+"metronomeIsPlaying"]=a.metronomeIsPlaying,e;default:return e}},shouldMetronomeRestart:function(e,a){switch(e||(e=function(){var e={};return l.forEach((fun
|
||
|
//# sourceMappingURL=main.918fd14d.chunk.js.map
|