Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 09-06-2013, 03:43 PM   #1
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default ReaSongBuilder - create song structures (Jamstix 3 compatible)

https://stash.reaper.fm/v/17752/ReaSongBuilder.py

See Description in stash for details.

last updated 11 Sep 2013



Usage: Type a sequence of characters to create a series of regions in Reaper.

Allowed characters are IVPCBMDSQLXE, which represent the following parts...

I - Intro
V - Verse
P - Pre Chorus
C - Chorus
B - Bridge
M - Middle 8
D - Drum Solo
S - Solo
Q - Silence
L - Link
X - Breakdown
E - Ending

The lengths of the verse and chorus are set in the Settings window (see below). The length of the other parts are either absolute (Intro = 2 bars, Silence = 2 bars, Ending = 1 bar) or the same, half or double the verse length (apart from chorus of course).

Half of verse length: Link, Pre-chorus
Double verse length: Middle 8

All the rest are same as verse length.


Press R and Enter to get to the Settings window:
Tou must enter the length in bars of the offset (the number of bars before you want the regions to start drawing), the verse and the chorus here. You must also enter Y or N in the Glue Repeating Parts field. This window won't close until their are valid values for all entry boxes.

Last edited by Lazarus; 10-10-2013 at 06:37 PM.
Lazarus is offline   Reply With Quote
Old 09-07-2013, 02:02 AM   #2
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Thanks - this looks great, where do I put it?
flipotto is offline   Reply With Quote
Old 09-07-2013, 02:18 AM   #3
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

You put it in the Reaper Scripts folder. On Windows it is....

Users\USERACCOUNTNAME\AppData\Roaming\REAPER\Scrip ts

.. or if it's a portable install the Scripts folder will be in the main folder. I have no idea about where it went on a Mac.

After you put it there...

- go into the Actions window (press ?)
- click ReaScript New/Load button and choose file
- it will now be in action list, near the top.
- double click or assign shortcut to run
Lazarus is offline   Reply With Quote
Old 09-07-2013, 05:07 AM   #4
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Just realized I did not have python installed.
I did - but it was a previous os image.
Which version of python to install?
3.3.2 or 2.7.5?
flipotto is offline   Reply With Quote
Old 09-07-2013, 05:15 AM   #5
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

I have 2.7.5 installed so it definitely works with that version. I don't know much about Python so couldn't say whether there's anything in there that wouldn't work with v3.
Lazarus is offline   Reply With Quote
Old 09-08-2013, 09:03 PM   #6
A_zimuth
Human being with feelings
 
Join Date: Feb 2011
Posts: 23
Default

Absolutely brilliant idea Lazarus. The new version works perfectly and will be a huge time saver. Thank you for sharing this with your fellow Jamstix/Reaper users.

EDIT: Well I jumped the gun, it's not perfect. The script cannot generate the region length correctly if the verse or chorus has an odd number of bars. Works great otherwise.

Last edited by A_zimuth; 09-11-2013 at 01:10 AM.
A_zimuth is offline   Reply With Quote
Old 10-10-2013, 09:17 AM   #7
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Hey - how do I control length of the parts?
Meaning - how do I get the length of the bars to be corresponding to the length of the parts I'm using?

Lets say I have
into 2 bars, 1 repeat, 4/4 no sweat.
verse 1 going 13 bars, 1 repeat, 4/4.
Chorus 1 going 10 bars, 1 repeat 4/4
Verse 2 going 11 bars, 1 repeat, 4/4
chorus2 10 bars again...

Not sure how to control the length of the parts?
Is there a part of the script that will/could handle different part lengths?
flipotto is offline   Reply With Quote
Old 10-10-2013, 02:49 PM   #8
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

If you type in r and enter you can change the verse and chorus lengths in the settings window. Since the verse lengths in your example unfortunately have a lowest common denominator of 1, you'd need to change the verse length to 1 but the chorus can be set to 10. Checking the box to merge regions of the same type will then join all of the adjoining verse regions into one.

