Jump to content


Photo

Tool: Write Bpm To Master Track


  • Please log in to reply
13 replies to this topic

#1 Syflom

Syflom

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1456 posts
  • Gender:Male
  • Location:Australia

Posted 21 May 2011 - 11:13

Every find yourself wanting to make a BPM automation easily? This script does it for you.
It writes the current BPM to the first column in the Master track. Although if you are in a different column in the master track it will write it there.

Set your BPM as usual then right click in the pattern editor and click the new menu option or you can create a key assignment.

Attached File  WriteBPM_2.7.0.xrnx   1003bytes   335 downloads
Attached File  WriteBPM_2.8.xrnx   1006bytes   281 downloads

Edited by Syflom, 21 December 2011 - 15:22.

  • esaruoho likes this

In the beginning was the Word
 My XRNX tools: Loop Block Size, Write BPM, Sustain Instrument
Renoise my suggestions: sample pause command, continually paste within selection, advanced edit resize
OS: Windows and OS X


#2 ungleichklang

ungleichklang

    Member

  • Normal Members
  • PipPip
  • 65 posts
  • Gender:Male

Posted 21 May 2011 - 11:25

:drummer: good idea :)
greetings from belgium, sascha

A4L-Member: http://www.audio4linux.de or in Freenode IRC-Channel #audio4linux.de (german language, but all are welcome)

#3 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 21 May 2011 - 15:41

I was wondering...

[lua]
function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 1 end
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].amount_value = renoise.song().transport.bpm
end
end
[/lua]

What if the BPM would raise 255, we solve it like this?:
[lua]
function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 1 end
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].amount_value = renoise.song().transport.bpm
else
renoise.song().transport.lpb = (renoise.song().transport.lpb*2)
renoise.song().transport.bpm = (renoise.song().transport.bpm / 2)
write_bpm()
end
end
[/lua]
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#4 Syflom

Syflom

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1456 posts
  • Gender:Male
  • Location:Australia

Posted 21 May 2011 - 16:42

That's a good idea vV. I was thinking about doing something to do with the LPB.

In the beginning was the Word
 My XRNX tools: Loop Block Size, Write BPM, Sustain Instrument
Renoise my suggestions: sample pause command, continually paste within selection, advanced edit resize
OS: Windows and OS X


#5 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 21 May 2011 - 17:45

That's a good idea vV. I was thinking about doing something to do with the LPB.


I think the LPB has to be written into the master track as well using the LPB effect command.
One might want to switch LPB values in specifica patterns if you really want to expand on tempo automation.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#6 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6723 posts
  • Gender:Male
  • Location:Borneo

Posted 21 May 2011 - 17:56

cool lill script! Thanks!

#7 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2533 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests:// Free Energy // Cymatics // Sound visualization // Sustainable energy production // Apple devices // Tesla Motors //

Posted 13 June 2011 - 20:41

Hiya, I really think Write BPM should be WriteBPM&LPB. Would really help.
I've tried to make the modification myself, but so far have not found a way of enlarging the Master track "effect column".
I have a feeling I already know it, but am too tired to put it in.
[lua]

function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 3 end
column_index = 3
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[1].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[1].amount_value = renoise.song().transport.bpm
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[2].number_string = "F1"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[2].amount_value = renoise.song().transport.lpb

end
end
[/lua]

Anyway, column_index does nothing, obviously :)
Seems like the thing is that a selected_track can have a visible_effect_columns=2 set, but getting the script to do that to the master is slightly annoying :)

P.s. ended up modifying my song template to have 2 columns on Master automatically :)

Edited by esaruoho, 13 June 2011 - 20:58.

| lackluster Website | lackluster on bandcamp | lackluster on facebooklackluster on soundcloud | esaruoho on twitter |

esaruoho@gmail.comesaruoho on reddit | esaruoho on ello | 

| OS X 10.11 El Capitan | Mac Book Pro 2.66 GHz Intel Core 2 Duo / 8GB 1067 MHz DDR3 |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;)

#8 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 13 June 2011 - 22:07

Seems like the thing is that a selected_track can have a visible_effect_columns=2 set, but getting the script to do that to the master is slightly annoying :)


