{
   "author" : "Dindoléon",
   "name" : "Dirty Sound Maker",
   "ancestor_list" : [],
   "description" : "Simple GUI to produce dirty ambient drones, based on the 'Mini' concept ( see https://sccode.org/1-5aY ). Really simple to use. Displayed words aren't even existing. Who reads the doc anyway ? Have fun making noise.",
   "labels" : [
      "ambient",
      "drone",
      "gui",
      "software"
   ],
   "code" : "(\r\n\r\nvar win = Window.new( \"MiniXul - Dirty Sound Maker\", Rect( 0, 0, 1200, 800 ) );\r\n\r\nvar draw_h_slider;\r\n\r\nvar margin = 10;\r\n\r\nvar lfo_value = 0;\r\nvar lfo_rate_value = 1.explin( 0.03125, 32, 0, 1 );\r\nvar reverb_value = 0;\r\nvar amp_value = 0.5;\r\nvar fold_value = 0;\r\nvar value = 110.linlin( 55, 220, 0, 1 );\r\n\r\nvar harmo_spectrum;\r\nvar harmo_numharm = 32;\r\nvar ampBus = Bus.control(s);\r\nvar sndBus = Bus. audio(s, 2);\r\nvar harmo_view;\r\nvar harmo_text;\r\n\r\nvar amp_slider = UserView( win, Rect( margin, win.bounds.height * 0.78 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\nvar lfo_amount_slider = UserView( win, Rect( margin * 2 + ( win.bounds.width - (margin*4) / 3 ), win.bounds.height * 0.78 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\nvar lfo_rate_slider = UserView( win, Rect( margin * 3 + ( win.bounds.width - (margin*4) / 3 * 2 ), win.bounds.height * 0.78 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\nvar reverb_slider = UserView( win, Rect( margin, win.bounds.height * 0.88 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\nvar tune_slider = UserView( win, Rect( margin * 2 + ( win.bounds.width - (margin*4) / 3 ), win.bounds.height * 0.88 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\nvar fold_slider = UserView( win, Rect( margin * 3 + ( win.bounds.width - (margin*4) / 3 * 2 ), win.bounds.height * 0.88 + ( margin / 2 ), win.bounds.width - (margin*4) / 3, win.bounds.height * 0.1 - margin ) );\r\n\r\n// SynthDefs\r\nvar luce_synth = SynthDef(\\luce, { | out = 0, freq = 110, amp = 0, mini_param = 24 |\r\n\tvar snd = Resonz.ar( Saw.ar(freq*2), mini_param, 0.2 );\r\n\tOut.ar(out, Pan2.ar(snd, 0, amp));});\r\n\r\nvar bougie_synth = SynthDef(\\bougie, { | out = 0, freq = 110, amp = 0, mini_param = 440 |\r\n\tvar snd = Blip.ar(freq!2, mini_param, 0.5) * amp;\r\n\tOut.ar( out, snd );});\r\n\r\nvar invasion_synth = SynthDef(\\invasion, { | out = 0, freq = 110, amp = 0, mini_param = 100 |\r\n\tvar snd = RLPF.ar( Pulse.ar( [freq,freq*2], 0.5, amp * 0.5 ), mini_param, 0.05, amp * 0.5 );\r\n\tOut.ar( out, snd );});\r\n\r\nvar windy_synth = SynthDef(\\windy, { | out = 0, freq = 110, amp = 0, mini_param = 24 |\r\n\tvar snd = BPF.ar(WhiteNoise.ar, freq*mini_param, 0.4, 0.4);\r\n\tOut.ar(out, Pan2.ar(snd, 0, amp));});\r\n\r\nvar pulser_synth = SynthDef(\\pulser, { | out = 0, freq = 110, amp = 0, mini_param = 40 |\r\n\tvar snd = RLPF.ar( Saw.ar(freq), mini_param, 0.5, 0.2);\r\n\tOut.ar(out, Pan2.ar(snd, 0, amp));});\r\n\r\nvar poussiere_synth = SynthDef(\\poussiere, { | out = 0, freq = 110, amp = 0, mini_param = 0.5 |\r\n\tvar snd = Dust2.ar(mini_param, 1);\r\n\tOut.ar(out, Pan2.ar( snd, 0, amp ) );});\r\n\r\nvar lowvibe_synth = SynthDef(\\lowvibe, { | out = 0, freq = 110, amp = 0, mini_param = 24 |\r\n\tvar snd = SinOsc.ar(freq, 0, mini_param).fold2(1) * 0.2;\r\n\tOut.ar( out, Pan2.ar( snd, 0, amp * 0.75 ) );});\r\n\r\nvar lizard_synth = SynthDef(\\lizard, { | out = 0, freq = 110, amp = 0, mini_param = 100 |\r\n\tvar snd = SyncSaw.ar(freq, mini_param, 0.2);\r\n\tOut.ar( out, Pan2.ar( snd, 0, amp * 0.5 ) );});\r\n\r\nvar master_synth;\r\n~minis = Group();\r\n\r\nampBus.value = 0.1;\r\n\r\n{\r\n\tSynthDef(\"additive-multislider\", {\r\n\t\targ outbus, freq = 110, amp = 0.01, freq_mul = 1;\r\n\t\tvar snd = SinOsc.ar(freq * freq_mul, 0, Lag.kr(amp, 3));\r\n\t\tOut.ar(outbus, snd!2);\r\n\t}).add;\r\n\r\n\tSynthDef(\"continuousOut\", {\r\n\t\targ inbus, amp = 0.1, gate = 1, att = 0.1, sus = 1, rel = 1;\r\n\t\tvar env = EnvGen.kr(Env.asr(att, sus, rel), gate);\r\n\t\tOut.ar(~master_in, In.ar(inbus, 2) * amp * env * 0.4);\r\n\t}).add;\r\n\r\n\t// Wait for SynthDefs to be added...\r\n\ts.sync;\r\n\r\n\t// Now call the Synths:\r\n\tharmo_spectrum = Array.fill(harmo_numharm, {arg i; Synth(\"additive-multislider\", [\\freq, 110, \\freq_mul, (i+1), \\amp, 0.0, \\outbus, sndBus], ~minis)});\r\n\r\n\tSynth(\"continuousOut\", [\\inbus, sndBus, \\amp, ampBus.asMap], ~minis, \\addAfter);\r\n\r\n}.fork;\r\n\r\nharmo_view = MultiSliderView.new( win, Rect(0, 0, win.bounds.width / 3, win.bounds.height * 0.25 ) );\r\nharmo_view.value = Array.fill(harmo_numharm, {0.0});\r\nharmo_view.isFilled = true;\r\nharmo_view.indexThumbSize = harmo_view.bounds.width / (harmo_numharm);\r\nharmo_view.fillColor = Color.blue;\r\nharmo_view.strokeColor = Color.blue;\r\nharmo_view.gap = 0;\r\nharmo_view.drawRects = false; // Display as bar charts\r\nharmo_view.drawLines = true; // Display as plot\r\n\r\nharmo_text = StaticText.new( win, Rect( 0, 0, win.bounds.width / 3, win.bounds.height *0.05 ) );\r\nharmo_text.align = \\center;\r\nharmo_text.string = \"Harmo\";\r\nharmo_text.acceptsMouse = false;\r\n\r\nharmo_view.action = {arg multi;\r\n\tvar index = multi.index;\r\n\tvar value = multi.currentvalue;\r\n\tif( value < 0.025, { value = 0 } );\r\n\tharmo_spectrum[index].set(\\amp, value*2); };\r\n\r\nwin.background = Color.new(0.2, 0.1, 0.1);\r\n\r\ntune_slider.drawFunc =  { draw_h_slider.value( tune_slider, value, Color.red, \"Gravaigu\" ) };\r\ntune_slider.refresh;\r\n\r\ntune_slider.mouseDownAction = { | slider, x |\r\n\tvalue = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\t~minis.set( \\freq, value.linexp( 0, 1, 55, 440 ) );\r\n\ttune_slider.refresh\r\n};\r\ntune_slider.mouseMoveAction = tune_slider.mouseDownAction;\r\n\r\nlfo_rate_slider.drawFunc =  { draw_h_slider.value( lfo_rate_slider, lfo_rate_value, Color.blue, \"Vitesse de vibrance\" ) };\r\nlfo_rate_slider.refresh;\r\nlfo_rate_slider.mouseDownAction = { | slider, x |\r\n\tlfo_rate_value = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\tmaster_synth.set( \\lfo_rate, lfo_rate_value.linexp( 0, 1, 0.03125, 32 ) );\r\n\tlfo_rate_slider.refresh\r\n};\r\nlfo_rate_slider.mouseMoveAction = lfo_rate_slider.mouseDownAction;\r\n\r\nlfo_amount_slider.drawFunc =  { draw_h_slider.value( lfo_amount_slider, lfo_value, Color.new( 0, 0.8, 0.2 ), \"Taux de vibrance\" ) };\r\nlfo_amount_slider.refresh;\r\nlfo_amount_slider.mouseDownAction = { | slider, x |\r\n\tlfo_value = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\tmaster_synth.set( \\lfo_amount, lfo_value );\r\n\tlfo_amount_slider.refresh\r\n};\r\nlfo_amount_slider.mouseMoveAction = lfo_amount_slider.mouseDownAction;\r\n\r\nreverb_slider.drawFunc =  { draw_h_slider.value( reverb_slider, reverb_value, Color.new( 1, 0, 1 ), \"Cathédralitude\" ) };\r\nreverb_slider.refresh;\r\nreverb_slider.mouseDownAction = { | slider, x |\r\n\treverb_value = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\tmaster_synth.set( \\reverb_amount, reverb_value );\r\n\treverb_slider.refresh\r\n};\r\nreverb_slider.mouseMoveAction = reverb_slider.mouseDownAction;\r\n\r\namp_slider.drawFunc =  { draw_h_slider.value( amp_slider, amp_value, Color.new( 0, 1, 1 ), \"Niveau de respect des voisins\" ) };\r\namp_slider.refresh;\r\namp_slider.mouseDownAction = { | slider, x |\r\n\tamp_value = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\tmaster_synth.set( \\amp, amp_value );\r\n\tamp_slider.refresh\r\n};\r\namp_slider.mouseMoveAction = amp_slider.mouseDownAction;\r\n\r\nfold_slider.drawFunc =  { draw_h_slider.value( fold_slider, fold_value, Color.new( 1, 1, 0 ), \"Rauquèneraullance\" ) };\r\nfold_slider.refresh;\r\nfold_slider.mouseDownAction = { | slider, x |\r\n\tfold_value = (x).linlin( 0, slider.bounds.width, 0, 1 );\r\n\tmaster_synth.set( \\dist_amount, fold_value );\r\n\tfold_slider.refresh\r\n};\r\nfold_slider.mouseMoveAction = fold_slider.mouseDownAction;\r\n\r\n~add_mini = { | view, rect, synthdef, out_channel, group, param_range, name, graphic_numbers, graphic_colors |\r\n\r\n\tvar value = [ 0, 1 ];\r\n\r\n\tvar synth;\r\n\r\n\t// Graphical number values\r\n\tvar knob_size = graphic_numbers[0];\r\n\tvar knob_outline_size = graphic_numbers[1];\r\n\tvar stroke_size = graphic_numbers[2];\r\n\tvar margin = graphic_numbers[3];\r\n\r\n\t// Colors\r\n\tvar frame_color = graphic_colors[0];\r\n\tvar frame_border_color = graphic_colors[1];\r\n\tvar gradient_color = graphic_colors[2];\r\n\tvar diamond_color = graphic_colors[3];\r\n\tvar diamond_outline_color = graphic_colors[4];\r\n\r\n\tvar mini_view = UserView.new( view, rect );\r\n\r\n\tvar input_view = UserView.new( mini_view );\r\n\tif( name != \"\", {\r\n\t\tvar text_name = StaticText.new( mini_view, Rect( 0, 0, mini_view.bounds.width, mini_view.bounds.height * 0.15 ) );\r\n\t\ttext_name.string = name;\r\n\t\ttext_name.align = \\center;\r\n\t\tif( frame_color == Color.black, { text_name.stringColor = Color.white } );\r\n\t\tinput_view.bounds = Rect( margin, mini_view.bounds.height * 0.15 + margin, mini_view.bounds.width - ( margin * 2 ), mini_view.bounds.height * 0.85 - ( margin * 2 ) );\r\n\t}, {\r\n\t\tinput_view.bounds = Rect( margin, margin, mini_view.bounds.width - ( margin * 2 ), mini_view.bounds.height - ( margin * 2 ) );\r\n\t});\r\n\r\n\tmini_view.background = frame_color;\r\n\tmini_view.resize = 5;\r\n\r\n\tinput_view.background_( frame_color );\r\n\tsynth = synthdef.play(  target: group, args: [\\out, out_channel]  );\r\n\r\n\t// Here is the function used to draw the custom input_view:\r\n\tinput_view.drawFunc = {\r\n\r\n\t\tPen.width = stroke_size;\r\n\r\n\t\t// First, draw the background frame:\r\n\t\tPen.addRect( Rect(0,0, input_view.bounds.width,input_view.bounds.height) );\r\n\t\tPen.fillAxialGradient( 0@0, input_view.bounds.width@input_view.bounds.height, Color.black, gradient_color );\r\n\r\n\t\t// Draw the diamond itself:\r\n\t\tPen.moveTo( ( input_view.bounds.width * value[0] - knob_size ) @ ( input_view.bounds.height * value[1] ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @ ( input_view.bounds.height * value[1] - knob_size ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] + knob_size ) @ (( input_view.bounds.height * value[1] ) ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @ ( input_view.bounds.height * value[1] + knob_size ) );\r\n\t\t// Fourth line isn't needed as we fill the shape.\r\n\r\n\t\tPen.fillColor_( diamond_color );\r\n\t\tPen.fill;\r\n\r\n\t\t// Draw the diamond outline:\r\n\t\tPen.moveTo( 0 @ ( input_view.bounds.height * value[1] ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] - knob_outline_size ) @ ( input_view.bounds.height * value[1] ) );\r\n\r\n\t\tPen.moveTo( ( input_view.bounds.width * value[0] ) @ 0 );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @ ( input_view.bounds.height * value[1] - knob_outline_size ) );\r\n\r\n\t\tPen.moveTo( ( input_view.bounds.width * value[0] + knob_outline_size ) @ (( input_view.bounds.height * value[1] ) ) );\r\n\t\tPen.lineTo( input_view.bounds.width @ (( input_view.bounds.height * value[1] ) ) );\r\n\t\tPen.moveTo( ( input_view.bounds.width * value[0] ) @ (( input_view.bounds.height * value[1] + knob_outline_size ) ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @  input_view.bounds.height );\r\n\r\n\t\tPen.moveTo( ( input_view.bounds.width * value[0] - knob_outline_size ) @ ( input_view.bounds.height * value[1] ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @ ( input_view.bounds.height * value[1] - knob_outline_size ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] + knob_outline_size ) @ (( input_view.bounds.height * value[1] ) ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] ) @ (( input_view.bounds.height * value[1] + knob_outline_size ) ) );\r\n\t\tPen.lineTo( ( input_view.bounds.width * value[0] - knob_outline_size ) @ ( input_view.bounds.height * value[1] ) );\r\n\r\n\t\tPen.strokeColor_( diamond_outline_color );\r\n\t\tPen.stroke;\r\n\r\n\t\t// Draw the frame border:\r\n\t\tPen.addRect( Rect(0,0, input_view.bounds.width,input_view.bounds.height) );\r\n\t\tPen.strokeColor_( frame_border_color );\r\n\t\tPen.stroke;\r\n\t};\r\n\r\n\t// Set the default action\r\n\tinput_view.action = {\r\n\t\tsynth.set( \\amp, 1 - value[1] ); // Requires to invert the value, as the Y axis from GUI goes from top to bottom, and input_views usually goes from bottom to top.\r\n\t\tsynth.set(\\mini_param, linexp(value[0], 0, 1, param_range[0], param_range[1])); // Exponential mapping between the 0 -> 1 value and the amount range. Change this settings according to your needs.\r\n\t\tinput_view.refresh // Call the drawFunc of the input_view to update graphics\r\n\t};\r\n\r\n\t// Define mouse actions\r\n\tinput_view.mouseDownAction = { arg input_view, x = 0.5, y = 0.5, m;\r\n\t\t([256, 0].includes(m)).if{ // restrict to no modifier\r\n\t\t\tvalue[0] = (x).linlin(0,input_view.bounds.width,0,1); // Linear mapping between the input_view size and 0 -> 1\r\n\t\t\tvalue[1] = (y).linlin(0,input_view.bounds.height,0,1);\r\n\t\t\tinput_view.doAction };\r\n\t};\r\n\r\n\tinput_view.mouseMoveAction = input_view.mouseDownAction; // Map the mouse action to its function\r\n\tmini_view;\r\n};\r\n\r\nif ( ~master_in == nil, { ~master_in = Bus.audio( s, 2 ); } );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3, 0, win.bounds.width / 3, win.bounds.height * 0.25 ), windy_synth, ~master_in, ~minis, [ 1, 128 ], \"Windy\", [8,15,2,3], [Color.new(0.8, 0.4, 0),Color.yellow,Color.new(0.95,0.8,0),Color.new( 0.6, 0.3, 0 ),Color.new(0.8, 0.4, 0)] );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3 * 2, 0, win.bounds.width / 3, win.bounds.height * 0.25 ), poussiere_synth, ~master_in, ~minis, [ 0.5, 10000 ], \"Poussière\", [8,15,2,3], [Color.black,Color.white,Color.white,Color.black,Color.grey] );\r\n\r\n~add_mini.value( win, Rect( 0, win.bounds.height * 0.25, win.bounds.width / 3, win.bounds.height * 0.25 ), luce_synth, ~master_in, ~minis, [ 24, 16000 ], \"Luce\", [8,15,2,3], [Color.new( 0.7, 0.4, 0 ),Color.new( 1, 0.4, 0 ),Color.new( 0.9, 0.5, 0.3 ),Color.new( 1, 0.75, 0.25 ),Color.new( 0.8, 0.55, 0.05 )] );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3, win.bounds.height * 0.25, win.bounds.width / 3, win.bounds.height * 0.25 ), bougie_synth, ~master_in, ~minis, [ 1, 128 ], \"Bougie\", [8,15,2,3], [Color.new(0,0,0),Color.new(1,1,0),Color.new(1,0,0),Color.new( 1, 0, 0.1),Color.new(1,0,0.2)] );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3 * 2, win.bounds.height * 0.25, win.bounds.width / 3, win.bounds.height * 0.25 ), invasion_synth, ~master_in, ~minis, [ 130, 16000 ], \"Invasion\", [8,15,2,3], [Color.new(1, 0.5, 0.75),Color.white,Color.new( 1, 0.45, 0.65 ),Color.new( 1, 0.25, 0.5 ),Color.new(1, 0.25, 0.5)] );\r\n\r\n~add_mini.value( win, Rect( 0, win.bounds.height * 0.5, win.bounds.width / 3, win.bounds.height * 0.25 ), pulser_synth, ~master_in, ~minis, [ 40, 16000 ], \"Pulser\", [8,15,2,3], [Color.new(0.28, 0, 0.14),Color.black,Color.new(0.75, 0, 0.5),Color.grey,Color.blue] );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3, win.bounds.height * 0.5, win.bounds.width / 3, win.bounds.height * 0.25 ), lowvibe_synth, ~master_in, ~minis, [ 1, 128 ], \"LowVibe\", [8,15,2,3], [Color.new(0.05, 0.35, 0.05),Color.new(0, 0.2, 0),Color.new(0.15, 0.8, 0.3),Color.new(0.1, 0.66, 0.9),Color.new(0, 0.56, 0.8)] );\r\n\r\n~add_mini.value( win, Rect( win.bounds.width / 3 * 2, win.bounds.height * 0.5, win.bounds.width / 3, win.bounds.height * 0.25 ), lizard_synth, ~master_in, ~minis, [ 50, 20000 ], \"Lizard\", [8,15,2,3], [Color.green,Color.red,Color.green,Color.red,Color.red] );\r\n\r\nmaster_synth = SynthDef(\\master, { | inBus, amp = 0.5, lfo_rate = 1, lfo_amount = 0, reverb_amount = 0, dist_amount = 0 |\r\n\tvar snd, dist_snd, reverb, mix;\r\n\r\n\tsnd = In.ar( inBus, 2 );\r\n\r\n\tdist_snd = snd.abs * dist_amount;\r\n\r\n\tsnd = snd * ( 1 - dist_amount );\r\n\r\n\tsnd = Mix.ar( [ snd, dist_snd ] );\r\n\r\n\tsnd = snd * ( 1 - ( SinOsc.kr( lfo_rate ) * lfo_amount ) );\r\n\treverb = snd;\r\n\t4.do( { reverb = AllpassC.ar(reverb, 0.1, { Rand(0.001,0.1) }.dup, 4)} );\r\n\r\n\tsnd = snd * ( 1 - reverb_amount );\r\n\treverb = reverb * reverb_amount;\r\n\r\n\tmix = Mix.new( [ snd, reverb ] );\r\n\tmix = mix * amp;\r\n\r\n\tOut.ar( 0, mix );\r\n\r\n}).play( args: [\\inBus, ~master_in], addAction: \\addToTail );\r\n\r\n// Finally, bring the window to the front.\r\nwin.front;\r\nCmdPeriod.doOnce({Window.closeAll}); // Kill GUI and server sounds on < Ctrl + ^ + . > .\r\nwin.onClose = {\r\n\ts.freeAll;\r\n\tWindow.closeAll;\r\n};\r\n\r\n// Slider Draw Function\r\ndraw_h_slider = { | slider, value, color, title |\r\n\r\n\tvar icon_size = slider.bounds.height * 0.2;\r\n\tvar outline_size = slider.bounds.height * 0.4;\r\n\r\n\t// Draw the frame\r\n\tPen.strokeColor = Color.white;\r\n\tPen.fillColor = Color.black;\r\n\tPen.addRect( Rect(0, 0, slider.bounds.width, slider.bounds.height ) );\r\n\tPen.width = 2;\r\n\tPen.draw(3);\r\n\r\n\tif( title != \"\", {\r\n\t\tvar new_font = Font.default.deepCopy;\r\n\t\tnew_font.size = slider.bounds.height * 0.3;\r\n\t\tPen.stringAtPoint( title, ( slider.bounds.height * 0.1 )@( slider.bounds.height * 0.1 ), new_font, color );\r\n\t});\r\n\r\n\t// Draw the losange\r\n\tPen.moveTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value ) ) ) - icon_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.lineTo( ( slider.bounds.width - (slider.bounds.width * ( 1 - value )) ) @ ( slider.bounds.height/2 -icon_size ) );\r\n\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) + icon_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.lineTo( ( slider.bounds.width - (slider.bounds.width * ( 1 - value )) ) @ ( slider.bounds.height/2 + icon_size ) );\r\n\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) - icon_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.fillColor = color;\r\n\tPen.fill;\r\n\r\n\tPen.moveTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) - outline_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.lineTo( ( slider.bounds.width - (slider.bounds.width*( 1 - value )) ) @ ( slider.bounds.height/2 -outline_size ) );\r\n\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) + outline_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.lineTo( ( slider.bounds.width - (slider.bounds.width*( 1 - value )) ) @ ( slider.bounds.height/2 + outline_size ) );\r\n\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) - outline_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.moveTo( 0 @ ( slider.bounds.height/2 ) );\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) - outline_size ) @ ( slider.bounds.height/2 ));\r\n\r\n\tPen.moveTo( ( slider.bounds.width ) @ ( slider.bounds.height/2 ) );\r\n\tPen.lineTo( ( ( slider.bounds.width - ( slider.bounds.width * ( 1 - value )) ) + outline_size ) @ ( slider.bounds.height/2 ) );\r\n\r\n\tPen.strokeColor = color;\r\n\tPen.stroke;\r\n\tPen.draw(3);\r\n};\r\n\r\n)",
   "id" : "1-5cH",
   "is_private" : null
}
