Fractions, Variables, etc., in Mininotation

Hi, all,

I’m writing an article for this year’s ICLC conference and have a question: In Tidal, would it be possible to put a fraction or a variable inside a control pattern? I’d like to be able to do this:

d1 $ freq "440*4" # s "superfm" |* freq "1 1.2 1.5 0.8888888888888888"

...but instead express the last three values as fractions - something like this:

d1 $ freq "440*4" # s "superfm" |* freq "1 (6/5) (3/2) (8/9)"

--but this doesn't work, nor if I try to substitute the fractions with variables:

let ratio65 = 1.2
    ratio32 = 1.5
    ratio89 = 0.8888888888888888

d1 $ freq "440*4" # s "superfm" |* freq "1 ratio65 ratio32 ratio89"

Would I have to somehow define these values as floats before I can proceed?

Thanks!

SpacepersonJ

you might try something like inhabit, although i bet you'd have to explicitly define all your custom names...it wouldn't be dynamic if you changed the fraction value without changing your inhabit def first.

1 Like

Hi @SpacepersonJ, this should work:

d1 $ freq "440*4" # s "superfm" |* freq "1 6%5 3%2 8%9"

In mininotation, % denotes a ratio (/ manipulates time)

8 Likes

Whhoooaaa! Didn't know about that, and don't know how I didn't see that into the parser code.

That will change my flow a lot! Thanks

1 Like

really cool!

Thanks, all!

@yaxu - thanks for the tip. The % trick didn't work, though - I got this message:

Error in pattern: Syntax error in sequence:
"1 6%5 3%5 8%9"
^
unexpected '%'
expecting float, "'", "w", "h", "q", "e", "s", "t", "f", rest, "[", "{", "<", "." or end of input

Is this a new feature? I haven't upgraded TC in a bit...

Thanks again,

SPPJ

i think it's 1.4.8 onwards ?

  • Add ratio shorthand to floating point patterns @yaxu
1 Like

Sorry it took so long to reply - I had a bit of trouble updating Tidal.

Wow - the ratio shorthand is incredible!!!! Thanks so much, Yaxu!!!

SPJ

1 Like