PDA

View Full Version : Scripts for Practical Jokes in Kontakt2


Brian2112
04-08-2005, 02:07 AM
To continue what I started on another thread….



Since I am waiting for the UPS guy to deliver my Kontakt 2 upgrade, I have been drooling for it…partly for the musical applications, but mostly for the potential practical joke applications for the scripting language:D . Here are some examples I have thought up. Please feel free to add more:

1) Midi Hang - Filter out MIDI note-offs

2) WTF Warped Record – Random pitchbends during play

3) 88 card shuffle – play one key, sound 88 notes at once

4) Unlimited Polyphony Test – combination of 1 and 3 (also known as the Streaming Hard Disk Burner)

5) Perfect Pitch Tuner (Transpose all input up a minor 2nd and see if anyone notices before it’s too late)

6) Crazy Piano Man - Invert the function of the Sustain Pedal

7) Rush Head ( partial all loops to play in 7/8 )

8) Locrian Only Arpeggio Mode (Self explanitory)

9) Auto-Harmonizer (in tri-tones of course)


http://www.northernsounds.com/forum/images/smilies/tongue.gif

…2112http://www.northernsounds.com/forum/images/smilies/biggrin.gif

Joseph Burrell
04-08-2005, 02:13 AM
5) Perfect Pitch Tuner (Transpose all input up a minor 2nd and see if anyone notices before it’s too late)


Another way to do this is to mix 48 and 44 sample rates.

http://www.northernsounds.com/forum/showthread.php?t=32498

Brian2112
04-08-2005, 02:55 AM
Actually, now that I think about it, maybe someone should warn NI about #4…LOL!:D

kbaccki
04-08-2005, 03:03 AM
Forgot one... Invert-O-Keys -- swap low keys for high keys and vice versa!

Brian2112
04-08-2005, 03:04 AM
Forgot one... Invert-O-Keys -- swap low keys for high keys and vice versa!
Very good!:D

Or re-map everything to Hungarian Minor!

xav93
04-08-2005, 03:16 AM
Ramdom velocity also.

Mike Greene
04-08-2005, 03:46 AM
You guys are NOT invited to my come to my studio! :D

- Mike Greene

robgb
04-08-2005, 03:50 AM
Oh my god -- you guys have dangerous minds. I'm checking any private emails from this group very, very carefully.

js33
04-08-2005, 04:10 AM
How about constantly random pitches on all 88 keys. That you can't turn off. :D

Or random tempo changes.

Or constant chopsticks on all 88 keys. :D

That would drive you insane pretty quick.

Hehehehee.

Cheers,
JS

thesoundsmith
04-08-2005, 04:51 AM
Invert-O-Keys -- swap low keys for high keys and vice versa! The old Arp 2600-Joe Zawinul trick. Actually can create some very interesting melodikc fragments this way...

Brian2112
04-08-2005, 05:40 AM
10) Disable the black keys

-Ed
04-08-2005, 05:41 AM
11) Disable ALL the keys

ahrensjt
04-08-2005, 05:46 AM
Someone will use these concepts and become a famous experimental electronic musician...

Oh wait: John Cage already worked with the All Notes Off idea in 4'33"

Regards,
Jeff

Brian2112
04-08-2005, 05:49 AM
Someone will use these concepts and become a famous experimental electronic musician...
Regards,
Jeff

That would be cool, but I would rather be known as an infamous practical joker.:D

David Abraham
04-08-2005, 10:58 AM
make every "note on" play either middle C or G. Then you can sound like Nelly.

Rich Pell
04-08-2005, 11:19 AM
make every "note on" play either middle C or G. Then you can sound like Nelly.
Good one..Buddy!!! ;) Rich

kbaccki
04-08-2005, 12:29 PM
Swap note-on and note-off, and invert sustain pedal. This would be like the "Hello, world!" of practical joke scripts.

Scott Cairns
04-08-2005, 12:35 PM
Hahaha Brian :) i LIKE 3) AND 6)

Hey, I finally understand your sig too, its PHI. The most devine number in the universe! :)

Guga Bernardo
04-08-2005, 04:42 PM
Ladies and Gentleman, I am proud to present you the WTF WARPED RECORD - RANDOM PITCH BENDS DURING PLAY script:


on init
declare polyphonic $bend
end on
on note
$bend := random(0,100000)
message($bend)
change_tune($EVENT_ID, $bend, 0)
end on


Sounds like a bad pianist playing an even worst piano. Very helpful indeed...

:D :D :D

Guga Bernardo
04-08-2005, 04:49 PM
And the fabulous and unique TRITON HARMONIZER!


on note
play_note($EVENT_NOTE+6,$EVENT_VELOCITY,0, -1)
end on


This ones yelds the best results when you play entires chords with it.


PS: Please note that lots of hours were required to make this one. If you intend to use it professionaly, please make a donation. :D

