Jump to content


Photo

New Tool (3.0): Quick Template (v0.2)


  • Please log in to reply
14 replies to this topic

#1 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 02 April 2015 - 11:52

Here is a simple Template helper.

 

You can choose a template folder (in tools menu), were you can place template XRNS files (also outside from Renoise, adding templates in explorer or finder). These files will be simply displayed in a menu under File->Quick Template. I was not satisfied with the one-template-solution of renoise. Some code based on Neurogami's NewFromTemplate found below.

 

What's currently missing:

 

- Notifier/observer on file renaming, deletion within Renoise disk browser. 

 

UPDATE 03-May-15:

v0.2 now has proper new file naming (it saves the new song to "new project" inside the template dir. This file will not be listed).

v0.2 fixed path bug message

 

Attached File  de.virtualcreations.QuickTemplate.xrnx   4.68KB   149 downloads

 

 

Also check out Neurogami's "New from Template" Tool. It might be the better solution for you: http://forum.renoise...28-30/?p=325141


Edited by Jurek, 04 May 2015 - 17:23.


#2 re.dread

re.dread

    Advanced Member

  • Normal Members
  • PipPipPip
  • 97 posts

Posted 02 April 2015 - 12:03

As for renaming the template after loading it:

https://code.google....ion.API.lua#120

.. should do, i think.

You'll probably have to attach a renoise.tool().app_new_document_observable before loading the template, and then save under a new name from within the observable function tho (and remove the observable).



#3 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 02 April 2015 - 12:32

As for renaming the template after loading it:

https://code.google....ion.API.lua#120

.. should do, i think.

You'll probably have to attach a renoise.tool().app_new_document_observable before loading the template, and then save under a new name from within the observable function tho (and remove the observable).

But then the user needs to define some default save path in the tool, right? That would complicate things.


Edited by Jurek, 02 April 2015 - 12:32.


#4 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 534 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 02 April 2015 - 16:30

But then the user needs to define some default save path in the tool, right? That would complicate things.

 

That's how my template tool works.   The user needs to config the paths for where templates are stored and where new files are put.

 

The renaming happens when you opt to create a new file; you provide the new file name before it gets created and loaded.

 

BTW, if anyone has questions about my code please drop me an email  and I'll try to explain it.

 

I have to look into adding a menu item under Files, too.

 

My tools can be found here: http://neurogami.com/code/



#5 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 03 April 2015 - 09:25

Hey neurogami, I didn't want to critize any of your work which I find very helpful and awesome, I just wanted to say that I see this point different. No need for a auto pre-saved new newfile here. ( I understand there is no other way to rename the current project), since I also save projects in multiple folders. Maybe I try to build a new xml song document from a song file and then copy all stuff to the current song. No clue, if this is possible. Then only partial imports from a template would be possible, like: reverb setup from "2x3 layered ambient reverb" + drum bus 80s + master analog compressor
  • Neurogami likes this

#6 pat

pat

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 419 posts
  • Gender:Male

Posted 23 April 2015 - 04:32

@Jurek is this like a quick loader? If I do a "quick template" then it opens the file and marks it as modified... and if I save it, it overwrites the original file. Is that what it's intended to do? And I need to do a "save as" to save it as a different file?



#7 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 23 April 2015 - 07:59

Hey, you are right, it currently only lists the contents of the dir. Sadly there is no way to rename a project after loading using lua. The only (for me) wrong way is to save the new project to another name/path via lua. Then I would have to add a default song save dir to the prefs, which makes in my case no sense, since I always use subdirs for projects. I can add such default save to prevent template overwriting... It's just absolutely not satisfying. A renaming function / set save path function without saving would be much better. But as someone lately wrote here, such feature requesting is like farting in the wind.

Do you think I should add a default save path, so it will be saved to path/new_project.xrns ? I guess Then neurogamis tool will work, which nearly does the same. Edit: hm no I think I will write it as "new_project" to the template dir and will prevent "new_project" from being listed. Then you won't overwrite the template accidentily at least.

I would also then add subdir support, so the quick load submenu can have sub subs.

 

The best would be obviously some LUA function like "set_song_state_unsaved(true)" or "set_song_path("")" or something, so that on pressing Apple-S / Command-S a file save dialogue would appear just like the song was completely new and never saved!


Edited by Jurek, 23 April 2015 - 10:37.

  • pat likes this

#8 pat

pat

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 419 posts
  • Gender:Male

Posted 23 April 2015 - 14:49

Do you think I should add a default save path, so it will be saved to path/new_project.xrns ? I guess Then neurogamis tool will work, which nearly does the same. Edit: hm no I think I will write it as "new_project" to the template dir and will prevent "new_project" from being listed. Then you won't overwrite the template accidentily at least.

 

The best would be obviously some LUA function like "set_song_state_unsaved(true)" or "set_song_path("")" or something, so that on pressing Apple-S / Command-S a file save dialogue would appear just like the song was completely new and never saved!

 

I don't think you need to add a default save path... as you say, it would then be pretty much the same as the other tool.

 

But yeah, what I want to see for multiple templates is what you wrote in bold: for a "new from template" project to be unsaved, and prompt for the file name upon the first save. Hopefully taktik, danoise and crew (who else is on the dev team? I only think of those two) will look into this given that it's a common feature request.

 

Thanks for sharing!



#9 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 02 May 2015 - 22:37

updated, see 1st post



#10 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 534 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 03 May 2015 - 17:58

I like the idea of having the "new from template" menu under the "File" section so I've change my own template tool to do that as well.  

http://forum.renoise...template-28-30/


  • ffx likes this

#11 Psynapsex

Psynapsex

    Advanced Member

  • Normal Members
  • PipPipPip
  • 98 posts
  • Gender:Male
  • Interests:Synthesis, Electronics, & Day Trading (I'm a noob)

    I'm a big fan of Venetian Snares, Psykovsky, Richard Devine, and The Advent.

    I've been using Reaktor 5 since 2008, and love the thought of a real analog modular synth.

Posted 03 May 2015 - 21:04

Thanks very much for scripting!!!

 

I'm getting a Scripting tool error message when I install the script. Is this normal???

Attached Images

  • Scripting tool error II.jpg


#12 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 03 May 2015 - 21:17

Thanks very much for scripting!!!

 

I'm getting a Scripting tool error message when I install the script. Is this normal???

Hey, thanks for reporting! Hopefully fixed that now. Please download again from 1st post. 


Edited by Jurek, 03 May 2015 - 21:19.

  • Psynapsex likes this

#13 Psynapsex

Psynapsex

    Advanced Member

  • Normal Members
  • PipPipPip
  • 98 posts
  • Gender:Male
  • Interests:Synthesis, Electronics, & Day Trading (I'm a noob)

    I'm a big fan of Venetian Snares, Psykovsky, Richard Devine, and The Advent.

    I've been using Reaktor 5 since 2008, and love the thought of a real analog modular synth.

Posted 03 May 2015 - 21:43

Installed smooth like butter now :badteeth:

 

But after configuration under file menu and tool menu (default folder was used) I got this message:

 

 

Attached Images

  • Scripting tool error III.jpg

Edited by Psynapsex, 03 May 2015 - 21:43.


#14 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2797 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 03 May 2015 - 21:48

But that's Neurogami's tool. Think you can fix it by open his config.xml and edit your path there or set it to an empty string.

 

You have to setup a dir. Default dir is my own I think.


Edited by Jurek, 03 May 2015 - 21:49.

  • Psynapsex likes this

#15 Neurogami

Neurogami

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 534 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 03 May 2015 - 23:42

Installed smooth like butter now :badteeth:

 

But after configuration under file menu and tool menu (default folder was used) I got this message:

 

That's my tool.

 

Did you use the tool's configuration option to set it to an existing directory? 

 

I need to add better error handling to tell users what to do if things are blowing up.

 

Or think of adding a splash screen or something.


  • Psynapsex likes this