Randomly Pick a Sound from Logic Pro's Library

@peternlewis I don't know if this is any help but you can scroll through files in Logic Pro by holding UP or DOWN on the keyboard, so is it possible to create a keyswitch trigger that when pressed, it will randomly choose the UP or DOWN key on the keyboard and each time the amount of time the UP or DOWN key is held for will also change, so it will give me a random outcome each time.

there maybe a better way but that is all i can think of.

i just don't know how to create that myself within keyboard maestro

Does it support Command or Option Up Arrow to go to the first/last entry?

If so, then if you know the number of items, you could get a random position with something like:

  • Command-Up Arrow
  • Repeat RAND(ItemCount)
    • Down Arrow

I'm afraid that is likely to be about as good as it gets.

@peternlewis I tried the Command or Option UP Arrow but unfortunately it didn't work. would it be possible for an applescript to do the randomisation?

In that case, another option is:

  • Repeat ItemCount times
    Up Arrow
  • Repeat RAND(ItemCount) times
    Down Arrow

It might beep for all the extra up arrow keys.

I doubt it. Maybe with some UI/Accessibility stuff, but not easily.

@peternlewis I found a different way to access the files in the folder, and CMD + UP does take it to the last entry in the folder, so your other method may work with this.

could you help me a little with creating the macro as i'm having some difficulty creating macros.

Thank you

I add library patches via automated drag and drop from the Finder to Logic's track header.

Check out the Stack macro under Strip Search near the top of this thread:

All you'd need to do is reveal a random patch in Finder.

@noisneil this looks very interesting! i have download it and triggered it with a hotkey and it's showing this window, do you know what i'm doing wrong?

So we're both looking at the same thing, here's my current version of this macro:

Strip Search - Patch.kmmacros (96 KB)

Macro screenshot

The actions you may need to adjust are marked out in green and red.

It may simply be that you have a different key command set for toggling the Library pane in Logic, but let's be thorough...

  • Ensure you're using the default library patch folder location:

~/Music/Audio Music Apps/Patches

  • Take your own screenshot of Logic's Library icon for use in the found image condition:

CleanShot 2023-08-01 at 16.48.53@2x

  • Ensure the Show/Hide Library simulated keypress matches with the key command you use in Logic:

  • Take your own screenshot of the edge of a selected finder item in Column View:

Let me know how you get on! :+1:t3:

1 Like

I suspect @noisneil is way better at controlling Logic Pro than I will ever be, so I'm going to bow out now and leave it to the expert.

2 Likes

Give this version a shot. It works for me! The only thing you might have to change is the screenshot of the blue highlight edge of the selected file in Finder.

Strip Search - Random Patch.kmmacros (74 KB)

Macro screenshot

2 Likes

This is incredible work @noisneil Thank you so much!!

when i first posted my question, i was honestly hoping you would see it as i knew you would have some sort of solution.

i apologise for being slow to respond, had some very busy past few days.

your randomised macro worked first time without any tweaks.

i don't know if you agree but i think what would make this randomized macro even better would be to able to select the type of sound you would like the randomisation to happen on.

for example:

I would like an acoustic guitar sound or like a dark reverbed synth pluck or staccato strings

so i trigger the macro either by typed string or keyswitch and then enter the type of sound you want.

then the macro chooses an acoustic guitar sound from the many acoustic guitar patches saved.

instead of getting a totally random patch. like a hihat when you want a guitar.

i don't know if i would need to rename a few patches for it to work properly, but i think it would defiently be worth it

what do you think?

2 Likes

Ok how about this?

Strip Search - Filtered Random Patch.kmmacros (81 KB)

Macro screenshot

This macro assumes your patches are organised into subfolders.

2 Likes

@noisneil It's perfect!! exactly the sort of thing i was looking for, thank you so much!!!

i just need to start organizing my folders to make it more efficient.

i already know i'm gonna use this on pretty much every song i work on, so again thank you so much for doing this! you never disappoint.

1 Like

No worries! Happy to hear it will help your workflow! :+1:t3:

1 Like

Hey @noisneil i have been using the macro you created an it works a charm!

really happy with it!

and i thought of an idea which i think will help improve the macro!

so currently when the macro is triggered it opens a list of folders then you select a folder then select a subfolder and then the randomisation process begins.

but i thought if it's possible to change this so that, the macro continues opening folders and subfolders until there is at least one or more sound presets within a folder, then the randomizing can begin and it will choose a sound preset from the current folder.

so

if a folder contains at least one or more sound preset files then the randomization process can begin and if not, you can continue selecting as many folders an subfolders as you want.

currently you can only select two folders and then the randomization will begin on the second folder regardless if there is any sound preset files or not.

so it currently restricts your options in organising your sounds into folders.

i hope this makes sense :slight_smile:

Do you mean that, if there are patches directly within the second folder, then a random one should be picked; if there are no patches but there are subfolders, then a third folder choice prompt should appear?

That's doable.

yes that's exactly it! and that continues, so you could be in the 9th sub folder but until there is a patch within a folder then it will begin randomising

Try this:

Strip Search - Random Patch.kmmacros (80 KB)

Macro screenshot

This repeatedly prompts as long as the current folder contains subfolders. As soon as it doesn't, it will choose a random patch.

@noisneil just done a little practice run an seems to be working good, but is it possible to have an exception to folders named "Samples". as logic saves samples used in patches created with quick sampler and sampler into folders named "Samples"

Sure!

Strip Search - Random Patch.kmmacros (82 KB)

Macro screenshot