• Register
  • Help
Page 1 of 11 1234 ... LastLast
Results 1 to 10 of 109

Topic: Announcing a SOLUTION to the "Machine Gun Effect"!

Share/Bookmark
  1. #1
    Member
    Join Date
    Nov 2003
    Location
    Kauai, Hawaii, USA
    Posts
    685

    Announcing a SOLUTION to the "Machine Gun Effect"!

    Over the past couple of weeks (since I first discussed a technique for solving the “machine gun effect”) Kevin Fletcher Tweedy (“KevinKauai” on most music Forums) and I have been collaborating on “codifying” the approach/technique and providing some solid documentation so that other folks might easily apply the benefit. Along, the way, Kevin volunteered some excess bandwidth on one of his web sites and we began putting together an “info” page to “spread the word” on how to apply this technique in Kontakt 2.

    We are now ready to release this INFO page, a Tutorial to go with it and 128 Patches that address some of the more problematic instruments in EWQLSO/Gold. Although these are offered “as is” (and “at your own risk”) they appear to be solid and without problems. Thought they address instruments that you would normally use in the included Kompakt player with EWQLSO/Gold, the initial group of 128 Patches supplied can only be used in Kontakt 2 because they use features which are not yet available in the version of Kompakt that Gold uses.

    We have had additional assistance from enthusiastic Beta-testers who have given our “release” a basic “sanity check”. We would, of course, appreciate the prompt reporting of any problems so that we can fix the “Info” page and Tutorial (and Patches, if need be).

    Everything is now available starting with this page: http://www.kevintweedy.net/K2/info.htm

    Note that we are encouraging folks who have Kontakt 2 and other sample packages to provide their “contributions” for the general good. We hope that others will take our example and send in Patches using this technique from which others may benefit.

    Theodor Krueger
    (Melbourne, Victoria, Australia)

    Kevin Fletcher Tweedy
    (Kauai, Hawaii, USA)

  2. #2
    Senior Member Big Bob's Avatar
    Join Date
    Jun 2005
    Location
    Apple Valley, California
    Posts
    323

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    Hey Kevin,

    Kudos again for all your selfless effort on behalf of the Kontakt community. Thanks for taking a great idea and expressing it in a very understandable format that we can all benefit from. And of course, thank you Theo for an ingenious idea that has real practical value.

    As I was reading your discussion of RR versus RD, it occured to me that (until such time as NI adds some kind of 'non-repeating random' function, we could do an 'end run' here also by using the KSP. The KSP has a random function and the ability to control which group will play. But in addition, the KSP has the flexiblility to 'bend' the random function any way we might desire. So, if you can obtain a consensus of just how everyone would like a 'random round robin' function to operate, I'm willing to write and contribute a script that will do the job. Think about it guys and let me know what you'd like to have.
    Big Bob (aka Wonderful Bob)

  3. #3

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    Theodor and Kevin -- thank you so much for your hard work! And Big Bob, if you can find a way to make this work with KSP, that would be fantastic.
    --
    Robert Gregory Browne
    KISS HER GOODBYE (now available)
    KILLER YEAR: Stories to Die For (Jan. 2008)
    WHISPER IN THE DARK (2008)
    St. Martin's Press
    http://www.robertgregorybrowne.com

  4. #4

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    I'd actually started this last night after reading this post and the article. The basic version of this is now finished. This should accomplish the TKT effect solely by way of scripting. This one should be ready for testing.

    Description of parameters and controls:

    Smart_cycle - this button enables or disables the script's ability to play alternate samples only when a repeated note is played. Arguably, a sample played further away from its root pitch is less desirable perhaps than one that is played back nearer its correct pitch. It may be beneficial to limit the playing of alternate samples only when necessary to avoid unnecessary pitch change artifacts. While this is enabled the script will only play alternates when two consecutive notes are played in a row. For instance, playing up and down a scale will not trigger any alternate samples when this is enabled. If you get machine gun effects when playing phrases that do not contain repeating single notes, try turning this off.

    Random mode - Randomly selects alternate notes to be played. When this is enabled you will never hear the same sample at the same pitch twice in a row.

    Round_robin - When this is enabled, alternate samples will be played in a repeated cycle. (not randomly)

    3_variations - When this is enabled, the random or round robin selection of a sample to play will occur between 3 different samples. Probably the better choice if stretching of the samples is a concern, because the 5_variations option will play some samples that were recorded at pitches further away from the root note. If your sample interval is 2 or higher (see below), this is likely your best choice.

    5_variations - When this is enabled, the random or round robin selection of a sample to play will occur between 5 different samples. A good choice when you need much variation in the samples and the stretching or shortening of those samples is not as much of a concern sound-wise.

    Sample interval - The distance between the mapped samples must be set here for proper functioning of the script. If your samples are mapped chromatically, the value should be 1. If they are mapped one sample to 2 keys (a whole step) then the value should be 2, and so forth. The higher the value, the less likely you will achieve good results.

    LoNote (Low Note) - Set the lowest note in the range of the instrument here. If this is not set you will get dropouts playing near the lowest note.

    TopNote (High Note) - Set the highest note in the range of the instrument here. If this is not set you will get dropouts playing near the highest note.

    If you are having problems cutting and pasting from below, you can get the script here.
    Code:
    on init
    	message ("")
    	declare ui_knob $LoNote (0, 127, 1)
    	declare ui_knob $TopNote (0, 127, 1)
    	declare ui_button $Round_robin
    	declare ui_button $Random
    	declare ui_button $3_variations
    	declare ui_button $5_variations
    	declare ui_label $Mode(1,1)
    	declare ui_label $Variations(1,1)
    	declare ui_label $LabelLowNote(1,1)
    	declare ui_label $LabelHiNote(1,1)
    	declare ui_value_edit $interval(1,12,1)
    	declare ui_label $Labelinterval(1,1)
    	declare ui_button $Smart_cycle
    	declare $current_variation
    	declare $current_noteid
    	declare $multiplier
    	declare $last_note
    	declare $mod_value
    	declare $avoid_variation
    	
    	move_control ($Round_robin, 2,3)
    	move_control ($Random, 2,2)
    	move_control ($Mode, 2,1)
    	move_control ($Variations, 3,1)
    	move_control ($3_variations, 3,2)
    	move_control ($5_variations, 3,3)
    	move_control ($interval,4,2)
    	move_control ($Labelinterval, 4,1)
    	move_control ($LoNote, 5,1)
    	move_control ($TopNote, 6,1)
    	move_control ($LabelHiNote, 6,3)
    	move_control ($LabelLowNote, 5,3)
    	move_control ($Smart_cycle,1,1)
    
    	set_text($Labelinterval, "Sample interval")	
    	$Random := 1
    	$3_variations := 1
    	$interval := 2
    	$current_variation := -1
    	$mod_value := 3
    	$LoNote := 0
    	$TopNote := 127
    	$Smart_cycle := 1
    	$last_note := -1
    
    	make_persistent($Round_robin)
    	make_persistent($Random)
    	make_persistent($3_variations)
    	make_persistent($5_variations)
    	make_persistent($interval)
    	make_persistent($LoNote)
    	make_persistent($TopNote)
    	make_persistent($mod_value)
    	make_persistent($Smart_cycle)
    end on
    
    on note
    	if ($Smart_cycle = 1 and $last_note # $EVENT_NOTE)
    		$last_note := $EVENT_NOTE
    		$current_variation := 0
    		exit
    	end if
    	if($Round_robin = 1)
    		if ($current_variation = -1)
    			if ($3_variations = 1)
    				$current_variation := 2
    			else
    				$current_variation := 4
    			end if
    		end if
    		if ($3_variations = 1)
    			if ($current_variation = 2)
    				$current_variation := 0
    			else
    				inc($current_variation)
    			end if
    		else
    			if ($current_variation = 4)
    				$current_variation := 0
    			else
    				inc($current_variation)
    			end if
    		end if
    		
    		if ($current_variation > 2)
    			$multiplier := 2
    		else
    			$multiplier := 1
    		end if
    		if ($EVENT_NOTE - ($interval * $multiplier) < $LoNote and $current_variation mod 2 # 0)
    			inc($current_variation)
    		end if
    		if ($EVENT_NOTE + ($interval * $multiplier) > $TopNote and $current_variation mod 2 = 0 and $current_variation # 0)
    			if ($3_variations = 1)
    				$current_variation := 0
    			else
    				if ($current_variation = 4)
    					$current_variation := 0
    				else
    					inc($current_variation)
    				end if
    				
    			end if
    		end if
    	else {play random}
    		if($current_variation = -1)
    			$current_variation := 2
    		end if
    		$avoid_variation := $current_variation
    		$current_variation := ($current_variation + random(1,$mod_value - 1)) mod $mod_value
    		select($current_variation)
    			case 0
    				$last_note := $EVENT_NOTE
    				exit
    			case 1
    				if($EVENT_NOTE - $interval < $LoNote)
    					if($avoid_variation = 0)
    						$current_variation := 2
    					else
    						$current_variation := 0
    					end if
    				end if
    			case 2
    				if($EVENT_NOTE + $interval > $TopNote)
    					if($avoid_variation = 0)
    						$current_variation := 1
    					else
    						$current_variation := 0
    					end if
    				end if
    			case 3
    				if($EVENT_NOTE - ($interval * 2) < $LoNote)
    					if($avoid_variation = 0)
    						$current_variation := 4
    					else
    						$current_variation := 0
    					end if
    				end if
    			case 4
    				if($EVENT_NOTE + ($interval * 2) > $TopNote)
    					if($avoid_variation = 0)
    						$current_variation := 3
    					else
    						$current_variation := 0
    					end if
    				end if
    		end select
    	end if
    	$last_note := $EVENT_NOTE
    	select($current_variation)
    		case 0
    			exit
    		case 1
    			ignore_event($EVENT_ID)
    			$current_noteid := play_note($EVENT_NOTE - $interval, $EVENT_VELOCITY, 0, -1)
    			change_tune($current_noteid, $interval * 100000, 0)
    		case 2
    			ignore_event($EVENT_ID)
    			$current_noteid := play_note($EVENT_NOTE + $interval, $EVENT_VELOCITY, 0, -1)
    			change_tune($current_noteid, $interval * -100000, 0)
    		case 3
    			ignore_event($EVENT_ID)
    			$current_noteid := play_note($EVENT_NOTE - (2 * $interval), $EVENT_VELOCITY, 0, -1)
    			change_tune($current_noteid, $interval * 200000, 0)
    		case 4
    			ignore_event($EVENT_ID)
    			$current_noteid := play_note($EVENT_NOTE + (2 * $interval), $EVENT_VELOCITY, 0, -1)
    			change_tune($current_noteid, $interval * -200000, 0)
    	end select
    end on
    
    on ui_control ($Round_robin)
    	$Round_robin := 1
    	$Random := 0
    end on
    
    on ui_control ($Random)
    	$Random := 1
    	$Round_robin := 0
    end on
    
    on ui_control ($3_variations)
    	$mod_value := 3
    	$3_variations := 1
    	$5_variations := 0
    	$current_variation := 2
    end on
    
    on ui_control ($5_variations)
    	$mod_value := 5
    	$5_variations := 1
    	$3_variations := 0
    	$current_variation := 4
    end on
    
    on ui_control ($LoNote)
    	select ($LoNote mod 12)
    		case 0
    			set_text ($LabelLowNote, "Low Note: C" & $LoNote / 12 - 2)
    		case 1
    			set_text ($LabelLowNote, "Low Note: C#" & $LoNote / 12 - 2)
    		case 2
    			set_text ($LabelLowNote, "Low Note: D" & $LoNote / 12 - 2)
    		case 3
    			set_text ($LabelLowNote, "Low Note: D#" & $LoNote / 12 - 2)
    		case 4
    			set_text ($LabelLowNote, "Low Note: E" & $LoNote / 12 - 2)
    		case 5
    			set_text ($LabelLowNote, "Low Note: F" & $LoNote / 12 - 2)
    		case 6
    			set_text ($LabelLowNote, "Low Note: F#" & $LoNote / 12 - 2)
    		case 7
    			set_text ($LabelLowNote, "Low Note: G" & $LoNote / 12 - 2)
    		case 8
    			set_text ($LabelLowNote, "Low Note: G#" & $LoNote / 12 - 2)
    		case 9
    			set_text ($LabelLowNote, "Low Note: A" & $LoNote / 12 - 2)
    		case 10
    			set_text ($LabelLowNote, "Low Note: A#" & $LoNote / 12 - 2)
    		case 11
    			set_text ($LabelLowNote, "Low Note: B" & $LoNote / 12 - 2)
    	end select
    end on
    
    on ui_control ($TopNote)
    	select ($TopNote mod 12)
    		case 0
    			set_text ($LabelHiNote, "High Note: C" & $TopNote / 12 - 2)
    		case 1
    			set_text ($LabelHiNote, "High Note: C#" & $TopNote / 12 - 2)
    		case 2
    			set_text ($LabelHiNote, "High Note: D" & $TopNote / 12 - 2)
    		case 3
    			set_text ($LabelHiNote, "High Note: D#" & $TopNote / 12 - 2)
    		case 4
    			set_text ($LabelHiNote, "High Note: E" & $TopNote / 12 - 2)
    		case 5
    			set_text ($LabelHiNote, "High Note: F" & $TopNote / 12 - 2)
    		case 6
    			set_text ($LabelHiNote, "High Note: F#" & $TopNote / 12 - 2)
    		case 7
    			set_text ($LabelHiNote, "High Note: G" & $TopNote / 12 - 2)
    		case 8
    			set_text ($LabelHiNote, "High Note: G#" & $TopNote / 12 - 2)
    		case 9
    			set_text ($LabelHiNote, "High Note: A" & $TopNote / 12 - 2)
    		case 10
    			set_text ($LabelHiNote, "High Note: A#" & $TopNote / 12 - 2)
    		case 11
    			set_text ($LabelHiNote, "High Note: B" & $TopNote / 12 - 2)
    	end select
    end on

  5. #5

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    Quote Originally Posted by fizbin
    I think this should do it. I'm away from K2 and have added some changes so I cannot debug. Can someone try this please?[code]

    Fizbin, works great here. Just tried it on one of the GPO solo violin pizz patches and with one of the K2 VSL patches, works perfectly as intended.

    Thanks, this will come in handy. KSP is really a great tool.

  6. #6

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    One small issue. What do you do about Keyswitched patches? Anyway to limit the RR or RD effect to just the actual range of the instrument?

  7. #7

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    A keyswitch could be added easily to avoid playing the Round robin or random. I'll add that tonight also.

    fizbin

  8. #8

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    Thanks for the great idea Kevin and Theodore. I don't mean to steal any thunder. You may post the script as you like or not post it as you like. I have no plans other than to post it here. It was your idea to begin with. The script just steals samples to play from other mappings and retunes them to the correct pitch, very similar in concept to your method, without actually having to copy samples to new groups and random/round robin between those groups through the normal Kontakt interface.

    fizbin

  9. #9

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    fizbin, thank you for the AMAZING script! I just tried applying it to QLSO Gold marcato patches and GPO pizzicato, and it works great. It really breathes life into the Gold marcato samples in particular. Thanks again.
    Zircon Studios - Original music for media, electronica, sound design, and synthesis.

  10. #10
    Senior Member Big Bob's Avatar
    Join Date
    Jun 2005
    Location
    Apple Valley, California
    Posts
    323

    Re: Announcing a SOLUTION to the "Machine Gun Effect"!

    Hey thanks Fizbin, looks like you already did the deed! I haven't had a chance to study it yet because I'm still trying to wrap up the script for V1.01 of DjDick's harmonizer (which in turn was interrupted to pin down the stuck note problem with the KSP). Boy, we're all cookin' now. Let's keep the momentum going!

    PS How do you insert tabbed text like you did?
    Big Bob (aka Wonderful Bob)

Go Back to forum
Page 1 of 11 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •