Jump to content


Photo

New Tool (3.1) xRules

midi performance live coding

  • Please log in to reply
88 replies to this topic

#51 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 24 March 2016 - 12:55

Version 0.72 has been released - download from the tools page

(fixed) missing reference to document while loading a new song
(fixed) no default message-type defined when converting from OSC (now using sysex)
(feature) high-res automation recording (use in callback, configure in options)

Since xRules can receive high-resolution data from OSC and 14-bit MIDI devices, it makes sense to be able to record automation of it's own, instead of passing it on to Renoise. By default, it will record high-resolution automation in the time domain as well as the values themselves - you can control this setting and more from the new Options > Automation panel.

 

The following example shows how you can map an(y) XYPad with TouchOSC, for quick recording using the tilt sensor 

https://gist.githubu...cf/TouchOSC.lua

 

The example above is making use of the newly added record_automationhas_automation methods (link to manual):

https://github.com/r...ADME.md#methods


  • Neurogami likes this

Tracking with Stuff. API wishlist | Soundcloud


#52 Krloff

Krloff

    Member

  • Normal Members
  • PipPip
  • 24 posts
  • Gender:Male
  • Location:Geneva

Posted 24 March 2016 - 18:45

I feel that this tool have the potential of becoming something close (and maybe more powerful) as Traktor's midi mapping features, something I've been waiting for a long time! A simple thing that would make all the difference would be a "when x = 0": with that option MIDI controllers like my launchpad pro would stay illuminated even if xrules doesn't receive any signal from the controller! PLEASE make this happend it would be so great!


#53 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 24 March 2016 - 22:21

"when x = 0": with that option MIDI controllers like my launchpad pro would stay illuminated even if xrules doesn't receive any signal from the controller

 

I don't really understand - what is x and why is it good to have it set to 0? 
Now I am confused :huh:


Tracking with Stuff. API wishlist | Soundcloud


#54 Krloff

Krloff

    Member

  • Normal Members
  • PipPip
  • 24 posts
  • Gender:Male
  • Location:Geneva

Posted 24 March 2016 - 22:58

I wasn't very clear sorry!
By x I meant any variable like note/midi channel/etc. and what I meant about the "= 0" part was to implement an option in xrules like: "when [c#5] isnt pressed on input [Launchpad Pro]" to be able to output the abscence of an action.
An example: let's say I want to have a play/pause button control. With such option, I could have a LED turned on even if the track is paused!
I dont know if I make much sense the general idea is to have a completely color coder controller even when no buttons are pressed.


#55 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 24 March 2016 - 23:58

Ah, that's absolutely possible. Assuming that the LP will output regular note messages, it would be a question of looking for a note-on and note-off message, respectively. 

Or in the case of CC's, perhaps 0 and 127? So, we are probably not talking about an absence of a message, but rather a question of what exactly to look for (remember, you can always eavesdrop on this stuff using the Renoise MIDI console... ).

 

Also, I have a classic Launchpad myself and there, you can completely disable the 'built-in' visual feedback (flashing LEDs) and stuff by pressing a special combination. Not sure if this is the case with the PRO model, though. But otherwise, I can't really see a reason how you would want to keep a light turned on, if it was not lit up in the first place.

 

But - before you go ahead and build an entire LP Pro control surface in this tool, I should probably tell you that the technology powering xRules will eventually be ported into Duplex. And that tool is based on the idea of having visual feedback and building entire "applications" around it - from bread and butter stuff like automapping mixing consoles to quirky sequencers and more. Because, with a grid controller you very quickly go into territory where you would want it to do more than lighting up the button you just pressed. And while it is theoretically possible to recreate something like a game of tetris in xRules, I wouldn't recommend it  ^_^

 

For me personally, xRules is fitting a niche that I found was missing, and at the same time, for budding scripters is an awesome way to test stuff without having to create a whole tool for just a few lines of code. 


Edited by danoise, 25 March 2016 - 00:07.

  • pat likes this

Tracking with Stuff. API wishlist | Soundcloud


#56 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 25 March 2016 - 13:36

Added an example of how to use Mackie Protocol with xRules:

https://gist.githubu...%20Protocol.lua

 

The example was tested with iCON iControls, and features basic control of mixer tracks 1-8 (volume levels, mute/solo) plus master track (9th fader)


Tracking with Stuff. API wishlist | Soundcloud


#57 Krloff

Krloff

    Member

  • Normal Members
  • PipPip
  • 24 posts
  • Gender:Male
  • Location:Geneva

Posted 25 March 2016 - 16:20

But - before you go ahead and build an entire LP Pro control surface in this tool, I should probably tell you that the technology powering xRules will eventually be ported into Duplex. And that tool is based on the idea of having visual feedback and building entire "applications" around it - from bread and butter stuff like automapping mixing consoles to quirky sequencers and more. Because, with a grid controller you very quickly go into territory where you would want it to do more than lighting up the button you just pressed. And while it is theoretically possible to recreate something like a game of tetris in xRules, I wouldn't recommend it  ^_^

 

I understand. This is very exciting! I can already imagine the possibilities! (And yes the Launchpad Pro can disable internal LED feedback like the regular Launchpad)
 


  • danoise likes this


#58 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 584 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 26 March 2016 - 06:32

Very very slick. I just started playing around with out, trying to understand the OSC part.

I have examples that react to an OSC message, but the associated function gets invoked three times.

For example, if you uncomment the rprint in the TouchOSC example, the values get printed three times (in the scripting terminal window).


BTW, there's a typo in that script, a missing closing paren on the line with :
 

x = xLib.clamp_value(x,0,1)

Very sweet tool though!



#59 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 26 March 2016 - 10:25

The missing parenthesis is obviously a typo, thanks for noticing.

I will be back from a small easter holiday next friday, so if someone wants to test, please replace that ruleset with the version located here)

 

Btw: that gist above is using the new output format, where multiple lines of text are declared with [[double square brackets]]. To me, this seems much more readable, and you can copy/paste functions without having to replace /n linebreaks. I have found that 'mining' rulesets for functions is quite useful, and this little change makes it so much easier...

 

I have examples that react to an OSC message, but the associated function gets invoked three times.

 

Weird, are you sure you're not mistaking number of invocations for the value itself (it comes with three parts) ?

Perhaps I have probably overlooked something... You know, TouchOSC sends out a constant stream of messages so it's quite easy for a detail like that to get drowned out in all the noise. But while testing with my monome, I am pretty sure that this didn't happen. 

 

Edit: I just checked - if I disable tilt sensor (to avoid drowning in data) and just look for a basic pattern such as a pressed button, things work as they should. 

Makes me wonder if you tested this with a similar source - TouchOSC on iOS?

 

--

 

Another thing that I would like to hear your opinion on (or someone else who works with OSC on a regular basis):

 

Right now, an OSC input pattern can specify the "pattern" and "values", with the latter being able to use wildcards or literal values. It's nice and flexible, but often, you also encounter a bunch of patterns that are so similar that it would be nice to be able to apply wildcards to the pattern itself.

 

For example, the TouchOSC layout called 'Simple' defines a number of buttons on the second page as having these paths: /2/push1,/2/push2,/2/push3 and so on...

 

When pressing one of these buttons, the first value is set. For example

-- pressed 
/2/push1 1

-- released
/2/push1 0

So, while you could create a condition for each of these patterns, the xRules UI would get quite crowded. And even if we are talking about just 16 buttons, it's a repetitive task that no-one would enjoy (as a sidenote, Duplex doesn't have this problem, as we are using control-map files)

 

A simple solution would be to allow wildcards as part of the pattern (the path-like segment), and then capture whatever value is specified there. 

-- capture button index and state
/2/push%i %f

I considered making it an asterisk style wildcard. But I think it's good to be as specific as possible - the pattern above is specifying an integer value, so it wouldn't accidentally capture a pattern like /2/push/more

 

Another reason it's good to be specific is that, with integer values xRules can improve response time by caching the results.


Edited by danoise, 26 March 2016 - 12:17.

Tracking with Stuff. API wishlist | Soundcloud


#60 Akiz

Akiz

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 966 posts
  • Gender:Male

Posted 26 March 2016 - 13:11

Hi,

when i select my midi controller (korg taktile) Xrules writes out this - ive deactivated my midi controller in renoise midi and ive enabled OSC - no difference. 

btw.maybe this is reason why Noodletrap doesnt see my Korg Taktile?

gbug.png



#61 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 26 March 2016 - 13:25

when i select my midi controller (korg taktile) Xrules writes out this 

 

That's a timing clock message - haven't added support for that yet, sorry. 

But perhaps it would be better for the tool to ignore unsupported messages instead of throwing an error?

 

Changing the following line simply into "return" should do the trick:

https://github.com/r...iInput.lua#L473

 

Btw: the taktile showing up in xRules, but not in Noodletrap is indeed strange. But the tools are not sharing any code, so we need to look at that separately. 


  • Akiz likes this

Tracking with Stuff. API wishlist | Soundcloud


#62 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 584 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 26 March 2016 - 18:00

Weird, are you sure you're not mistaking number of invocations for the value itself (it comes with three parts) ?
Perhaps I have probably overlooked something... You know, TouchOSC sends out a constant stream of messages so it's quite easy for a detail like that to get drowned out in all the noise. But while testing with my monome, I am pretty sure that this didn't happen. 
 
Edit: I just checked - if I disable tilt sensor (to avoid drowning in data) and just look for a basic pattern such as a pressed button, things work as they should. 
Makes me wonder if you tested this with a similar source - TouchOSC on iOS?


I'm using a command line tool I wrote to send OSC.

I just retried it. I don't see the duplicate output for the TouchOSC example, but I do see double output for my own, which are essentially the same (respond to a specific OSC pattern).

Is there some setting that might have the side effect of a rule being invoked more than once?

I added a simple rule to the TouchOSC set and it to behaves fine. Seems there's something about my own rule set that has rules getting triggered more than once.

I'll poke around some more.

#63 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 584 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 26 March 2016 - 18:14

Right now, an OSC input pattern can specify the "pattern" and "values", with the latter being able to use wildcards or literal values. It's nice and flexible, but often, you also encounter a bunch of patterns that are so similar that it would be nice to be able to apply wildcards to the pattern itself.
 results.


What is this syntax:
 
/space %n:bar
I understand up to the colon. But what is the part after the colon? What's "bar"? How does that work?

 

For example, the TouchOSC layout called 'Simple' defines a number of buttons on the second page as having these paths: /2/push1,/2/push2,/2/push3 and so on...
 
When pressing one of these buttons, the first value is set. For example

-- pressed 
/2/push1 1

-- released
/2/push1 0
So, while you could create a condition for each of these patterns, the xRules UI would get quite crowded. And even if we are talking about just 16 buttons, it's a repetitive task that no-one would enjoy (as a sidenote, Duplex doesn't have this problem, as we are using control-map files)
 
A simple solution would be to allow wildcards as part of the pattern (the path-like segment), and then capture whatever value is specified there. 
-- capture button index and state
/2/push%i %f
I considered making it an asterisk style wildcard. But I think it's good to be as specific as possible - the pattern above is specifying an integer value, so it wouldn't accidentally capture a pattern like /2/push/more
 
Another reason it's good to be specific is that, with integer values xRules can improve response time by caching the results.


I like this. I prefer, for example, OSC of the form "/track/%n/pattern/%n/randomize" instead of the less-clear "/track/pattern/randomize %n %n"

Using the data-type specific wildcard makes it easier to understand what's expected, too.

#64 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 584 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 26 March 2016 - 20:28

A follow-up on my "duplicate triggering":

I created a new rule set, added a simple OSC rule that called a function to print a message. When I send the matching OSC message I see the message twice.

