I've created 4 little scripts for MicroTonic, all based on the 'Random Morph' script.
Download them here :
https://bitbucket.org/marvotron/mdk-microtonic-scripts
To download just click the 'get source' button near the top right and choose an archive.
They are :
Same as Random Morph but keeps the Osc and Noise frequencies constant
Random Morph to create short sounds
Randomizes unmuted channels only. Attack and Decay parameters are constrained so only short(ish) sounds are generated.
All channels output to A and no chokes are set.
No randomizing, just creates a copy of the preset at the right hand morph edge with all distortion and pitch mod removed. Also resets the Noise filter Q to the default.
Again no randomizing, creates a copy of the preset at the right hand morph edge with all attack and decay parameters set to zero. Basically turns the pattern into clicks.
One thing to note, the behaviour is slightly different to the random morph in that it leaves the morph slider at the right hand edge so you immediately hear the generated preset.
As for the code, well its nothing exciting, just getting familiar with Pika. I'll re-factor it later.
Hope you find them as fun to use as I do.
These are great! Thanks for sharing. The Random Morph Same Pitch is more useful than my original Random Morph, and the non-random morph scripts are really clever!
Nice work.
If you have any questions or need some help with the scripting language, feel free to ask.
Thanks Magnus, im having a lot of fun with this scripting. So far im ok with the language, im a programmer so having the other scripts and the reference documentation is more than enough at this stage. I did think of one thing and found out you already put it in (preset.tempo) but this leads me to another question, how is the attack time parameter mapped to the 0..1 range?
Because I want to create a 'backwardizer' script which sets the attack times to some value related to the current tempo and a 'quantizer' which sets attack and decay times to the nearest 1/16th multiple (1/16, 1/8, 1/4 etc..)
anyway, I just added another quick one I thought of :
FMalizer
Set current preset to left edge, right edge is altered to make mainly FM type sounds
I added it to the zip at the above link.
- MDK wrote:
how is the attack time parameter mapped to the 0..1 range?
Unfortunately I used a x * exp(x) formula and realized too late that it was a bad idea because its inverse is an implicit function (product log) that you need to solve numerically. The MicroTonic file / clipboard format is using natural units (like 'ms' and 's') which means that everytime such a file is parsed there is a bit of equation solving going on. :) Extremely basic, but still.
The exact formula used also depends on the envelope modes.
I think the best idea is to use the paramValue() and paramText() functions which converts any parameter to and from natural units.
Because I want to create a 'backwardizer' script which sets the attack times to some value related to the current tempo and a 'quantizer' which sets attack and decay times to the nearest 1/16th multiple (1/16, 1/8, 1/4 etc..)
Great ideas! Keep us updated.
Really nice scripts! Thanks for sharing :)
Cheers
Dennis
lovin the new scripts
really nice... especially liking the micro random
i've made the backwardizer and quantize scripts, they're added to the zip.
http://relivethefuture.com/music/MDK_MicroTonic_Scripts.zip
The backwardizer actually just swaps the attack and decay times for each envelope which generally makes things sound backwards.
The quantizer sets the envelope times to the nearest 1/16, 1/8, 1/4, 1/2 or whole step (hopefully).
Magnus, i've got a question / problem relating to passing references to presets into functions. I just cant seem to get it to work.
I've uploaded a separate archive for you to look at here :
http://relivethefuture.com/music/ForMagnus_MicroTonicScriptProblem.rar
I've created a script in the resources folder where i'll keep various reusable functions, the one I cant get working is the 'storeAndMorph'.
If you look in the Quantize Envelopes - NotWorking.pika script you'll see that im declaring the actual quantizing loop as a function which should take a reference to a preset as its only argument. This 'quantizeEnvelopes' function is then passed in to the storeAndMorph function which calls it with a reference to the preset 'p', but inside the quantizeEnvelopes function 'p' isnt p.
I've done some testing and just cant seem to pass a preset into a function and access it properly. what am I missing? :)
Thanks for the new scripts! I love the backwardizer! :)
One small suggestion: It would be nice if the backwardizer would change the noise envelope shape from modulated to exponential if it's set to modulated.
It doesn't really sound backwards when it's set to modulated since the "rattle" just gets longer.
Just a small idea :)
Thanks again!
Cheers
Dennis
Wicked. Will check out the new scripts later. First I'll answer your PikaScript question.
From a quick glance I'd say that the only thing you need to do is place pr within brackets. Like this:
[pr].drumPatches[ch]['OscAtk'] = quantize(msecPerStep, 'OscAtk.' # ch, [pr].drumPatches[ch]['OscAtk']);
In PikaScript you need to explicitly dereference references with brackets, e.g. [ref]. It's similar to how you need to dereference pointers in C with *ptr.
When you do e.g. '@p' you are actually creating a string that identifies the variable 'p' uniquely. E.g. if 'p' is global the identifier string will be ::P
When you later do '[pr]' you are telling PikaScript to expand this identifier string, so '[pr].blahblah' might become ::P.blahblah
Hope you understand.
yeah i do understand, I'll give it a try now. tbh, I thought that the 'args' library function already de-referenced function parameters. anyway, i'll see what happens.
edit
yeah, it appears to work now. thanks :D
Cool. The args function can be a little confusing. All it does is taking the caller's arguments, $0 and up and puts them into variables. @ is needed before each variable because we must pass their references. E.g. you need to write args(@a, @b, @c) and not args(a, b, c), otherwise you would just try to pass the values of any existing 'a', 'b' and 'c' to args.
i've uploaded a major update.
There are 4 new scripts, the 2 important ones are workflow features for working with my scripts.
The Lock Muted script will 'lock' all muted channels so that all the other modifier scripts wont affect those channels.
Unlock all channels
So the flow is this :
hope that makes sense, give it a try and feel free to ask if you have any questions or suggestions.
There are 2 new very simple modifier scripts :
gradually reduces attack times
gradually increase decay times
download link is the same one in the first post.
have fun. :D
Love those scripts!
Thanks for sharing!
my pleasure :)
Im now keeping them in a mercurial repository here :
https://bitbucket.org/marvotron/mdk-microtonic-scripts
To download from there just click the 'get source' button near the top right and choose an archive.
hey thx for sharing man, sounds great!! can´t await to test the
random scripts... btw would it be difficult to make a script that creates
a new random morph (like the one in the Microtonic Script pack) AND
automatically Save the 2 Morph Values as 2 indivividual Preset Files? :P
hey mdk, great new scripts.
but i'm getting an error message wi the 'lock muted' script
the operation could not be performed due to the error:
script error: invalid lvalue.
i'm using ableton 8 on windows 7, lenovo thinkpad t410
ok, i'll check what i uploaded. i've got the same setup as you. ableton 8, win 7. shouldnt make a difference though :)
i've just pushed an update here : https://bitbucket.org/marvotron/mdk-microtonic-scripts
give it a try.
aye, it works now.
only on your scripts, not the magnus scripts.
it's a cracking script, really handy, cheers mdk :)
Awesome! Thank you Martin!
you're welcome :)
btw, Magnus, maybe you can change the thread title to something like 'Extra scripts for microtonic' as there are more than 4 now.
I can’t quite figure out the scripts. If I try and download them I only get the HTML file link. If I click on the name I see the script, but copying and pasting to a txt file hasn’t worked either.
looks like bitbucket have complicated their download process.
go to this page
then click 'tags' and select zip on the entry for 'tip'
that should do it.
That worked, thanks so much for that.
Thank you so much!!
many thanx :-)
thx a lot for sharing ! some really great scripts :)
I've downloaded but haven't been able to use the scripts. i keep getting an dialog saying that there was an error in opening the file. any suggestions>?
Hello
I moved all the scripts to the right directory. The scripts from Magnus work, but your scripts making an error. I do have Cubase 7.5/Windows 7
The operation could not be performed due to the error:
Script error: Undefined: 'html'.
Maybe someone can help me?
Best regards,
Olivier
hey MDK, can you share these again? would love to check them out.
Second this, would love to try them out.
me too
Thanks for sharing the nice Tips.
- Ole Kristian Krogstad wrote:
me too
- David wrote:
Second this, would love to try them out.
- Muffin wrote:
hey MDK, can you share these again? would love to check them out.
this link from above is still working: http://relivethefuture.com/music/MDK_MicroTonic_Scripts.zip
thanks MDK for the useful scripts!
You need to be signed in to post a reply