Skip to content

Instantly share code, notes, and snippets.

@dndrks
Created August 21, 2022 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dndrks/f1404823cab3e5ea8a439f34cad72773 to your computer and use it in GitHub Desktop.
Save dndrks/f1404823cab3e5ea8a439f34cad72773 to your computer and use it in GitHub Desktop.
(3a) loading the provided drum files into softcut
-- nc03 snippet: loading the provided drum files into softcut
sc_fn = include 'lib/sc_helpers'
sc_prm = include 'lib/sc_params' -- param-based controls over softcut
function init()
-- always keep this in the init, just in case the files haven't been migrated:
sc_fn.move_samples_into_audio()
sc_prm.init() -- build the PARAMETERS UI entries for all 6 softcut voices
params:set('voice 1 sample', _path.audio..'nc03-ds/01-bd/01-bd_fm-lite.flac')
params:set('voice 2 sample', _path.audio..'nc03-ds/01-bd/01-bd_mods-2.flac')
params:set('voice 3 sample', _path.audio..'nc03-ds/06-cb/06-cb_verb-long.flac')
params:set('voice 4 sample', _path.audio..'nc03-ds/07-hh/07-hh_verb-long.flac')
params:set('voice 5 sample', _path.audio..'nc03-ds/07-hh/07-hh_verb-short.flac')
params:set('voice 6 sample', _path.audio..'nc03-ds/02-sd/02-sd_default-1.flac')
-- just a random jumble:
clock.run(
function()
while true do
clock.sync(1/4)
if math.random() > 0.5 then
sc_fn.play_slice(math.random(6),1)
end
end
end
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment