Jump to content


Photo

xRules or other tool? For Novation Launchpad MK2 with Renoise.


  • Please log in to reply
15 replies to this topic

#1 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 10 February 2017 - 12:10

Recently I've bought a novation launchpad Mk2.
And I've downloaded the most recent version of renoise.
I got this all connected to my korg kronos Mk2.
 
So the setup is as follows:
 
Sound output of my computer by Korg Kronos Headphones.
Midi: Novation Launchpad.
 
And I've setup xRules to echo.
 
But now I'd like to do the following thing:
 
(I've separated them to different possibilities and I'd love to be able to execute on of them at a time.
Not all at once.)
 
Possibility a)
 
Triggering different samples using Novation Launchpad
 
Possibility B)
 
Playing different notes of different instruments using Renoise.
For example first ROW of buttons on my Launchpad plays Midi Instrument on Channel 1 
(like on scale, First Button could be A, Second B, Third C, Fourth C#, Fifth D and so on)
 
second ROW of buttons plays Midi Instrument on Channel 2
(like on scale, First Button could be A, Second B, Third C, Fourth C#, Fifth D and so on, equal to before)
 
third ROW of buttons plays Midi Instrument on Channel 2
 
WHY Do I wanna do this?
 
Because I'd love to play some song setups with my Korg Kronos and want to trigger some sounds (also pre setup in Renoise)
to add the salt to the soup of playing with my korg kronos.
For example Snares, SoundFX or sampled sequences 
 
Got the point?
 
Hope someone can help.
 
I guess the way to go is XRules.
 
But only thing I accomplished yet is to play notes on my korg kronos for any setup instrument using my Launchpad.
 
Thanks for help in advance.
 


#2 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 10 February 2017 - 15:17

I have the classic Launchpad, and it's laid out like this:

First row are notes C-0 to G-0 (in MIDI, the second byte would be 0x00 - 0x07)
Second row is E1-B1 (in MIDI, 0x10-0x17)
etc.

So in xRules, for each instrument you want to control you could set up a rule like this:
 

WHEN message_type equal_to note_on
OR message_type equal_to note_off
AND note between C-0 and G-0
THEN
set_instrument to [your instrument]
output_message internal_auto

The "internal_auto" output is the type of output that allows routing to tracks and instruments (unlike "internal_raw", that just sends plain MIDI data).

To achieve this, xRules is using the OSC server in Renoise. You need to enable this in Renoise prefs, and make sure that xRules is set to the same port.
 


  • dr4g0n76 likes this

Tracking with Stuff. API wishlist | Soundcloud


#3 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 14 February 2017 - 01:59

Unless I figured it out completely, this is one of the first results I got: 

 

 

Thanks DaNoise. Your answer already had helped a lot.

But it seems not to be always working.

When I can reproduce what happens I will write an update here. :-)

 

Cheers. :-)



#4 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 16 February 2017 - 00:28

I have the classic Launchpad, and it's laid out like this:

First row are notes C-0 to G-0 (in MIDI, the second byte would be 0x00 - 0x07)
Second row is E1-B1 (in MIDI, 0x10-0x17)
etc.

So in xRules, for each instrument you want to control you could set up a rule like this:
 

WHEN message_type equal_to note_on
OR message_type equal_to note_off
AND note between C-0 and G-0
THEN
set_instrument to [your instrument]
output_message internal_auto

The "internal_auto" output is the type of output that allows routing to tracks and instruments (unlike "internal_raw", that just sends plain MIDI data).

To achieve this, xRules is using the OSC server in Renoise. You need to enable this in Renoise prefs, and make sure that xRules is set to the same port.
 

 

Thanks by the way, I tried to put it in and I see like renoise is playing the notes. But it's not switching like I understood from your description.

 

What I basically wanna do is (maybe the WHY part is missing, sorry for that. :-)

 

1.) First Iteration:
Playing normally on my korg kronos MKII and using the launchpad to trigger some additional instruments.
And I can completely put in what you showed me, the lua engine says no syntax error.

 

This means in Renoise is no instrument selected in the instrument panel. But launchpad is still triggering the instrument like programmed using xrules.

Why I wanna do this? 

 

Because I don't want the korg kronos to trigger any notes on renoise. But the launchpad.

So I have the opportunity to select them by myself. :-)

 

 

2.) Second Iteration would be:

Playing normally on my korg kronos MKII too and then trigger different patterns. 

There is at least the possibility to use the full grid pie in duplex, which I tried with more or less good results.
Don't think Duplex is not capable. Only I have to learn more about that. ;-)

 

And the other possibility I guessed would be to have 

 

a) the possibility to trigger and transpose patterns/tracks on the fly using the launchpad as well. (Could use the notes between like you showed me)
Is xRules capable of switching patterns? 

 

B) the possibility to trigger notes like before. 

 

Cause this would be awesome for live performances. 

 

Thanks for answering.

 

And thanks for all the value you're giving. Danoise.

It's a pleasure to me. :-)

 