I then shut down Renoise and copied the rule set file into the "examples" folder, and renamed it to avoid a conflict. I edited that file to respond to a different OSC pattern, but left it otherwise the same.

I then restarted Renoise and imported that copied rule set file. I sent OSC for this copied rule set, and the matching function is only triggered once.

So, if I create a rule set via the GUI it seems to get triggered twice. But if created as a file and then imported, it works as expected.

It's not the folder; I tried again, this time just copying the original file in place (and renaming and editing the OSC pattern) and then importing it. Works fine.

I wonder if the tool is reloading the rule set from file as well as having it in memory (or something) from being created via the GUI, and therefore it runs twice.

Edited by Neurogami, 26 March 2016 - 22:00.


#65 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 30 March 2016 - 21:13

@Neurogami: thanks a lot for your detective work, it's really appreciated! I have an idea about what could be the problem, looking forward to trying it out..

What is this syntax: 

/space %n:bar
Oh, it's quite simple - it's a display name you can choose to assign to a value - if you want. Once assigned, xRules can use this name to present more intuitive choices e.g. in the list of aspects
MIDI become these display names automatically, e.g. when you choose a note message, 'note' and 'velocity' are nothing more than display names. With OSC, things are of course not so simple...
  • Neurogami likes this

Tracking with Stuff. API wishlist | Soundcloud


#66 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 12 April 2016 - 20:04

New version out - xRules v0.75
 
This release contains primarily a number of bug fixes for the OSC side of things, as reported by Neurogami.
It should now be much more reliable when cooking up rulesets in realtime, and not just when loading from disk.
 
Also, I've applied some polish to the MidiInput class, where NRPN interpretation had a few edge cases. 
(feature) xTransport - extended control of the Renoise transport
(feature) xParameter - control parameters using relative MIDI messages
(feature) condition: show a text input when matching by string 
(feature) conditions: compare float values with variable precision 
(usability) when showing ruleset options (“more”), automatically select first active tab
(tweak) MidiInput no longer throws errors when receiving unrecognized message
(fixme) MidiInput: 7-bit NRPN messages - numbers were wrong size
(fixme) MidiInput: 14-bit CC with number #0 was treated as 7bit
(fixed) OscRouter: patterns without values match similar patterns with values 
(fixed) OscPattern: “multiple rules responding to one message” - caching bug fixed 
(fixed) newly created OSC rules either run twice or not at all 
(fixed) maintain pattern/route mappings when adding/removing rules 
(fixed) sporadic errors when removing rules/rulesets while receiving messages

  • slippycurb likes this

Tracking with Stuff. API wishlist | Soundcloud


#67 slippycurb

slippycurb

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 515 posts
  • Gender:Male
  • Location:Ireland Co Galway
  • Interests:My interests change from day to day, but i always like eggs.

Posted 12 April 2016 - 20:36

thank you kindly!


"No one would have believed, in the last years of the nineteenth century, that this world was being watched keenly and closely by intelligences greater than man's and yet as mortal as his own;"


SuckOnThisElectronicEgg


https://www.facebook...ristiansvslions

#68 iseeclouds

iseeclouds

    Member

  • Normal Members
  • PipPip
  • 51 posts
  • Gender:Not Telling
  • Location:Belgium

Posted 13 April 2016 - 22:03

I noticed one of my rules doesn't work anymore in the latest update.

 

when message type not equal to controller change

and number between ... and ...

then output_message to internal_raw

 

In version 0.65 this works. But in the latest update I stop getting logs when adding the second line about numbers. Already compared the preferences.



#69 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 14 April 2016 - 15:27

I noticed one of my rules doesn't work anymore in the latest update.

 

Thanks, this was an easy fix. I've done some testing and released a new version

(fixed) numeric comparisons accidentally got broken in v0.75
(tweak) longstring support for clipboard export (more readable)

Tracking with Stuff. API wishlist | Soundcloud


#70 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 11 May 2016 - 13:57

New release (v0.77) - including an example of how to do "parameter automapping". 

Download from tools page

 

Here is the description of the new rule: 

