Updated 11/11/2021 Jamstix 4 Reaper Regions script
-
Azimuth (Archive)
- Posts: 1675
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
[img:27a13a7cd7]https://i.imgur.com/wrraGa3.gif[/img:27a13a7cd7]
[b:27a13a7cd7][size=18:27a13a7cd7][color=red:27a13a7cd7]Please Read The Edit Notes[/color:27a13a7cd7][/size:27a13a7cd7][/b:27a13a7cd7]
Hi everyone,
Back in May (I think) I wrote a LUA script for use in Reaper to convert specific midi notes in Jamstix to Regions. I decided to update it to take advantage of Jamstix 4's new Song Structure export feature. This resulted in a much more straight forward procedure. (No more manually adding midi notes) This new version no longer supports Jamstix 3. Requires Reaper 5+. SWS extensions (used here) also allows auto coloring of the regions.
Thank you Ralph for supporting my idea.
1) Shift+Drag the song title into Reaper.
2) Click "CANCEL" when the Reaper Import window appears.
3) Use the shortcut key you assigned to the script in Reaper.
4) Click OK
If you make a mistake in the process, just run the script again. It will delete all of the existing Song Markers and Regions and recreate them.
[b:27a13a7cd7]EDIT:[/b:27a13a7cd7] If you change your song structure, shift+drag the song title again to recreate Jamstix.mid with the new structure.
[b:27a13a7cd7]EDIT 2:[/b:27a13a7cd7] Updated the error message in the script.
[b:27a13a7cd7]EDIT 3:[/b:27a13a7cd7] Updated the code so the jamstix.mid file is located correctly. [b:27a13a7cd7][color=red:27a13a7cd7]The Windows File Explorer window no longer opens to locate the file as shown in the .gif.[/color:27a13a7cd7][/b:27a13a7cd7]
[b:27a13a7cd7]EDIT 4:[/b:27a13a7cd7] Updated to stop script from adding extra unneeded track(s).
[b:27a13a7cd7]EDIT 5:[/b:27a13a7cd7] Updated to return to previous TCP view after running.
[code:1:27a13a7cd7] function msg( _ )
reaper.ShowConsoleMsg( _ .. "\n")
end
delete = reaper.NamedCommandLookup( "_SWSMARKERLIST10" )
convert = reaper.NamedCommandLookup( "_SWSMARKERLIST13" )
local isthere
isthere = false
isthere = reaper.file_exists("C:\\ProgramData\\Jamstix4\\jamstix.mid")
reaper.Undo_BeginBlock()
if isthere == false then
reaper.Main_OnCommandEx( 40697, -1, 0)
msg(" [1] Please build your song in Jamstix first. \n \n [2] If you have already built your song, then shift+drag the Song Sheet [Song Title] \n into the Reaper window. \n \n [3] If you change your song structure, shift+drag the Song Sheet [Song Title] again \n to re-generate, reflecting the new changes.")
goto quit
else
reaper.Main_OnCommandEx( 40042, -1, 0)
reaper.Main_OnCommandEx( 40297, -1, 0)
reaper.Main_OnCommandEx( delete, -1, 0)
reaper.Main_OnCommandEx( 40702, -1, 0)
reaper.InsertMedia("C:\\ProgramData\\Jamstix4\\jamstix.mid", 0)
end
reaper.Main_OnCommandEx( convert, -1, 0)
reaper.Main_OnCommandEx( 40005, -1, 0)
reaper.Main_OnCommandEx( 40042, -1, 0)
reaper.Main_OnCommandEx( 40848, -1, 0)
::quit::
reaper.Undo_EndBlock( "Azimuth_Jamstix 4 Regions", -1 )
[/code:1:27a13a7cd7]
[b:27a13a7cd7][size=18:27a13a7cd7][color=red:27a13a7cd7]Please Read The Edit Notes[/color:27a13a7cd7][/size:27a13a7cd7][/b:27a13a7cd7]
Hi everyone,
Back in May (I think) I wrote a LUA script for use in Reaper to convert specific midi notes in Jamstix to Regions. I decided to update it to take advantage of Jamstix 4's new Song Structure export feature. This resulted in a much more straight forward procedure. (No more manually adding midi notes) This new version no longer supports Jamstix 3. Requires Reaper 5+. SWS extensions (used here) also allows auto coloring of the regions.
Thank you Ralph for supporting my idea.
1) Shift+Drag the song title into Reaper.
2) Click "CANCEL" when the Reaper Import window appears.
3) Use the shortcut key you assigned to the script in Reaper.
4) Click OK
If you make a mistake in the process, just run the script again. It will delete all of the existing Song Markers and Regions and recreate them.
[b:27a13a7cd7]EDIT:[/b:27a13a7cd7] If you change your song structure, shift+drag the song title again to recreate Jamstix.mid with the new structure.
[b:27a13a7cd7]EDIT 2:[/b:27a13a7cd7] Updated the error message in the script.
[b:27a13a7cd7]EDIT 3:[/b:27a13a7cd7] Updated the code so the jamstix.mid file is located correctly. [b:27a13a7cd7][color=red:27a13a7cd7]The Windows File Explorer window no longer opens to locate the file as shown in the .gif.[/color:27a13a7cd7][/b:27a13a7cd7]
[b:27a13a7cd7]EDIT 4:[/b:27a13a7cd7] Updated to stop script from adding extra unneeded track(s).
[b:27a13a7cd7]EDIT 5:[/b:27a13a7cd7] Updated to return to previous TCP view after running.
[code:1:27a13a7cd7] function msg( _ )
reaper.ShowConsoleMsg( _ .. "\n")
end
delete = reaper.NamedCommandLookup( "_SWSMARKERLIST10" )
convert = reaper.NamedCommandLookup( "_SWSMARKERLIST13" )
local isthere
isthere = false
isthere = reaper.file_exists("C:\\ProgramData\\Jamstix4\\jamstix.mid")
reaper.Undo_BeginBlock()
if isthere == false then
reaper.Main_OnCommandEx( 40697, -1, 0)
msg(" [1] Please build your song in Jamstix first. \n \n [2] If you have already built your song, then shift+drag the Song Sheet [Song Title] \n into the Reaper window. \n \n [3] If you change your song structure, shift+drag the Song Sheet [Song Title] again \n to re-generate, reflecting the new changes.")
goto quit
else
reaper.Main_OnCommandEx( 40042, -1, 0)
reaper.Main_OnCommandEx( 40297, -1, 0)
reaper.Main_OnCommandEx( delete, -1, 0)
reaper.Main_OnCommandEx( 40702, -1, 0)
reaper.InsertMedia("C:\\ProgramData\\Jamstix4\\jamstix.mid", 0)
end
reaper.Main_OnCommandEx( convert, -1, 0)
reaper.Main_OnCommandEx( 40005, -1, 0)
reaper.Main_OnCommandEx( 40042, -1, 0)
reaper.Main_OnCommandEx( 40848, -1, 0)
::quit::
reaper.Undo_EndBlock( "Azimuth_Jamstix 4 Regions", -1 )
[/code:1:27a13a7cd7]
-
jazzmandan
- Posts: 130
- Joined: Tue Aug 29, 2006 2:12 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Well don't that sound sweet. Can't wait to give it a try when JS4 releases. Thanks
-
TheSystem (Archive)
- Posts: 262
- Joined: Wed Dec 16, 2009 4:56 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
works great here. fantastic idea.
thanks for sharing
brian
thanks for sharing
brian
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Anyone any idea if this is possible in Live?
Just wondering as it seems an excellent feature
Just wondering as it seems an excellent feature
-
Azimuth (Archive)
- Posts: 1675
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I don't know whether Live has a scripting language or not. Reaper has native LUA implementation and I use Reaper so that is why I did this. If Live has scripting capabilities it might be possible.
-
funkycornwall
- Posts: 18
- Joined: Fri Jan 18, 2008 8:14 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I'm being really stupid here. How do I make this code available in my SWS in REAPER. I think it is a brilliant idea and would like to make use of it.
-
Azimuth (Archive)
- Posts: 1675
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Hi,
Just copy the code above and paste it into Notepad. Name it and save it with a .lua extension. Then in Reaper: Actions>Show action list>Reascript>New...
Point to the location where you saved the .lua file and click Save. Assign the new script a shortcut key in the "Shortcuts for selected action" area.
If you have any problems feel free to ask questions.
Just copy the code above and paste it into Notepad. Name it and save it with a .lua extension. Then in Reaper: Actions>Show action list>Reascript>New...
Point to the location where you saved the .lua file and click Save. Assign the new script a shortcut key in the "Shortcuts for selected action" area.
If you have any problems feel free to ask questions.
-
d_steinschneider
- Posts: 79
- Joined: Mon Feb 13, 2017 7:21 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I have SWS Extensions installed. I went into actions and added a new ReaScript and pasted in the code. I assigned a hot key but after I shift drag the song title and cancel the import and click my hot key to run the script a new track appears and the choose file box appears. I pick the Jamstix.mid but then the new track disappears. I see Azimuth_Jamstix 4 Regions as the last action. Not sure what next step to troubleshoot would be. It's the first time I've used SWS and ReaScript. Thanks in advance for any advice on this.
Update 1 - I shift dragged the song over and didn't cancel the initial prompt and I got a new track that shows regions which is super helpful in itself. That solves a major issue I've had which is it's been hard to tell where I am in the song based on the drum parts. Color coding of this would be really helpful.
Update 2 - Ok - didn't realize the graphic you posted was gif that shows steps. I see the markers in the line up at the top of the track display area.
I'm not getting the Jamstix colors automatically. Do I need to edit the code to assign the Jamstix colors?
Update 1 - I shift dragged the song over and didn't cancel the initial prompt and I got a new track that shows regions which is super helpful in itself. That solves a major issue I've had which is it's been hard to tell where I am in the song based on the drum parts. Color coding of this would be really helpful.
Update 2 - Ok - didn't realize the graphic you posted was gif that shows steps. I see the markers in the line up at the top of the track display area.
I'm not getting the Jamstix colors automatically. Do I need to edit the code to assign the Jamstix colors?
-
Azimuth (Archive)
- Posts: 1675
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Hi,
The colors are controlled via the SWS Auto Color/Icon/Layout menu under the Extensions menu in Reaper. Add Region type Rules, set Filters to the Song Part types and choose a color for each rule. It sounds more complicated than it is. Sorry for the slow reply, I work nights.
[img:91c44d5a9a]https://i.imgur.com/dI2IHMP.jpg[/img:91c44d5a9a]
The colors are controlled via the SWS Auto Color/Icon/Layout menu under the Extensions menu in Reaper. Add Region type Rules, set Filters to the Song Part types and choose a color for each rule. It sounds more complicated than it is. Sorry for the slow reply, I work nights.
[img:91c44d5a9a]https://i.imgur.com/dI2IHMP.jpg[/img:91c44d5a9a]
-
d_steinschneider
- Posts: 79
- Joined: Mon Feb 13, 2017 7:21 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Thank you Azimuth - this is a really great feature for people like myself who write bass and drum parts first.
BTW, it's always how I've composed being a bass player - one huge advantage is that the Jamstix composed grooves, drum fills and accents closely fit the final song. That being said I like drumming that doesn't show off too much (supports the song with grooves in the pocket and tasty fills). No matter what drummer I usually add Charlie's simplify and dial back the fill length.
BTW, it's always how I've composed being a bass player - one huge advantage is that the Jamstix composed grooves, drum fills and accents closely fit the final song. That being said I like drumming that doesn't show off too much (supports the song with grooves in the pocket and tasty fills). No matter what drummer I usually add Charlie's simplify and dial back the fill length.