Have a noise weak. ;-) (nice week). 

 

 

 

P.S.: If something needs to be done it is not capable of doing yet, just point out I'll try to implement it and when it works share here.


Edited by dr4g0n76, 16 February 2017 - 00:41.


#5 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 16 February 2017 - 00:51

I have the classic Launchpad, and it's laid out like this:

First row are notes C-0 to G-0 (in MIDI, the second byte would be 0x00 - 0x07)
Second row is E1-B1 (in MIDI, 0x10-0x17)
etc.

So in xRules, for each instrument you want to control you could set up a rule like this:
 

WHEN message_type equal_to note_on
OR message_type equal_to note_off
AND note between C-0 and G-0
THEN
set_instrument to [your instrument]
output_message internal_auto
The "internal_auto" output is the type of output that allows routing to tracks and instruments (unlike "internal_raw", that just sends plain MIDI data).
To achieve this, xRules is using the OSC server in Renoise. You need to enable this in Renoise prefs, and make sure that xRules is set to the same port.

 

 

I've added another configuration I did for only one note C-6

But I've still to select an instrument in Renoise for it to work. This makes either no sense or I got something completely wrong.

 

configuration.png



#6 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 23 February 2017 - 21:26

*Push* ;-)

 

First @Danoise: thanks for all the work you do and did. Because I know it's sometime an exhausting job and always a lot of work to create stuff.
And the stuff you create is amazing. I appreciate that very highly.

 

@All Hello guys. I'd still love to know. 

 

Did anyone figure this out how to play the samples in renoise with a launchpad?

For example assigning each button another sample/vst? 

 

What I also did, is a C# Launchpad Implementation now. Because I am on my way to implement that myself. If not possible without. 

 

P.S.: I only got this still to work with the sample/vst that is actually focused. And then my kronos does always play the notes. I just like to play different several samples (vsts) with the launchpad at the same time.

 

Intended to do a live performance like playing the kronos and then using the launchpad to "launch" samples like swooshes, fx and so on. 



#7 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 24 February 2017 - 18:41

Hi dr4g0n76,  

seems I overlooked your question.

 

But I've still to select an instrument in Renoise for it to work. This makes either no sense or I got something completely wrong.

 

No, you're right - this is not how it's supposed to work. 

 

Seems that, for whatever reason, configuring the instrument index "visually" (via dropdowns and value inputs) is broken for the instrument property. 

But you can still paste in a bit of lua and it will work (I just tested). 

 

Try adding a call_function before output_message:

__xmsg.instrument_index = 1 -- your instrument #

Note that instruments in the Lua API start from 1, while they are counted from 0 in the Renoise GUI.


Tracking with Stuff. API wishlist | Soundcloud


#8 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 25 February 2017 - 19:53


Try ing to add a call_function before output_message, like you suggested in here:

__xmsg.instrument_index = 1 -- your instrument #

That did the trick. 

 

Woooooooooooooooooooooooooaaa. I am so happy. Thanks.  :D


  • danoise likes this

#9 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 08 March 2017 - 15:40

 

Try ing to add a call_function before output_message, like you suggested in here:

__xmsg.instrument_index = 1 -- your instrument #

That did the trick. 

 

Woooooooooooooooooooooooooaaa. I am so happy. Thanks.  :D

 

And this is one of my first tries implementing this:

(Still need to practice)


  • danoise likes this

#10 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 16 March 2017 - 18:55

One question seems to be left at the moment though.

 

Now I'd love to extend on it.

 

How can I make the launchpad play two notes? I.e.

 

I don't know which command to apply in call section.

For example I'd like to play

 

interval of thirds

or chords.

 

But since I am already playing using left and right hand, I want the launchpad to pressing notes down.

 

Best case would be:

 

Pressing key on launchpad (Triggers chord for example - 3 notes - note down and holding)

Pressing exactly same key (Stops exactly this chord)

 

Why I don't prefer just a simple note off? Easy. Because then it can transfer smoothly from one chord to another. And pressing the same key twice is easy on Launchpad.

 

So I am just missing out how to play a note.

 

----------------------------------------------------------------------

 

If all this is documented I could just look it up. Didn't find the information yet.

 

Would be awesome as well if somone could do this with Duplex (dunno if possible) or can spend some buttons for xrules.
No, danoise, don't want you to do that in this case. I'd just like to know how. Using xrules so to say on a custom created renoise interface.

Is that possible?

 

If not, the possibility shown here are definitely usable. :-)

 

Just need to get the hang of the commands and their programming.
 



#11 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 16 March 2017 - 22:18

No, danoise, don't want you to do that in this case

 

 

