RadioDJ - Free Radio Automation Software Forum

Plugin REST Server for RDJ 1.7.5+

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #105 on: August 13, 2016, 12:36:41 PM »
Hey Valdis,
This seems to be perfect.
JSON could be good for me too as it is very easy to load/interpret both JSON & XML on iOS ;-)
I'm working on enhancing my current iphone apps so we can make tests...
Thanks a lot for your work...
The Revival of WOW FM with Radio DJ

http://www.cloudrad.io/cutmaster

Best Dance Music from 80's, 90's to today

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #106 on: August 13, 2016, 07:15:41 PM »
Valdis, just remembered a question I've asked also to Marius to enhance its plugin : the ability to get 256 values of smallint (-127..+128) representing the waveform of the current playing file ;-)
If you can access this information it could be such a piece of cake ;-)
Thanks :p
The Revival of WOW FM with Radio DJ

http://www.cloudrad.io/cutmaster

Best Dance Music from 80's, 90's to today

Offline Valdis

  • *****
  • 562
  • Radio is a mental condition
    • home
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #107 on: August 13, 2016, 07:47:54 PM »
Valdis, just remembered a question I've asked also to Marius to enhance its plugin : the ability to get 256 values of smallint (-127..+128) representing the waveform of the current playing file ;-)
If you can access this information it could be such a piece of cake ;-)
Thanks :p
You probably mean array of int values that represents waveform. There is no such information available in RadioDJ plugin interface but it might be possible to get something from Bass.Net library. Don't hold your breath, because I don't know if it is possible to get the waveform data.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #108 on: August 13, 2016, 09:40:21 PM »
Yep exactly.
It seems that RDJ (can) stores a short result inside the audio file (surely encapsulated in an extended MP3 sub-chunk).
In other way, you're right, BASS can return a quick'n fast waveform representation.
i've already done this but it is in Objective-C (and a lot of years ago in Delphi :p ), not sure it can help you.
But it has several methods that should help on this :
- WaveForm object contains a lot of helping function ( http://www.bass.radio42.com/help/html/6a20df3a-a6fd-486b-74e7-3a0a65f7e545.htm )
- RenderStart to scan the audio file ( http://www.bass.radio42.com/help/html/2b9bbb5e-dcf2-96a7-60c8-f43e8b9fdc3f.htm )
- CreateBitmap Method ( http://www.bass.radio42.com/help/html/d2c1d026-00bc-558a-c334-3ef1cb204c52.htm )

Hope it can help you ;-)
The Revival of WOW FM with Radio DJ

http://www.cloudrad.io/cutmaster

Best Dance Music from 80's, 90's to today

Offline Valdis

  • *****
  • 562
  • Radio is a mental condition
    • home
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #109 on: August 13, 2016, 11:36:30 PM »
AFAIK, RadioDJ saves generated waveform in a separate file with .wfrm extension, if that option is enabled in cue editor.

Thanks for the links. It looks like WaveForm.Wave property might be what I need to generate an array of values. CreateBitmap method generates a bitmap and that's not useful for getting numeric values. At first I thought that WaveFormSaveToMemory could return right data but I can't make much sense of returned byte array. It must be a serialised WaveForm object, not just the WaveBuffer values.
I am, therefore I think.
I design and develop web apps, and have created few RadioDJ plugins - https://axellence.lv/downloads/

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #110 on: November 12, 2016, 09:19:33 AM »
The only thing agitating about this is that it's written in PHP.  The host provider for my website doesn't allow PHP..  I think it's time to move away from Yola and get into Wordpress.

Offline eczb

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #111 on: January 20, 2017, 08:31:21 PM »
I think that there is an error in the xml called by http://ip:port/p?auth=[]

In the example here under cueOutro = 181.7607 is equal to &out=181.7607 but, following the same rule used for the calculation of cueIntro, it should be cueOutro = &out - &sta = 181.7607 - 0.2015 = 181,5593

bye bye

Code: [Select]
<CueTimes>
&sta=0.201473922902494&int=8.88297052154195&out=181.760702947846&xta=200.468344671202&end=201.48052154195&fin=0&fou=1.01217687074831
</CueTimes>
...
<cueEnd>201.48052154195</cueEnd>
<cueHookIN>0</cueHookIN>
<cueHookOut>0</cueHookOut>
<cueIntro>8.6814965986394554</cueIntro>
<cueLoopIn>0</cueLoopIn>
<cueLoopOut>0</cueLoopOut>
<cueNext>200.468344671202</cueNext>
<cueOutro>181.760702947846</cueOutro>

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #112 on: May 17, 2017, 01:32:16 PM »
Also, you must enter a password for command validation, like in plugin TCP server.

Hm, I don't get it... where can I change default "changeme" password?

Offline Jhonny

  • *****
  • 3867
  • Peace, enjoy life.it's over before you've lived it
    • Jhonny's RadioDJ tutorials.
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #113 on: May 17, 2017, 02:09:51 PM »
double click on the rest server line in the plugin screen.
R.T.F.M. means to me, Read The Fantastic Messages.
Make things simple, but don't make simple things simpler!
I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.2.0 Beta runs smoothly

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #114 on: May 17, 2017, 02:58:11 PM »
double click on the rest server line in the plugin screen.

Ouch, I feel ashamed :bash: Thanks! Don't ask me how I missed that :D

Offline Jhonny

  • *****
  • 3867
  • Peace, enjoy life.it's over before you've lived it
    • Jhonny's RadioDJ tutorials.
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #115 on: May 17, 2017, 05:23:43 PM »
How did you miss that?  :huh:

Too busy with dark things, I know from experience!  :hihi:
R.T.F.M. means to me, Read The Fantastic Messages.
Make things simple, but don't make simple things simpler!
I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.2.0 Beta runs smoothly

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #116 on: November 04, 2017, 04:40:09 AM »
Noob question?  I have been able to get the following REST server command to work when issued from a browser.

http://127.0.0.1:7000/opt?auth=changeme&command=ClearPlaylist

It clears the playlist and since auto dj is active it refills as expected.  I think the plugin appears to be configured correctly.  But...  I was trying to get the StatusQueue command to work but I never get a list back.  Are there arguments required here?  Maybe an example would be helpful.  Also tried the RadioDJ Monitor but that does not respond at all, and then it times out.  I am missing something here.   :-[

Offline RFU

  • *****
  • 503
    • Radio Free Ukraine
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #117 on: April 19, 2018, 01:36:23 PM »
Where can the last / latest version for 1.8.2 be downloaded from?
Гордий бути українцем, Ми - Радіо Вільної України.

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #118 on: February 18, 2019, 03:09:10 PM »
Hi! First time poster here. I recently sent a module request to Bitfocus's Companion to implement RadioDJ as a module in the software. I did some preliminary testing on the module, but there are a few hiccups.https://github.com/bitfocus/companion/issues/483#issuecomment-464533092
They are having some trouble in implementing the REST Server plugin. Is there a possibility to Bitfocus's team to gain some insight on what is and what isn't working at the moment. Perhaps getting some insight into the API, so it can properly implemented into Bitfocus's Companion.

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #119 on: January 28, 2020, 07:49:09 PM »
Hi guys,
the Rest Server plugin is very powerful specially in web application, but i can't to sent any command if the url is in https protocol.
I try out to search how can set the WCF in https but various howto are for IIS server.
Someone can solve already this problem?  It's possible to set the Rest Server with Apache or Nginx for example?
Thanks to all  :)