So...

IVVVVVVVVVVVVVCVVVVVVVVVVVC

... not the prettiest, but it'll work. Bear in mind that changing the verse length will also change the length of every other section apart from intro, chorus, silence and ending because they are relative to verse length.

I'm working on an massive update which will either be completed before christmas or never, but if you want to edit the script this is the only bit you need to change...

Code:
   allowedChars = "IVPCBMDSQLXE"

   # Here are all the possible sections.... A2, V1 etc = section length.                    
   # Relative lengths are same as in Jamstix 3
   # Ax =  x bars         Vx = Verse Length * x (see multipliers)      Cx = Chorus Length * x
   #
   sectionData = {'I': ['Intro'    , 'A2'],        'V': ['Verse'    , 'VS'],        'P': ['Pre-chorus', 'VH'], \
                  'C': ['Chorus'   , 'CS'],        'B': ['Bridge'   , 'VS'],        'M': ['Middle 8'  , 'VD'], \
                  'D': ['Drum Solo', 'VS'],        'S': ['Solo'     , 'VS'],        'Q': ['Silence'   , 'A2'], \
                  'L': ['Link'     , 'VH'],        'X': ['Breakdown', 'VS'],        'E': ['Ending'    , 'A1']}

   multipliers = {'S': 1, 'H': 0.5, 'D': 2}
... remembering that if you are adding or removing sections, you need to change allowedChars to reflect the changes.

--------

General note: I replied to A_zimuth on the Rayzoon forum and the issue they highlighted was fixed back then.
Lazarus is offline   Reply With Quote
Old 10-10-2013, 03:28 PM   #9
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Quote:
Originally Posted by Lazarus View Post
If you type in r and enter you can change the verse and chorus lengths in the settings window. Since the verse lengths in your example unfortunately have a lowest common denominator of 1, you'd need to change the verse length to 1 but the chorus can be set to 10. Checking the box to merge regions of the same type will then join all of the adjoining verse regions into one.

So...

IVVVVVVVVVVVVVCVVVVVVVVVVVC

... not the prettiest, but it'll work. Bear in mind that changing the verse length will also change the length of every other section apart from intro, chorus, silence and ending because they are relative to verse length.

I'm working on an massive update which will either be completed before christmas or never, but if you want to edit the script this is the only bit you need to change...

Code:
   allowedChars = "IVPCBMDSQLXE"

   # Here are all the possible sections.... A2, V1 etc = section length.                    
   # Relative lengths are same as in Jamstix 3
   # Ax =  x bars         Vx = Verse Length * x (see multipliers)      Cx = Chorus Length * x
   #
   sectionData = {'I': ['Intro'    , 'A2'],        'V': ['Verse'    , 'VS'],        'P': ['Pre-chorus', 'VH'], \
                  'C': ['Chorus'   , 'CS'],        'B': ['Bridge'   , 'VS'],        'M': ['Middle 8'  , 'VD'], \
                  'D': ['Drum Solo', 'VS'],        'S': ['Solo'     , 'VS'],        'Q': ['Silence'   , 'A2'], \
                  'L': ['Link'     , 'VH'],        'X': ['Breakdown', 'VS'],        'E': ['Ending'    , 'A1']}

   multipliers = {'S': 1, 'H': 0.5, 'D': 2}
... remembering that if you are adding or removing sections, you need to change allowedChars to reflect the changes.

--------

General note: I replied to A_zimuth on the Rayzoon forum and the issue they highlighted was fixed back then.
Thanks - so on the above part where you say the checkbox to merge parts of the same name - are you talking about a dialog from the script or in Jamstix or something I have to edit in the script?
I ran the script and did not see a checkbox - I had already created the jamstix song sheet and was trying to get the regions you mention for easier navigation of my particular song.

EDIT - got it - It must have been an older version I was using.
I see it this time on the version I just downloaded.
I will give it a try tonight.

