Jump to content


Photo

[Solved] Help: avoid a function when loading a new song xrns, with Aut

load new song and functions

  • Please log in to reply
3 replies to this topic

#1 Raul (ulneiz)

Raul (ulneiz)

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 690 posts
  • Gender:Male
  • Location:Spain

Posted 07 January 2017 - 16:00

I have a tool using autostart. Autostart works every time you start Renoise. For example, different cases to boot Renoise:

  • Case 1) Invoke renoise.exe, logical
  • Case 2) Invoke any related (and linked) file with Renoise, a skin (xrnc), a song (xrns)... etc.

My question is: Is there any way to avoid running a function if Renoise is in Case 2), specifically when initiating an xrns (with renoise closed previously)?

 

I mean, something like that (the idea):

 

The song: song.xrns

The function: function xxx() end

 

if not load a song xrns then

  xxx()

end

 

That is, I do not want to load a function if I am in case 2. Is this possible in some way?  A condition of this style. This function xxx() is run with autostart.

 

Well thought, only I want it to run xxx() when running renoise.exe directly.

 

@Danoise, any way to do this?


Edited by Raul (ulneiz), 05 March 2017 - 15:32.


#2 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6069 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 07 January 2017 - 16:22

Not a built-in feature, no. But you could use the renoise.tool().app_release_document_observable to detect that a new song is about to be loaded.

 

So, attach a notifier and then raise some flag that indicates "document has been released" and use that to suppress the auto-launch. 


Tracking with Stuff. API wishlist | Soundcloud


#3 Raul (ulneiz)

Raul (ulneiz)

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 690 posts
  • Gender:Male
  • Location:Spain

Posted 07 January 2017 - 16:43

Not a built-in feature, no. But you could use the renoise.tool().app_release_document_observable to detect that a new song is about to be loaded.

 

So, attach a notifier and then raise some flag that indicates "document has been released" and use that to suppress the auto-launch. 

 

Thanks! I'll look, see if I can build some trick with this. Autostart will still work, but not a specific function that runs with autostart. It's a strange case, I know...



#4 Raul (ulneiz)

Raul (ulneiz)

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 690 posts
  • Gender:Male
  • Location:Spain

Posted 05 March 2017 - 15:32

Finally, I have chosen to give the user control before closing the tool for Renoise's next start. This prevents all possible Renoise execution data from different compatible file formats.

 

Thanks for the help!