Aaaaw...  :( ...  ok then  :P

 

But, seriously, it would be a dream to combine these two powerful tools.

And also, a tool which made it easy to explore the circle of fifths. 

 

I would look to this one for inspiration: 


Tracking with Stuff. API wishlist | Soundcloud


#12 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 17 March 2017 - 13:16

Aaaaw...  :( ...  ok then  :P

 

But, seriously, it would be a dream to combine these two powerful tools.

And also, a tool which made it easy to explore the circle of fifths. 

 

I would look to this one for inspiration: 

 

This looks like absolutely something that should be done. Love it. Thanks for pointing it out. :-)

 

One question: 

 

Do we have to use only lua exclusively?

Or Is it possible to access lua in Renoise using C#?

 

Because if it is possible to access lua in Renoise with C# I'd promise I could flood this app with useful tools.

I got a lot in mind.

With using lua I am slow (can't even tell how long it would take). 

With using C# I could even do iterations of those apps daily.

 

Ok, no matter which one will be left (I guess it's lua only...)

I'll give it a try. :-)  And making a renoise soundprism. :-)

 

(P.S.: Just had a quick look if anything is found searching for

 

Renoise C# 

 

in google.



#13 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 17 March 2017 - 13:31

Additional information:

 

Maybe it would be also a good idea to use this approach:

 

C# Midi Toolkit

 

This is done in FBP (Flowbased programming) and it's customizable. What would this mean?

 

messageflow.png

 

If we make this work I guess we'd have the following advantages:

 

We can use XRules to do the basic rules for midi.

We can use the "Renoise Prism" (That would by my part then derived from soundprism. ;-) to do basically everything that it could do.

And when we manage to integrate the FBP, that means we can plugin anything we want into the queue.

 

Wooow. This sounds terrific. :-)



#14 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 17 March 2017 - 15:07

Hi again :-)  

 

Because if it is possible to access lua in Renoise with C# I'd promise I could flood this app with useful tools.

 

I can understand if you're comfortable with something else - but if you really want to take control of Renoise - do more than what can be done by handing over MIDI message - it's going to be through the Lua API in one way or the other. 

I think it's important to point out that the Lua API isn't necessarily "either or". You could come up with some kind of hybrid approach too - for example, putting together a sound-prism-alike thing in C#, with logic/UI and everything, and then just use the Lua API to trigger notes*. Obviously, a side benefit of this would be that the software you wrote would not necessarily be bound to Renoise. 

 

* For such remote control of Renoise we are spoiled with choices: there's this very slick library and similarly, the lua HTTP library that comes bundled with Renoise. 

And then we've got the internal OSC server in Renoise. Of special interest, how OSC can be used to evaluate snippets of lua code on the fly.


Tracking with Stuff. API wishlist | Soundcloud


#15 dr4g0n76

dr4g0n76

    Advanced Member

  • Normal Members
  • PipPipPip
  • 86 posts

Posted 03 May 2017 - 16:02

Thanks for pointing out the libraries and stuff and I gave it already few tries. But then suddenly had to move and was sick until now. No excuse.
Just facts. Sometimes you have to deal with surprises in a foreign country. ;-)

So now I'd like to know one thing more before I going on to write such a tool.

 

I could figure out at least three ways to integrate a control into Renoise using C#. All having different advantages and disadvantages.
So I will continue on one of this paths. :-) Thanks for pointing that out.

But what I couldn't figure out:

How do I play two notes at once using the approach given you ?

Do I need to set the rules twice for each note I want to play?

I think the better approach would be to play to notes in one. If you know what I mean.

 

 

 

I can understand if you're comfortable with something else - but if you really want to take control of Renoise - do more than what can be done by handing over MIDI message - it's going to be through the Lua API in one way or the other. 

I think it's important to point out that the Lua API isn't necessarily "either or". You could come up with some kind of hybrid approach too - for example, putting together a sound-prism-alike thing in C#, with logic/UI and everything, and then just use the Lua API to trigger notes*. Obviously, a side benefit of this would be that the software you wrote would not necessarily be bound to Renoise. 

 

* For such remote control of Renoise we are spoiled with choices: there's this very slick library and similarly, the lua HTTP library that comes bundled with Renoise. 

And then we've got the internal OSC server in Renoise. Of special interest, how OSC can be used to evaluate snippets of lua code on the fly.



#16 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 03 May 2017 - 17:24

How do I play two notes at once using the approach given you ?

Do I need to set the rules twice for each note I want to play?

 

If you're ever planning to trigger multiple notes from a single incoming note, you need to think about implementing a voice-manager of some kind. Either on the Renoise side, or in your C# "backend". 

Such a thing is required to keep track of where voices got triggered, so we can issue a "release" message as well. Otherwise, those notes will stick around forever (hang).

 

This gets a lot more hairy once you consider that the track where the note(s) got triggered is part of that equation, and that those tracks can be moved around by the user during playback.

Fortunately, xLib already has a voice manager that takes care of most, if not all, of these edge cases. However, xRules is not making use of it yet (it's used in another of my tools, xStream, though. A bit ironic, since xRules was actually the reason I wrote that class in the first place, but, hm, well that's how it sometimes goes).  

 

Now I'm of course trying to consider every possible pitfall. But a much simpler voice-manager would surely work too. Food for thought  :ph34r:


Tracking with Stuff. API wishlist | Soundcloud