Last edited by flipotto; 10-10-2013 at 03:32 PM. Reason: correcting an error
flipotto is offline   Reply With Quote
Old 10-10-2013, 03:35 PM   #10
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Hmmm - cancel or X does not let me close this script...
I opened the dialog but do not want to do the operation.

I then enter the info for offset verse length and chorus length and
glue repeating parts... click ok and dialog won't go away.
I have to force quit out of reaper with taskmanager (pc) because script has
focus and won't let go.
flipotto is offline   Reply With Quote
Old 10-10-2013, 03:47 PM   #11
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 284
Default

Hi
Lazarus;ReaSongBuilder is made to work with Jamstix or is possible to use it with another or for another thing?
reapertribal is offline   Reply With Quote
Old 10-10-2013, 05:15 PM   #12
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

@flipotto: Hmmm, I've just run the version that's in the stash again and it works perfectly in Python 2.7 and 3.3. I made it so you can't close the settings dialog unless there is valid input in all of the boxes but the main structure dialog should always close.

Is this with the latest version in the stash from 11 Sept? Are there any steps required to make it crash or does it do it every time you try to close?

@reapertribal: It uses the same letters Jamstix uses for Intro Verse Chorus etc and the relative lengths are the same (a Link is half the length of a Verse, a Bridge is the same length as a Verse) as are used in the Jamstix Songbuilder. It doesn't need Jamstix or anything to run, just type some letters in and it draw regions (see the code in the my post above to see the allowed letters).
Lazarus is offline   Reply With Quote
Old 10-10-2013, 05:49 PM   #13
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 284
Default

Hi



I don,t know what i am doing wrong

I could not close the GUI and i had to force Reaper to quit
reapertribal is offline   Reply With Quote
Old 10-10-2013, 05:51 PM   #14
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

Ahh, you just need to type numbers.. eg 2 instead of V2.
Lazarus is offline   Reply With Quote
Old 10-10-2013, 06:14 PM   #15
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 284
Default

Hi



Ok,the first step is overcome
Then appears a window
Song Structure <r to change setting (here is where we can write the codes
I A2
C CS
D VS
L VH......
Please,it would be nice if you did a gif tutorial with one short example to clarify the correct process of handling

Regards
reapertribal is offline   Reply With Quote
Old 10-10-2013, 06:38 PM   #16
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

I've updated the first post. The only character allowed in the text entry box are IVPCBMDSQLXE. So if you copy/paste that, all will become clear.
Lazarus is offline   Reply With Quote
Old 10-10-2013, 07:06 PM   #17
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Location: VA
Posts: 885
Default

Quote:
Originally Posted by Lazarus View Post
@flipotto: Hmmm, I've just run the version that's in the stash again and it works perfectly in Python 2.7 and 3.3. I made it so you can't close the settings dialog unless there is valid input in all of the boxes but the main structure dialog should always close.

Is this with the latest version in the stash from 11 Sept? Are there any steps required to make it crash or does it do it every time you try to close?
Ok - re downloaded and it's working.
Any way to make the last dialog bigger? If I'm putting all those repeats in there... I have to count them to make sure.

I'd be better off trying to make structures with even repeats to reduce the number of vvvv's I have to enter. Unfortunately the previous song structure had that odd number of repeats. I have much to learn about song structure and how to count...
Thanks again!
Thanks much for this.
flipotto is offline   Reply With Quote
Old 10-11-2013, 01:40 AM   #18
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 284
Default

Hi
Lazarus thank you,now it works,is a tool very useful

reapertribal is offline   Reply With Quote
Old 10-11-2013, 06:30 AM   #19
Lazarus
Human being with feelings
 
Join Date: Aug 2013
Posts: 1,355
Default

Cool, good stuff - glad you find it useful!
Lazarus is offline   Reply With Quote
Old 10-11-2013, 07:49 AM   #20
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 284
Default

Hi
Lazarus yes is very useful to save time & to create templates with different structures
Respect the gif :
Sometimes the value of a picture is bigger than thousand words
reapertribal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.