There is a fairly easy way to detect what type a track is.
There can only be one master, once you know which that one is, expanding the effect columns is peanuts.

-------- Constants

renoise.Track.TRACK_TYPE_SEQUENCER
renoise.Track.TRACK_TYPE_MASTER
renoise.Track.TRACK_TYPE_SEND
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#9 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6723 posts
  • Gender:Male
  • Location:Borneo

Posted 14 June 2011 - 04:05

maybe for a future update this tool can be pimped so you can set a beginning and end bpm within a range (pattern / sequence / song?) and the tool interpolates between the set values.

I.o.w sort a like automating bpm rate through pattern commands. Something that would disable the need to make a selection in the pattern editor and interpolate through the advanced editor.

#10 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2533 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests:// Free Energy // Cymatics // Sound visualization // Sustainable energy production // Apple devices // Tesla Motors //

Posted 15 June 2011 - 02:43

There is a fairly easy way to detect what type a track is.
There can only be one master, once you know which that one is, expanding the effect columns is peanuts.

-------- Constants

renoise.Track.TRACK_TYPE_SEQUENCER
renoise.Track.TRACK_TYPE_MASTER
renoise.Track.TRACK_TYPE_SEND


Detect, yes, but if the effect_column depends on selected_track, then either I learn how to set effect_column amount to 2 on a "TRACK_TYPE_MASTER", or learn how to set selected_track to "TRACK_TYPE_MASTER".
Which method would you recommend? :)

| lackluster Website | lackluster on bandcamp | lackluster on facebooklackluster on soundcloud | esaruoho on twitter |

esaruoho@gmail.comesaruoho on reddit | esaruoho on ello | 

| OS X 10.11 El Capitan | Mac Book Pro 2.66 GHz Intel Core 2 Duo / 8GB 1067 MHz DDR3 |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;)

#11 Syflom

Syflom

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1456 posts
  • Gender:Male
  • Location:Australia

Posted 15 June 2011 - 10:44

if you looked in my code you'd see i have a function to tell you which track is master.

function get_master_track_index()
  for k,v in ripairs(renoise.song().tracks)
    do if v.type == renoise.Track.TRACK_TYPE_MASTER then return k end  
  end
end
so you could then do this line of code somewhere to change it or find out what it is. remember there are always 8 columns but they are just hidden.

show
print(renoise.song().tracks[get_master_track_index()].visible_effect_columns)

change
renoise.song().tracks[get_master_track_index()].visible_effect_columns = 2
renoise.song().tracks[get_master_track_index()].visible_effect_columns = 4

you can't set a track type as far as i know. if you think about it it makes sense why there would be issues with that.

Edited by Syflom, 15 June 2011 - 10:46.

  • esaruoho likes this

In the beginning was the Word
 My XRNX tools: Loop Block Size, Write BPM, Sustain Instrument
Renoise my suggestions: sample pause command, continually paste within selection, advanced edit resize
OS: Windows and OS X


#12 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 15 June 2011 - 15:48

Detect, yes, but if the effect_column depends on selected_track, then either I learn how to set effect_column amount to 2 on a "TRACK_TYPE_MASTER", or learn how to set selected_track to "TRACK_TYPE_MASTER".
Which method would you recommend? :)

I would recommend you to use the Syflom's iterator here. If the specific function needs to be applied to the master track, then simply write the stuff to the effect column in the master track. No need to have this track "selected" specifically.
You do need to get the selected_line index and the selected pattern index and the master track index is provided to you by Syflom's routine, from there you can change the effect-column data to your needs.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#13 Syflom

Syflom

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1456 posts
  • Gender:Male
  • Location:Australia

Posted 21 December 2011 - 15:15

Have updated the tool for 2.8 due to the changed ZTxx command.
  • KMaki likes this

In the beginning was the Word
 My XRNX tools: Loop Block Size, Write BPM, Sustain Instrument
Renoise my suggestions: sample pause command, continually paste within selection, advanced edit resize
OS: Windows and OS X


#14 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 21 December 2011 - 19:57

Have updated the tool for 2.8 due to the changed ZTxx command.


You might give it a thought for adding support for the Automation parameter for the master track. The master track is the only track that now also supports BPM, LPB and TPL changes through automation.(Automated fractional bpm :D)
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual