# Lua + Bcr2000 + Renoise - Scriptingquestion

**URL:** <https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049>\
**Category:** Beginners Questions - Renoise\
**Created:** [January 20, 2011, 1:47pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049 "2011-01-20T13:47:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis.aden](https://forum.renoise.com/user_avatar/forum.renoise.com/addis.aden/32/1450_2.png) [@addis.aden](https://forum.renoise.com/u/addis.aden)\
**Post date:** [January 20, 2011, 1:47pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/1 "2011-01-20T13:47:18Z")

</div>

Hi there

I have some “Beginnerquestions”.  
I go forward to script a tool in Lua for Live-Mixing. With this tool i want to control a whole bunch of functions in renoise.

My questions to get this tool to work ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

- Is it possible to create a complete new Track edit Patterns (notes, fxlines, timeline, play, stop …)
- Can i manage the effects for each track?
- Is there a way to edit instruments?
- can i use the bcr2000 without mapping (just communicating with the luascript)?

Thanks a lot for your help. This tool would be the main reason to get in Lua ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

cheers  
addis.aden

---

<div class="post-metadata">

**Author:** ![It-Alien](https://forum.renoise.com/user_avatar/forum.renoise.com/it-alien/32/41_2.png) [@It-Alien](https://forum.renoise.com/u/It-Alien)\
**Post date:** [January 20, 2011, 2:22pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/2 "2011-01-20T14:22:54Z")

</div>

> [@addis.aden](#):
>
> - Is it possible to create a complete new Track edit Patterns (notes, fxlines, timeline, play, stop …)

this question is actually not very clear to me. If I got what you mean, with LUA you can add patterns to the song, tracks to the patterns, columns to the tracks and change BPM

> [@](#):
>
> - Can i manage the effects for each track?

you can add effects and change their values

> [@](#):
>
> - Is there a way to edit instruments?

not all the parameters acre currently editable, but some are

> [@](#):
>
> - can i use the bcr2000 without mapping (just communicating with the luascript)?

it really depends on what you actually want to do. I can’t answer to such generic question

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [January 20, 2011, 3:27pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/3 "2011-01-20T15:27:15Z")

</div>

> [@addis.aden](#):
>
> - Is it possible to create a complete new Track edit Patterns (notes, fxlines, timeline, play, stop …)
> - Can i manage the effects for each track?
> - Is there a way to edit instruments?
> - can i use the bcr2000 without mapping (just communicating with the luascript)?

- yes
- yes
- yes
- yes

Dependency:

> [@addis.aden](#):
>
> I have some “Beginnerquestions”.

Can you code? Or are you just learning to code?

---

<div class="post-metadata">

**Author:** ![addis.aden](https://forum.renoise.com/user_avatar/forum.renoise.com/addis.aden/32/1450_2.png) [@addis.aden](https://forum.renoise.com/u/addis.aden)\
**Post date:** [January 20, 2011, 3:48pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/4 "2011-01-20T15:48:16Z")

</div>

Thank you for the request

> [@](#):
>
> this question is actually not very clear to me. If I got what you mean, with LUA you can add patterns to the song, tracks to the patterns, columns to the tracks and change BPM

This is what i need.  
Is there also a way to set/edit these notes and the effect column (for setting in example an apreggiator or a retrigger “0E03”)

> [@](#):
>
> not all the parameters acre currently editable, but some are

Hope the loop of an instrument (or sample) can edit ^^

Thats helpful. Thanks.

> [@](#):
>
> Can you code? Or are you just learning to code?

Yes I can code(Python, a lil bit of C, some pieces of Assembler(PIC) …). I am just new in Lua (Also in scripting for Renoise). I think there is a lot of capability in this way. For such scripting I tried to use puredata, but i think its more effective to use renoise instead.

This tool is an idea to get a sound or a songidea interactively and live to the crowd.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [January 20, 2011, 4:34pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/5 "2011-01-20T16:34:11Z")

</div>

> [@addis.aden](#):
>
> Yes I can code(Python, a lil bit of C, some pieces of Assembler(PIC) …). I am just new in Lua (Also in scripting for Renoise). I think there is a lot of capability in this way. For such scripting I tried to use puredata, but i think its more effective to use renoise instead.

Ok, great.

Here’s some code snippets relevant to your questions, then:

- Is it possible to create a complete new Track edit Patterns (notes, fxlines, timeline, play, stop …)

> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/PatternIterator.lua)

- Can i manage the effects for each track?

> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/TrackAutomation.lua)

- Is there a way to edit instruments?

> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/Instruments.lua)  
> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/SampleBuffer.lua)

- can i use the bcr2000 without mapping (just communicating with the luascript)?

> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/Midi.lua)  
> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk/Snippets/Osc.lua)

EDIT: These are just generic snippets, they don’t necessarily answer your questions, but will point you in the right direction. The API docs has everything you will need:

> [GitHub - renoise/xrnx: The official Renoise Lua Scripting repository](https://code.google.com/p/xrnx/source/browse/trunk#trunk%2FDocumentation)

Cheers.

---

<div class="post-metadata">

**Author:** ![kazakore](https://forum.renoise.com/user_avatar/forum.renoise.com/kazakore/32/258_2.png) [@kazakore](https://forum.renoise.com/u/kazakore)\
**Post date:** [January 20, 2011, 4:37pm UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/6 "2011-01-20T16:37:13Z")

</div>

> [@addis.aden](#):
>
> Hope the loop of an instrument (or sample) can edit ^^

This may be useful

> [@Experiment: Use Midi Knob To Set Loop Markers](https://forum.renoise.com/t/experiment-use-midi-knob-to-set-loop-markers/29587):
>
> update: this script is obsolete. please use the [XRNX version](https://forum.renoise.com/t/experiment-use-midi-knob-to-set-loop-markers/29587) try putting the following into your GlobalMidiActions.lua, located into the “Scripts” folder (at the end of the file is fine) -- BEGIN: use MIDI actions to set loop markers add\_action("Selected Sample:Loop Start [Set]", function(message) local sample = song().selected\_sample; local int\_frames = sample.sample\_buffer.number\_of\_frames; local int\_message = message.int\_value + 1; if message:is\_rel\_value() th…

---

<div class="post-metadata">

**Author:** ![addis.aden](https://forum.renoise.com/user_avatar/forum.renoise.com/addis.aden/32/1450_2.png) [@addis.aden](https://forum.renoise.com/u/addis.aden)\
**Post date:** [January 21, 2011, 1:17am UTC](https://forum.renoise.com/t/lua-bcr2000-renoise-scriptingquestion/31049/7 "2011-01-21T01:17:11Z")

</div>

Thanks a lot for your requests

Its really helpful.  
In the next days i will get involved in the luastuff ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

best regards  
addis.aden
