Question about reason and scripts

Have an urge to learn, or a calling to teach? Want to share some useful Youtube videos? Do it here!
Post Reply
User avatar
syzygianrrf9999
Posts: 36
Joined: 14 Aug 2018
Contact:

30 Oct 2019

Fairly simple question that probably has complicated answers, if any:

Is it possible to send a script output to reason, if that output is strictly numeric (example: i have a script that produces prime numbers in binary, so 1's and 0's... ) is there any way to "pipe" an output like this to a device in Reason? In such a way that you could rapidly generate on-off signals for a rack parameter in a unique sequence on the fly?

I'm technical so if anyone knows a way dont worry about dumbing it down.
industrial/psycore/breakcore/electronic modular metal: https://soundcloud.com/rose-red-flechette

User avatar
diminished
Competition Winner
Posts: 1880
Joined: 15 Dec 2018

30 Oct 2019

The question is, what you would like to translate your numeric pattern to - pitch, volume, note on/off or control voltage? And what does your input look like - pulses of ones and zeros? And at which frequency? A lot would be possible theoretically but your input and your target have to be compatible.
:reason: Most recent track: resentment (synthwave) || Others: on my YouTube channel •ᴗ•

User avatar
diminished
Competition Winner
Posts: 1880
Joined: 15 Dec 2018

30 Oct 2019

Code: Select all

_|¯|_|¯|____|¯|_|¯|_

__|¯¯|__|¯¯|________|¯¯|__|¯¯|__

__|_____|___________|_____|____
Plenty of ways to represent one and the same pattern...

To get back to your first question, Reason "eats" either MIDI or audio. So your script would ultimately have to output one of the two
:reason: Most recent track: resentment (synthwave) || Others: on my YouTube channel •ᴗ•

User avatar
xboix
Posts: 281
Joined: 22 Oct 2019

31 Oct 2019

Yep, it would have generate midi and feed it in to Reason. It's a bit fiddly but you can control most (but not all) stuff with MIDI CC messages.

User avatar
syzygianrrf9999
Posts: 36
Joined: 14 Aug 2018
Contact:

31 Oct 2019

Interesting - so its just a matter of finding an app or executable that will read stdout and and convert it to MIDI? I'd imagine something like that isn't just laying around and that I'd have to write alot of the regex out for myself...

Both of your responses have me optimistic so I'll cut to the chase:

I'm trying to find a way to fluidly automate the translation of a binary sequence into Reason for use by a step sequencer, pattern gate, anything Euclid-like. So I'm strictly dealing with 0's and 1's, either as on/off signals or individual gates. I already have tons of scripts that will do the first half of this, for pretty much any sequence of prime numbers in binary (I'm interested in binary correlations between primes for the sake of polyrhythms. Then I also do things like taking the kick pattern and speeding it up 8 or even 16-fold and using that as a "bass" line).

For example:

Code: Select all

sh-3.2# ./dec2bin-prime-256 | grep -x '.\{8\}' | grep -v 11
10001001
10010101
Say I wanted to keep it simple and use only values that would fit neatly into a nice 8/8 time signature - is there a way I could "queue" or "load" these numbers into Reason (perhaps by converting each bit to MIDI data, somehow) such that a device would read these as two 8/8 measures of CV/gate data or pulse/on signals and rest/off signals i.e. '10010101' = 8/8 with pulses on 1, 4, 6, and 8?

Side note: I own just about every CV utility RE released - and I've found that achieving this via the use of something like a chain of Truth/Now counting gates and Euclids is borderline impossible and extremely CPU intensive - hence my looking to see if it is something I can program myself. The few in-rack builds I've done so far have been so convoluted I find myself losing track of what each individual device is doing.
industrial/psycore/breakcore/electronic modular metal: https://soundcloud.com/rose-red-flechette

User avatar
xboix
Posts: 281
Joined: 22 Oct 2019

31 Oct 2019

This MIDI file format is pretty straightforward and could easily be generated with a script but that would not be live. You would generate the midi file then open or import it in Reason (or any other DAW). There must be libraries that will generate midi data streams but it's not something I have done. Google "text to midi converter" and you'll find a few things that do it statically which may give you a starting point.

User avatar
diminished
Competition Winner
Posts: 1880
Joined: 15 Dec 2018

31 Oct 2019

You would have to translate your binary to low frequency audio (sample&hold style), like real CV (or actually use CV) then live-feed it into reason via audio track, then use gates and thresholds and CV tools to derive your note on/off signals/triggers.
Just do yourself a favor and deactivate monitoring. And I don't know if your interface can handle the low frequencies required. I think there are special CV-compatible ones.
:reason: Most recent track: resentment (synthwave) || Others: on my YouTube channel •ᴗ•

User avatar
jam-s
Posts: 3024
Joined: 17 Apr 2015
Location: Aachen, Germany
Contact:

05 Nov 2019

I think you might want to have a look at the scripting capability of MidiOX.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Trendiction [Bot] and 1 guest