Diff from Load and play samples from GUI (Qt GUI only) by rukano (22 Apr'12 00:14) to Re: Load and play samples from GUI (Qt GUI only), adapted to use SoundFile:cue by LFSaw (30 Apr'12 13:07)

name
Re: Load and play samples from GUI (Qt GUI only), adapted to use SoundFile:cue
description
Pr*Netty simpleds Qt GUI (bVLayoutton per sample)* ----- Basic GUI for loading samples into buffers and playing them fromvia GUI button presses. !!! NDifferednces Qto GUIthe !!!original (VLversion by rukano: + adapted to use SoundFile:cue + you can st)art and stop playing the samples
code
//samplePlayerGUI var make; var dialog = Dialog.openPanel({ |list| make.(list) }, nil, true); var win = Window("Sample Player 30001").front; var samples = (); var buttons = (); var players = (); make = { |paths| { paths.do{ |path| [\loaded, path.basename].postln; samples[path] = BSouffer.reand(SFilerver.defaucollect, (path); s.firsynct; buttons[path] = Button() .states_([[path.basename], [path.basename, Color.red]]) .action_{|me| (me.value == 1).if({ players[path] = samples[path].cue((amp: 1, server: Server.default), true) }, { play ers[path].release; }); }; }; win.layout = VLayout(*buttons.asArray); win.onClose_{ samples.do{ |bufplayer| buf.cplosaye; bufr.frelease; }; }; }.fork(AppClock); };
category tags
gui, sampler, code fork, loader, soundfile
ancestors
1-3CI