Old 07-05-2022, 09:24 AM   #1
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default [Script] Microrhythms

Microrhythms Script!
This script is based on the articles by Malcom Braff about microrhythm or microtime. More info: http://general-theory-of-rhythm.org/basic-principles/

This script aims to make this method of thinking about microrhythms more experimental, where the user can tweak the ratios and perceteges and see and hear the results.

How it work?
This script interpolates the rhythms between a equal division of selected notes(0%) and the rhythm using the ratios defined in the Ratio textbox(100%). So if you are interpolating 4 values in the Ratio, lets say '2,1,1,2' it will interpolate between 4 notes that will be long,short,short,long and these 4 notes evenly spaced. The notes will divide the time defined at Len(QN) textbox. QN stands by quarter note. So 1 is 1 quarter note, 0.5 is one eight note. etc...


Illustrating the exemple above.


Whenever we are using the script with 100% or 0% there will be a grid value that can mark all positions. At 0% is the amount of notes, at 100% is the sum of the ratio values. The interesting part of this script is for exploring values in between.

At Malcom Braff website there is this good exemple about a Brazilian Rhythm:
We can reproduce it by using the ratio at '2,1,1,2' and the length at 1:





How to install?
YOU NEED REAIMGUI 0.7+ : https://forum.cockos.com/showthread.php?p=2416501
YOU NEED JSEXTENSION : https://forum.cockos.com/showthread.php?t=212174
YOU NEED REAPER 6.37+
Download it via Reapack. If haven't done yet import my repository link:
Code:
https://raw.githubusercontent.com/daniellumertz/DanielLumertz-Scripts/master/index.xml
DONATE!
If you like this script and would like to see more, please send a donation !
Here is my donation link:
https://www.paypal.com/donate/?hoste...=RWA58GZTYMZ3N


Last edited by daniellumertz; 07-24-2022 at 02:53 PM.
daniellumertz is offline   Reply With Quote
Old 07-05-2022, 10:00 AM   #2
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Ohhh that looks nice, also the color gradient looks cool! Being lately really inspired to make music starting from rhythms i see how this will be handy for experimenting and making things up.

You're on a roll! Very nice scripts Daniel. Makes me wish I'd knew how to code to make stuff like this.



**EDIT**
When trying to add a comma or dot (, .) in the Len box it crashes if I have a ratio written, say 2,1,1,2 but when I don't have a ratio in it doesn't crash.

and I get these to messages after the fact, script error and a console output window.

...s/MIDI/Microrhythms/Functions/Microrhythms Functions.lua:19: attempt to perform arithmetic on a nil value (local 'input_length')

ImGui assertion failed: (g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"

Is that user error? Also, would it be possible to add "Esc" to close the script? i'll keep trying it out to see how I can use it.

Last edited by tonalstates; 07-05-2022 at 10:23 AM.
tonalstates is offline   Reply With Quote
Old 07-05-2022, 10:30 AM   #3
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Oh thanks for the bug report I will look at it soon. It only happens putting a comma, but in Len only numbers and dots should go in there !

EDIT: Fixed!

Last edited by daniellumertz; 07-05-2022 at 09:53 PM.
daniellumertz is offline   Reply With Quote
Old 07-06-2022, 10:18 AM   #4
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 178
Default

Very nice.
Rockum is offline   Reply With Quote
Old 07-06-2022, 11:15 AM   #5
Judders
Human being with feelings
 
Join Date: Aug 2014
Posts: 11,044
Default

Wow, this looks really interesting. Thanks for sharing!
Judders is offline   Reply With Quote
Old 07-06-2022, 11:26 PM   #6
vsgrt
Human being with feelings
 
Join Date: May 2017
Posts: 186
Default

This is sooo good.

Len = 1 seems more like 1 bar here. Very stretched out.
I need to use Len = 0.2 or 0.1 to get it close to your GIF.
The script doesn't seem to do anything as long as Gap is enabled (which it is by default) - what does that do?

Last edited by vsgrt; 07-06-2022 at 11:45 PM.
vsgrt is offline   Reply With Quote
Old 07-07-2022, 01:47 AM   #7
souk21
Human being with feelings
 
souk21's Avatar
 
Join Date: Mar 2021
Posts: 463
Default

Amazing! I'm definitely gonna give this a try
Funnily enough, when I stumbled into Malcolm Braff's articles, I made myself a JSFX generator with a slider that replicates this exact one.

Gnawa or Brazilian 16th


Thanks for sharing, your version seems way more powerful that mine

edit: or was it "Gnawa triplet"? Not sure anymore
souk21 is online now   Reply With Quote
Old 08-12-2022, 10:56 AM   #8
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Interesting script!

Is it possible to make it remember the settings when restarting it?
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 10-09-2022, 04:55 PM   #9
lunker
Human being with feelings
 
lunker's Avatar
 
Join Date: Nov 2007
Location: Lucas, TX, USA (via Luleå, Sweden)
Posts: 2,008
Default

Wow! Love it!

Just trying it out and learning how to use it.

I entered a bunch of 16th notes repeating an arpeggio of "C E G E C E G E etc.". I set the ratio to "1,2,3,1", Len to "1", and the slider to 100%.

I played it on a piano VSTi at 120 BPM, and I swear I've heard that exact sound from an arcade game in the 70's or 80's!
__________________
Best Regards, Ernie "lunker" Lundqvist
BDSM (Bad Dog Studio Musicians)
Windows 10 running on Z390 + i7-8700
lunker is offline   Reply With Quote
Old 10-09-2022, 10:16 PM   #10
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by lunker View Post
Wow! Love it!

Just trying it out and learning how to use it.

I entered a bunch of 16th notes repeating an arpeggio of "C E G E C E G E etc.". I set the ratio to "1,2,3,1", Len to "1", and the slider to 100%.

I played it on a piano VSTi at 120 BPM, and I swear I've heard that exact sound from an arcade game in the 70's or 80's!
Thats cool to hear !! If you create some cool music with it please link us with your creation
daniellumertz is offline   Reply With Quote
Old 04-08-2023, 10:06 AM   #11
PitchSlap
Human being with feelings
 
PitchSlap's Avatar
 
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,793
Default

Neat script.

I think if the examples on the Basic Principles page were included as presets it would help a lot understanding how to use it.

A randomize function would also be cool for experimentation.
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6
PitchSlap is online now   Reply With Quote
Old 04-08-2023, 02:25 PM   #12
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by PitchSlap View Post
Neat script.

I think if the examples on the Basic Principles page were included as presets it would help a lot understanding how to use it.

A randomize function would also be cool for experimentation.
thanks for the ideas, currently I am short on time but I might think about this once I am free
daniellumertz is offline   Reply With Quote
Old 04-13-2023, 03:40 AM   #13
PitchSlap
Human being with feelings
 
PitchSlap's Avatar
 
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,793
Default

Quote:
Originally Posted by daniellumertz View Post
thanks for the ideas, currently I am short on time but I might think about this once I am free
No problem. Happy I found your scripts.
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6
PitchSlap is online now   Reply With Quote
Old 11-29-2023, 08:03 AM   #14
Schöpke
Human being with feelings
 
Join Date: Jan 2013
Posts: 134
Default

Hi Daniel,

thank you so much, this is awesome!


I was looking for something do delve into jazz with, and all of that pesky "swing" babble apparently no one can properly explain.


This could open up the entire latin american rhythmics for me, too. No wonder the good professor references cuban-american so much. (How he gets from a "rhythm" to a "major chord" is going to stay his secret though...)

My question is: Could this be used to reverse-engineer a given pattern, too? Let's say I have derived midi notes from some wave import, but I don't understand what's actually happening there.

Another question: What is the "Gap" used for?

Best, and thanks again,
Dieter
__________________
OS: Windows 7, Reaper: v6 x64
RME Babyface (old one), ASIO Fireface USB
Technics SX-P50, Mackie MCU
Schöpke is offline   Reply With Quote
Old 11-29-2023, 11:42 AM   #15
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Gap is used to group close-by notes. So they are one event. In later scripts I renamed gap to events, which convey the meaning much better, so thanks for the question.

Gap is measured in PPQ Pulses per quarter note, typically there are 960 pulses per quarter note. Using a gap of 960 will event together all notes within a quarter note, using 480 within a eight note etc... The default is 60PPQ which is a 1/64 note.

Example showing that notes with slightly offset are moving together:


About getting the pattern from a rhythm you already have, I was thinking in doing a script for that, this one currently does not. What I have done is trying to find the pattern empirically, putting some approximate values on the script and adjusting until get values that match the rhythm.
daniellumertz is offline   Reply With Quote
Old 11-29-2023, 11:52 AM   #16
Schöpke
Human being with feelings
 
Join Date: Jan 2013
Posts: 134
Default

Quote:
Originally Posted by daniellumertz View Post
About getting the pattern from a rhythm you already have, I was thinking in doing a script for that, this one currently does not. What I have done is trying to find the pattern empirically, putting some approximate values on the script and adjusting until get values that match the rhythm.

Yeah, I'm trying that already. Not easy with a hand-conducted orchestra whithout a drum set bangin'... If such a script can be done at all, I would really love to hear about it!


Best,
Dieter
__________________
OS: Windows 7, Reaper: v6 x64
RME Babyface (old one), ASIO Fireface USB
Technics SX-P50, Mackie MCU
Schöpke is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.