robgb
04-08-2005, 04:54 PM
How about a script that triggers a "Warning, no GUI included!" whenever someone opens the script function?

Guga Bernardo
04-08-2005, 05:00 PM
The fantastic BLACK KEYS DISABLER script:


on init
declare $keypitch
end on
on note
$keypitch := $EVENT_NOTE mod 12
if ($keypitch=1)
ignore_event($EVENT_ID)
end if
if ($keypitch=3)
ignore_event($EVENT_ID)
end if
if ($keypitch=6)
ignore_event($EVENT_ID)
end if
if ($keypitch=8)
ignore_event($EVENT_ID)
end if
if ($keypitch=10)
ignore_event($EVENT_ID)
end if
message($keypitch)
end on

jeffn1
04-08-2005, 05:04 PM
The fantastic BLACK KEYS DISABLER script:


on init
declare $keypitch
end on
on note
$keypitch := $EVENT_NOTE mod 12
if ($keypitch=1)
ignore_event($EVENT_ID)
end if
if ($keypitch=3)
ignore_event($EVENT_ID)
end if
if ($keypitch=6)
ignore_event($EVENT_ID)
end if
if ($keypitch=8)
ignore_event($EVENT_ID)
end if
if ($keypitch=10)
ignore_event($EVENT_ID)
end if
message($keypitch)
end on


You racist! ;)

jeffn1

Guga Bernardo
04-08-2005, 05:05 PM
The MIDI HANG script:



on note
ignore_event($EVENT_ID)
play_note($EVENT_NOTE, $EVENT_VELOCITY,0,0)
end on



This one is excelent in the absence of a sustain pedal.

Guga Bernardo
04-08-2005, 05:11 PM
You racist! ;)
jeffn1

:D :D :D
...and it´s amazing companion THE WHITE KEYS DISABLER:


on init
declare $keypitch
end on
on note
$keypitch := $EVENT_NOTE mod 12
if ($keypitch=0)
ignore_event($EVENT_ID)
end if
if ($keypitch=2)
ignore_event($EVENT_ID)
end if
if ($keypitch=4)
ignore_event($EVENT_ID)
end if
if ($keypitch=5)
ignore_event($EVENT_ID)
end if
if ($keypitch=7)
ignore_event($EVENT_ID)
end if
if ($keypitch=9)
ignore_event($EVENT_ID)
end if
if ($keypitch=11)
ignore_event($EVENT_ID)
end if
message($keypitch)
end on

jeffn1
04-08-2005, 05:48 PM
:D :D :D
...and it´s amazing companion THE WHITE KEYS DISABLER:


on init
declare $keypitch
end on
on note
$keypitch := $EVENT_NOTE mod 12
if ($keypitch=0)
ignore_event($EVENT_ID)
end if
if ($keypitch=2)
ignore_event($EVENT_ID)
end if
if ($keypitch=4)
ignore_event($EVENT_ID)
end if
if ($keypitch=5)
ignore_event($EVENT_ID)
end if
if ($keypitch=7)
ignore_event($EVENT_ID)
end if
if ($keypitch=9)
ignore_event($EVENT_ID)
end if
if ($keypitch=11)
ignore_event($EVENT_ID)
end if
message($keypitch)
end on


Well, I guess your'e okay now.

jeffn1

lumpyhed
04-08-2005, 06:38 PM
:D :D :D
...and it´s amazing companion THE WHITE KEYS DISABLER:


on init
declare $keypitch
end on
on note
$keypitch := $EVENT_NOTE mod 12
if ($keypitch=0)
ignore_event($EVENT_ID)
end if
if ($keypitch=2)
ignore_event($EVENT_ID)
end if
if ($keypitch=4)
ignore_event($EVENT_ID)
end if
if ($keypitch=5)
ignore_event($EVENT_ID)
end if
if ($keypitch=7)
ignore_event($EVENT_ID)
end if
if ($keypitch=9)
ignore_event($EVENT_ID)
end if
if ($keypitch=11)
ignore_event($EVENT_ID)
end if
message($keypitch)
end on


Hey that would stop yer clipping the white keys when trying something oriental! ;)

Joseph Burrell
04-08-2005, 06:47 PM
You guys sure are getting the hang of these scripts. And here I thought musicians couldn't do programming. :D

-Ed
04-08-2005, 11:21 PM
You guys sure are getting the hang of these scripts. And here I thought musicians couldn't do programming. :D

its the same guy

Brian2112
04-09-2005, 12:03 AM
The MIDI HANG script:



on note
ignore_event($EVENT_ID)
play_note($EVENT_NOTE, $EVENT_VELOCITY,0,0)
end on



This one is excelent in the absence of a sustain pedal.

OMG!!!!
ROTFL!!!!!

This is too awesome! Guga, you are my hero!!!!!:D

...2112:D

fizbin
04-09-2005, 12:46 AM
Here you go. A script that, every time a note is pressed has an equal chance of playing the note at pitch, playing the note an octave lower, or playing the note an octave higher. Good for mixing up chord voicings with no extra effort on your part. Set your instruments upper and lower key range as is obvious in the beginning of the script (change the key number not the {A-1} part - that is a comment which is not executed) so that you don't go below or above those notes when randomizing. The default range is set for 88 keys.


on init
declare const $lower_keyrange := 21 {A-1}
declare const $upper_keyrange := 108 {C7}
end on

on note
select(random(1,3)) {pick a random number between 1 and 3 inclusive}
case 1 {just play the note}
exit
case 2 {play the note an octave down if possible}
if (not($EVENT_NOTE - 12 < $lower_keyrange))
change_note($EVENT_ID,$EVENT_NOTE-12)
end if
case 3 {play the note an octave higher if possible}
if (not($EVENT_NOTE + 12 > $upper_keyrange))
change_note($EVENT_ID,$EVENT_NOTE+12)
end if
end select
end on


fizbin

Theodor
04-09-2005, 04:18 AM
I think i'm starting to get addicted to K2 Scripting ! Awesome stuff

The black and white keys got me thinking of "Scale scripts" which would enable only the keys used by a scale ( arabian , oriental , western scales etc ) that would be cool for piano rolling .

Could it be possible to enable some keys if : The next note you play is moving upwards or downwards ? So you could have a melodic minor scale while ascending and natural as descending ?

fizbin
04-09-2005, 04:44 AM
You could keep the last note played value in a variable so that the next note played could compare itself to that then you'd have your direction. Then that next note played replaces the last note played value with itself so you could check the note after that, and so on...

fizbin

Theodor
04-09-2005, 05:21 AM
____________Cool as !

David Abraham
04-09-2005, 10:51 AM
You could keep the last note played value in a variable so that the next note played could compare itself to that then you'd have your direction. Then that next note played replaces the last note played value with itself so you could check the note after that, and so on...

fizbin

now that's a good one.

Or even at a live show, program a script to play the notes for Chick Corea's greatest solo ever note by note, while you just hit semi-random notes in rhythm.

fizbin
04-09-2005, 02:40 PM
now that's a good one.

Or even at a live show, program a script to play the notes for Chick Corea's greatest solo ever note by note, while you just hit semi-random notes in rhythm.

You could do this by putting all the notes for the solo in an array variable. Whenever a key is hit it just plays the next note in the array variable. Very simple conceptually - you just have to map all the notes in the solo to an array which would look something like -
(52, 54, 55, 60, 90, 88, 45, 55, ......)

That would be the "hard" part. Also, if you fat-fingered a note (especially an extra note or missed a note) it might be tricky to get back on track to play the rest of the solo and then you would be screwed live, up on stage in front of millions of adoring fans. (think Ashley Simpson on SNL)

fizbin

fizbin
04-09-2005, 03:23 PM
Here it is. Replace the numbers in the parentheses with your sequence note numbers and change the index number (%note_array[12]) to match the number of notes in the parentheses below it and you have your sequence. C2 is the reset key to make it jump back to the beginning. If you play through it will loop. Could someone map Boston "Foreplay" for me please?


on init
declare $reset_key := 48 {C2 key resets sequence to the beginning}
declare %note_array[12] := ...
(64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86)

declare $index := 0
end on

on note
if ($EVENT_NOTE # $reset_key)
change_note ($EVENT_ID, %note_array[$index])
if ($index < num_elements(%note_array)-1)
inc($index)
else
$index := 0
end if
else
ignore_event($EVENT_ID)
$index := 0
end if
end on

David Abraham
04-09-2005, 05:49 PM
That would be the "hard" part. Also, if you fat-fingered a note (especially an extra note or missed a note) it might be tricky to get back on track to play the rest of the solo and then you would be screwed live, up on stage in front of millions of adoring fans. (think Ashley Simpson on SNL)

fizbin

ok then it would need an escape key that defaults all the remaining notes to the pentatonic scale, this could be a way to survive that situation :)

digger
04-09-2005, 06:29 PM
The old Arp 2600-Joe Zawinul trick. Actually can create some very interesting melodikc fragments this way...


Yeaahhh ! "Black Market" Killer lead line. TSS, you must be an OG?

Dig

Michiel Post
04-09-2005, 06:39 PM
http://www.nativeinstruments.de/fileadmin/redaktion_upload/fullscreenshots/K2_3KSPmodules.jpg

Guga Bernardo
04-09-2005, 08:52 PM
I knew KSP would be a major turning point in the history of Virtual Samplers...

I can´t wait to see the new libraries that will appear from now on! :)

Guga Bernardo
04-10-2005, 05:32 PM
Oh yeah... :D :D :D

http://www.northernsounds.com/forum/showthread.php?t=33208