-------------------------------------------------------------------------------------
AUTOMAPPING OF DEVICE PARAMETERS
(and record automation, pass messages on to Renoise)
-------------------------------------------------------------------------------------

This ruleset will listen to a specific CC message (1, or mod-wheel),
and apply the value to the selected parameter in Renoise. All other 
messages will be forwarded to Renoise (so, still useful). 

Automation recording is performed automatically when the 
parameter is automatable and edit mode has been enabled. 

## How to select a target parameter 

1. In Renoise, while the lower DSP automation lane is visible, the
currently selected parameter becomes the target

2. Else, we target the _first visible parameter_ of the selected device 
in the Mixer tab (whether this tab is visible or not). This makes it easy 
to provide a 'fallback' parameter, simply by right-clicking the device

Of course, mod wheel (CC#1) is just an example. You can change it to whatever you like. 


Tracking with Stuff. API wishlist | Soundcloud


#71 kopias

kopias

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 154 posts
  • Gender:Male
  • Location:Łask, Poland

Posted 10 August 2016 - 09:28

just tryed v0.77 on linux:

usual upper case bug :)

just change filename "vCellTextfield.lua" to "vCellTextField.lua"

 

is xrules good for this scenario?:

i have a processing.org osc server listening

just want to send some message

(for example signal follower output value)

to control visuals in processing

(some basic music visualisation)

 

just want to ask before going exploring/reading about xRules


Edited by kopias, 10 August 2016 - 09:29.


#72 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 10 August 2016 - 10:50

Yes, the same bug you've reported before. Will fix it for all my tools, thanks! 

 

As for what you suggest - not possible with this tool ATM. It's processing external input only, not monitoring Renoise internals. 

Not that I have some stubborn idea that it's not 'supposed' to do such a thing. It just hadn't occurred to me. 

 

Obviously, something to consider for the next version  ^_^


Tracking with Stuff. API wishlist | Soundcloud


#73 Akiz

Akiz

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 966 posts
  • Gender:Male

Posted 28 August 2016 - 15:13

Ive bought Volca FM some days ago, amazing thing!
But it lacks velocity, or touch sensitivity to be right.

The way how you can solve it is mapping your midi velocity to CC41 on Volca FM.

In standard daw you can use tool that is called midi notes to CC from Piz. It is amazing because it transmits velocity for every note individually even if you play chords.

Renoise doesnt support this midi plugin (or midi routing to be precise) so ive mapped VELOCITY TRACKER into CC41 by midi instr automatization device. It works great for monophonic sequencing! But it doesn´t support polyphony sensitivity, if the notes are played in the same time, all notes have the same velocity. 

Do you think that your tool can simulate what midi notes to CC from Piz does? It would be great! 
I suppose that velocity tracker device doesnt work for every note individualy if they are on the same row.

Thank you!


Edited by Akiz, 28 August 2016 - 15:15.


#74 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6330 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 29 August 2016 - 14:28

xRules can't make this a reality as it only cares about processing messages as they arrive. 

But it's absolutely possible using Renoise 3.1 - it does support MIDI routing ^_^  

 

First, insert an instrument that listens for the specified MIDI input and add the midiNotesToCC as plugin. 

Then, create another instrument which is connected to the MIDI output port and select that instrument as the target for the piz plugin (Plugin > Midi Routing)

 

I just checked, and it seems to work. Also, the midiNotesToCC plugin is clever enough to have a "thru" mode which send the note after the CC messages. 


Tracking with Stuff. API wishlist | Soundcloud


#75 Akiz

Akiz

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 966 posts
  • Gender:Male

Posted 29 August 2016 - 15:54

Thanks a lot!
But i cant replicate it.

I can insert MidiNotesToCC as FX plugin on the track or inside the plugin, not as a instrument
and i dont know how route it into the second instrument with the midi output.

Help me there please
and sorry for offtopic


Edited by Akiz, 29 August 2016 - 16:07.






Also tagged with one or more of these keywords: midi, performance, live coding