To test the "Until" action Macro (v11.0.3)

From what you've described, the two simple AppleScript-based macros I posted above would do the trick for you. You can change the 3 to whatever you want, or even have a few macros - one with a 3 second skip, another with 10, etc. Maybe on Control-1, -2, -3, etc. So listen to what you need to, then Ctrl-Q (or whatever you assign) for those you deem quiet.

-rob.

1 Like

Yes, if you mean the AS you wrote, it DOES take care of the 2nd part. Today I tried Nige_S macro, eventually succeeded to learn and understand how/why it works and I think that if I combine Nige's macro with your script (that, as you mentioned, very basic and easy to understand) I eventually can start "working".

Here's a macro group that implements what I wrote above:

Add to Quiet group.kmmacros (2.6 KB)

There are four macros in the group, which is only active in Music. Three of them skip two, four, or eight seconds forward, and are assigned to Control-1, -2, and -3. The fourth assigns the current track to the Quiet group and skips the rest of the track, and it's assigned to Control-Q.

Start playing a song, press any combo of Control-1, -2, and -3 you need to skip through the track, then press Control-Q when you decide you want to add the current track to your quiet group. I didn't write a macro to skip the current track without categorizing, because you can just press the Right Arrow key in Music to do that already.

-rob.

1 Like

Thanks rob.
I will try all the above including the macro Airy created (even if for sole purpose of the opportunity of widening my knowledge of KM) and will get back with questions/decisions.
Thanks again to all!!!

Such a "personal" classification will require you to listen, since you can't decide based on metadata like genre or derived data like BPM/average volume.

We should still be able to make the job easier with KM. The "listen to bits of a track" has been covered in a variety of ways, but the "play glass sound then give me a list to classify by" seems to break your flow and add unnecessary time.

I can see a workflow that will play 2-second snatches of a track until you classify it, after which it moves to the next track automatically. Repeat until you are done for that session.

How are you planning on classifying tracks? Put them into a playlist, change the metadata on each and use a smart playlist, something else?

I was thinking of adding "Quiet" to the "grouping" field and then create a smart playlist where the condition (or 1 of them) is "grouping contains quiet".
(In a matter of fact I already have all kind of smart playlists like the above).
Something like this macro:

Now that rob has written such a simple Apple script I may use this one instead.
BTW, why did you use the "Global" with the variable "loopShouldRun" instead of "Local"? (I read the description in the Wiki but didn't find an answer to my question)

"Local" variables are only available in the executing instance that "created" them (that means that even the same macro, if run twice at the same time, will create two entirely separate sets of its local variables).

"Global" variables are available to any macro running. That makes them a good way to share values/data between macros, which is what we are doing here with the loopShouldRun flag -- when the "Stopper" macro changes the value the main macro can read that changed value and stop.

That is also why you shouldn't use global variables unless you need to -- there's always the chance that other macros might change the variable when you don't expect them to!

Regarding calculating the BPM, it was getting much more complicated than I expected. There's probably more than one way to solve the problem using math, but after reading the math on the link below, I gave up doing it automatically, and decided a manual approach was better. So I created a new macro and uploaded it to the macro forums page on this site.

Here's the page that described the math needed to calculate the BPM of a song using a 2 second sample of audio from the song.

https://www.clear.rice.edu/elec301/Projects01/beat_sync/beatalgo.html

1 Like

Thanks for taking the time to explain that AND in an "easy down to earth version"!!!
Got it! (I learn on the net by reading manuals/definitions and eventually looking at examples/videos how to implement what I learned).
For some reason with KM (although I LOVE it and use it for many years) I'm still struggling with the way those are available in the help (Wiki, forums, manual and so). My feeling has been always that things are explained with definitions within definitions or something like that, that the "language" spoken is a foreign one), something like "not beginners friendly". (Beginners I mean by those that don't have any "software background"),

Any documentation, even a Forum post, has to make some assumptions about the reader. And not all styles work for all people. So if there's anything you don't understand just ask here -- there's a whole bunch of clever people able to explain things at many levels and in different ways, some of which will surely work for you.

1 Like

Hi again!
So, I succeeded eventually to put together the macro I initially wanted only thanks and because of your help!!!
Some remarks:
Airy, I tried to work with your macro. The stopper works for me, I just removed the condition "ABS(MOUSEY()-70)>5" because I thought it would be better for me not to "tie" the mouse that it won't be able to move without stopping the macro.
When I tried the main macro I didn’t succeed to play several parts of the song, only 1 skip/play. I don’t know if I did something wrong. (And I double checked and set up the timeout setting for "after 2 seconds")

Rob, for some reason when I tried to integrate the AppleScript for adding “Quiet” it didn’t work and got an error message:

So, this is the macro. It has 2 versions, one only KM and the 2nd, I integrated Nige’s AppleScript. As I said earlier, I prefer to work with KM, since I’m able to modify/change/adapt it, even with my limited knowledge, which I’m not able to with AS.

Final macro Play parts of song> quiet or next (BASED ON NIGE'S)+ QUIET KM & "+1" AppleScript (NIGE'S).kmmacros (44.7 KB)

Final macro Play parts of song> quiet or next (BASED ON NIGE'S) ONLY KM.kmmacros (47.1 KB)

STILL OPEN TO IMPROVEMENTS AND SO (more efficient/elegant/shorter/etc')

THANK YOU ALL for your help, encouragement and patience! AS ALWAYS it's been an awesome help!!! I appreciate that SO MUCH!!! I am so happy to have had widen my knowledge of KM!!!

BTW, I think the most important thing I gained: I defined to myself what a slow/quiet music means to me! :rofl::rofl::rofl:

Airy, hopefully sometime in the near future I'll be able to "dive" and learn what you brought here.
Thanks A LOT for everything!

That's fine. I intentionally gave you two choices to pick from.

1 Like

Glad you got it working!

-rob.

1 Like

Thanks Rob.

To all the members who helped me in this post: I owe you an apology. All of a sudden in one day I "deserted" this post (AND the forum) and never got to go on.
The reason was that all of sudden I was left without laptop. I just needed to replace the battery, but found out that the motherboard needed replacement, as well as one of the keys in the keyboard.
It took quite some time researching, ordering parts and eventually bring my MBP back to life.
After doing that I found out that the backups I'd been doing religiously were not exactly what I thought they'd be. I recovered almost 100% of the stuff, but lost some, among those were the macros I'd been working on lately before the replacement job.
I wanted to thank again all the good people that had been helping me!!!

No problem. I had forgotten about it.

I was sure nobody else was loosing sleep, BUT I was... :rofl:

You were releasing sleep? :face_with_monocle:

KEVIIINNN!!! LOOSING!!! LOOSING!!!.... :rofl: :rofl: