• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Plugin REST Server for RDJ 1.7.5+

Started by Marius, November 04, 2014, 02:10:52 PM

cutmaster

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

cutmaster

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

Valdis

Quote from: cutmaster 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
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/

cutmaster

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

Valdis

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/

FoxFrenzy

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.

eczb

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


<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>

neverever

Quote from: Marius on November 04, 2014, 02:10:52 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?

Jhonny

double click on the rest server line in the plugin screen.

[attachment deleted by admin]
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs ( ͡° ͜ʖ ͡°)
The Radiodj tutorials site is now managed by Domstad radio .nl still  Just in English

neverever

Quote from: Jhonny on May 17, 2017, 02:09:51 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

Jhonny

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.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs ( ͡° ͜ʖ ͡°)
The Radiodj tutorials site is now managed by Domstad radio .nl still  Just in English

Qboy61

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.   :-[

RFU

Where can the last / latest version for 1.8.2 be downloaded from?
Гордий бути українцем, Ми - Радіо Вільної України.

flix

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.

DJAntares

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  :)