Updated 11/11/2021 Jamstix 4 Reaper Regions script
-
Azimuth (Archive)
- Posts: 1674
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
[img:4b655f7d24]https://i.imgur.com/wrraGa3.gif[/img:4b655f7d24]
[b:4b655f7d24][size=18:4b655f7d24][color=red:4b655f7d24]Please Read The Edit Notes[/color:4b655f7d24][/size:4b655f7d24][/b:4b655f7d24][color=red:4b655f7d24]
[b:4b655f7d24]EDIT: This is the same post as the one in the Jamstix - General forum, I just thought it made sense to post it here also.[/b:4b655f7d24][/color:4b655f7d24]
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:4b655f7d24]EDIT:[/b:4b655f7d24] If you change your song structure, shift+drag the song title again to recreate Jamstix.mid with the new structure.
[b:4b655f7d24]EDIT 2:[/b:4b655f7d24] Updated the error message in the script.
[b:4b655f7d24]EDIT 3:[/b:4b655f7d24] Updated the code so the jamstix.mid file is located correctly. [b:4b655f7d24]The Windows File Explorer window no longer opens to locate the file as shown in the .gif.[/b:4b655f7d24]
[b:4b655f7d24]EDIT 4:[/b:4b655f7d24] Updated to stop script from adding extra unneeded track(s).
[b:4b655f7d24]EDIT 5:[/b:4b655f7d24] Updated to return to previous TCP view after running.
[code:1:4b655f7d24] 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:4b655f7d24]
[b:4b655f7d24][size=18:4b655f7d24][color=red:4b655f7d24]Please Read The Edit Notes[/color:4b655f7d24][/size:4b655f7d24][/b:4b655f7d24][color=red:4b655f7d24]
[b:4b655f7d24]EDIT: This is the same post as the one in the Jamstix - General forum, I just thought it made sense to post it here also.[/b:4b655f7d24][/color:4b655f7d24]
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:4b655f7d24]EDIT:[/b:4b655f7d24] If you change your song structure, shift+drag the song title again to recreate Jamstix.mid with the new structure.
[b:4b655f7d24]EDIT 2:[/b:4b655f7d24] Updated the error message in the script.
[b:4b655f7d24]EDIT 3:[/b:4b655f7d24] Updated the code so the jamstix.mid file is located correctly. [b:4b655f7d24]The Windows File Explorer window no longer opens to locate the file as shown in the .gif.[/b:4b655f7d24]
[b:4b655f7d24]EDIT 4:[/b:4b655f7d24] Updated to stop script from adding extra unneeded track(s).
[b:4b655f7d24]EDIT 5:[/b:4b655f7d24] Updated to return to previous TCP view after running.
[code:1:4b655f7d24] 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:4b655f7d24]
-
Jae.Thomas
- Posts: 285
- Joined: Tue Jun 06, 2006 10:17 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
wow very cool
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I just saw that... wonderful!
But I have a question: Is it possible, to have it vice versa? Say in Reaper setting up regions with the according names and bringing that into Jamstix so that Jamstix makes a song(structure) from that?
But I have a question: Is it possible, to have it vice versa? Say in Reaper setting up regions with the according names and bringing that into Jamstix so that Jamstix makes a song(structure) from that?
-
Azimuth (Archive)
- Posts: 1674
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
No, that isn't possible unfortunately.
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I thought I ask...
Thanks for clearing that up. I have no clue about scripting and such.
Thanks for clearing that up. I have no clue about scripting and such.
-
Azimuth (Archive)
- Posts: 1674
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
Me neither, you should have seen how many failures it took before I finally managed to make one that worked.I have no clue about scripting and such.
-
Jae.Thomas
- Posts: 285
- Joined: Tue Jun 06, 2006 10:17 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
doesn't work for me...
i don't get an import screen when I shift drag the song title..
i don't get an import screen when I shift drag the song title..
-
Jae.Thomas
- Posts: 285
- Joined: Tue Jun 06, 2006 10:17 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I think it's cause maybe I had another tab open? It works now 
...and then it didn't work again.
But, all I had to do was to rerun the script and highlight jamstix.mid again.
But I couldn't get the initial song to import.
something seems off....
...and then it didn't work again.
But, all I had to do was to rerun the script and highlight jamstix.mid again.
But I couldn't get the initial song to import.
something seems off....
-
Azimuth (Archive)
- Posts: 1674
- Joined: Fri Nov 19, 2010 2:16 am
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I don't know what changed, or when, but it looks like if the Jamstix window doesn't have focus the script shortcut doesn't work. It used to.
[b:24b55fb6e5]EDIT:[/b:24b55fb6e5] It is definitely something to do with window focus but I'm not sure what. It does work consistently for me if I click in the Jamstix window first or use the custom action button I made for my toolbar.
[b:24b55fb6e5]EDIT ll:[/b:24b55fb6e5] Jae are you using Fabian's MFXlist script? I think that is stealing focus after opening Jamstix' gui from within it. Just click in the Jamstix window before running the regions script and see if that solves it.
[b:24b55fb6e5]EDIT:[/b:24b55fb6e5] It is definitely something to do with window focus but I'm not sure what. It does work consistently for me if I click in the Jamstix window first or use the custom action button I made for my toolbar.
[b:24b55fb6e5]EDIT ll:[/b:24b55fb6e5] Jae are you using Fabian's MFXlist script? I think that is stealing focus after opening Jamstix' gui from within it. Just click in the Jamstix window before running the regions script and see if that solves it.
-
Jae.Thomas
- Posts: 285
- Joined: Tue Jun 06, 2006 10:17 pm
Updated 11/11/2021 Jamstix 4 Reaper Regions script
I am using dopp_fx - when I shut that off it worked.
one other thing, can it just remember where jamstix.mid is and load it? i had to navigate there after importing a video into reaper
one other thing, can it just remember where jamstix.mid is and load it? i had to navigate there after importing a video into reaper