X-Git-Url: https://git.0d.be/?p=nanofun.git;a=blobdiff_plain;f=nanofun.js;fp=nanofun.js;h=b6758b8fff685667565f85f48c53ddf2726fedfd;hp=b8dcaf96721bd3ad094f32bd6cd8a26b54cce0f5;hb=791c8577d2d48f35095434eac34a9cde4a9a409c;hpb=dd3d52c1f6e690673ed0f3668647cdc9163f5d6c diff --git a/nanofun.js b/nanofun.js index b8dcaf9..b6758b8 100644 --- a/nanofun.js +++ b/nanofun.js @@ -397,6 +397,13 @@ var nanofun = function() { $('[data-touch=' + control + '] .touch-gain').val(value).trigger('change'); } + $('.loop input').on('change', function() { + var sample_idx = parseInt($(this).parents('[data-touch]').data('touch')); + if (self.samples[sample_idx]) { + self.samples[sample_idx].loop = $(this).is(':checked'); + } + }); + $(document).keypress(function(ev) { var sample_idx = KEYBOARD_CODES.indexOf(ev.key); if (sample_idx != -1) {