This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MichiyoRavencroft's profile picture

[1.7.10] OpenFM

Started by MichiyoRavencroft, 11 November 2015 - 06:23 AM
MichiyoRavencroft #1
Posted 11 November 2015 - 07:23 AM
Hello all!
Screen Shot
Spoiler
I'm here with a new addon mod for ComputerCraft. OpenFM allows you to stream from lots of online radio streaming services to your Minecraft world, all sound playing is done client side so there is little added load server side. OpenFM supports Streaming audio in MPEG 1/2/3 format, or pls/m3u playlists linking to MPEG 1/2/3 sources. Also supports OGG Vorbis streams.

Downloads are at: http://minecraft.cur...projects/openfm
Source is at: https://github.com/PC-Logix/OpenFM

Usage:
fm = peripheral_wrap("side")
fm.setURL("http://listen.radionomy.com/DeepHouse")
fm.start()
fm.stop()
fm.volUp()
fm.volDown()
fm.getVol()
fm.setScreenText("String")
fm.setScreenColor(0xFFFFFF)
Edited on 11 November 2015 - 12:11 PM
Rougeminner #2
Posted 11 November 2015 - 08:51 AM
Nice UI its a little early where i am to test the mod but it looks like you took your time making it
Dog #3
Posted 11 November 2015 - 04:28 PM
Wow - this is a nice surprise. Thanks for this - much more straight forward than the radio offering I've been using.

EDIT:

I'm putting together a simple program to organize and listen to your music streams with OpenFM - it's still rough around the edges, but very usable - it currently supports 33 stations and requires an advanced computer. Left click to play a stream, right click to edit, middle click to delete. Stop button is at the top left, volume is next to stop. Close the edit screen or exit the program by clicking the X at the top right.

Pastebin: hKuKNEcM
ComputerCraft: pastebin get hKuKNEcM ccTuner
Edited on 11 November 2015 - 10:02 PM
Bomb Bloke #4
Posted 12 November 2015 - 12:20 AM
Not too shabby! :)/> It all seems to be working well for me, except for a minor cosmetic glitch - when viewed from certain angles, the text on the front of the radio either flickers or goes entirely invisible. Is it being rendered too close to the block, perhaps?

I'm putting together a simple program to organize and listen to your music streams with OpenFM - it's still rough around the edges, but very usable - it currently supports 33 stations and requires an advanced computer.

You work quickly! But it seems that if you want to change stations, you'll need to "stop" the radio before you re-"start" it with the new URL.
Dog #5
Posted 12 November 2015 - 01:16 AM
… it seems that if you want to change stations, you'll need to "stop" the radio before you re-"start" it with the new URL.

Thanks for catching that - I cheated and used the same station repeatedly for quick testing (all the while thinking that was probably going to be a problem, but never getting around to adding the single line fix) - fix is posted.
MichiyoRavencroft #6
Posted 18 November 2015 - 02:17 AM
Not too shabby! :)/> It all seems to be working well for me, except for a minor cosmetic glitch - when viewed from certain angles, the text on the front of the radio either flickers or goes entirely invisible. Is it being rendered too close to the block, perhaps?

I'm putting together a simple program to organize and listen to your music streams with OpenFM - it's still rough around the edges, but very usable - it currently supports 33 stations and requires an advanced computer.

You work quickly! But it seems that if you want to change stations, you'll need to "stop" the radio before you re-"start" it with the new URL.

I've not noticed an issue with the text display clipping.. are you running anything that might effect the renderer, like Optifine, or FastCraft?

Also, Dog your projects continue to make my mods more usable :P/>
Edited on 18 November 2015 - 01:19 AM
Angry_Dragonoid #7
Posted 18 November 2015 - 08:14 PM
Issue, I've NEVER understood how to get/do these radio stations. I tried the same thing with the OpenBlocks radio and things similar. Could you explain this to me? No one else ever seems to have an issue with this…
Dog #8
Posted 19 November 2015 - 01:07 AM
Also, Dog your projects continue to make my mods more usable :P/>

Your mods have been fun to write stuff for - thanks for making fun mods :)/>

FWIW, I have noticed an interesting issue with the text display - as it displays more letters of a title, it jumps from 'x' number of characters visible to 'x + 1' visible - or at least that's what my eye thinks it's seeing.

I've also been able to crash to desktop by supplying an invalid stream URL - next time I'm playing I'll try to trigger that and get a crash report to you.

Issue, I've NEVER understood how to get/do these radio stations. I tried the same thing with the OpenBlocks radio and things similar. Could you explain this to me? No one else ever seems to have an issue with this…

I should probably leave this to someone who can explain better than I, but I'll give it a shot…

Place a tuner and a speaker next to each other (touching). Right click on the tuner and paste the URL for a stream into the gray box, then click the play button.

You can find stream URLs a number of ways. For example:
- Radionomy lists the stream URL on each page, just below the description (in the format of http://listen.radion...my.com/<channel name>).
- ShoutCast doesn't list the stream URL (to my knowledge) - I just download the M3U for a channel, open it in an editor, and grab the stream URL from that file

Shameless plug: you might find my ccTuner program useful - it's written for OpenFM and allows you to save, manage, and play your stream URLs. You can find basic operating and download instructions (and a few screenshots) via the link in my signature.
Edited on 19 November 2015 - 12:20 AM
Bomb Bloke #9
Posted 19 November 2015 - 04:34 AM
I've not noticed an issue with the text display clipping.. are you running anything that might effect the renderer, like Optifine, or FastCraft?

I can reproduce the issue with only OpenFM in my mods folder.

Testing further, I find that it only seems to apply to radios facing north. In any other orientation there's a small gap between the text texture and the block texture, but when placed with that facing the two overlap.
MichiyoRavencroft #10
Posted 20 November 2015 - 02:40 AM
I've not noticed an issue with the text display clipping.. are you running anything that might effect the renderer, like Optifine, or FastCraft?

I can reproduce the issue with only OpenFM in my mods folder.

Testing further, I find that it only seems to apply to radios facing north. In any other orientation there's a small gap between the text texture and the block texture, but when placed with that facing the two overlap.

This should be fixed in build 23, it'll be on curse as soon as it's approved. Thanks for the report.
Waitdev_ #11
Posted 20 January 2016 - 03:11 AM
is this mod gonna be updated to 1.8?
Bomb Bloke #12
Posted 20 January 2016 - 06:45 AM
It already has been, though I'm uncertain as to whether its ComputerCraft-specific functionality works with CC's 1.8 builds.
Waitdev_ #13
Posted 20 January 2016 - 07:24 AM
It already has been, though I'm uncertain as to whether its ComputerCraft-specific functionality works with CC's 1.8 builds.
oh, thanks bomb ;3 i think MichiyoRavencroft should probably change the title to say 1.8 instead.

also, just about to test the mod, from the post it looks fun! i hope it's as good as it sounds (see what i did there)
vico #14
Posted 29 May 2016 - 12:51 AM
It already has been, though I'm uncertain as to whether its ComputerCraft-specific functionality works with CC's 1.8 builds.

I dont find any specific 1.8 versions on her CurseForge, and i tried the latest version, for 1.7.10. Obviosly it wont work.

Another thing (more a curiosity): this mod have a uncanny resemblance to Dragon's Radio Mod:



Am I missed something?
Dog #15
Posted 29 May 2016 - 01:32 AM
You didn't miss anything. OpenFM is a highly modified version of Dragon's Radio mod which is licensed MIT. :)/>

I remember there being a 1.8.x version being released, but I can't find it anymore either, so I'm guessing it was pulled for some reason or another. I seem to remember trying it out and it didn't have CC support, iirc.
Edited on 28 May 2016 - 11:34 PM
Bomb Bloke #16
Posted 29 May 2016 - 01:57 AM
I remember there being a 1.8.x version being released, but I can't find it anymore either, so I'm guessing it was pulled for some reason or another.

I even see a 1.8.9 branch in the Github, but you're right, there don't appear to be any compiled versions anywhere.
vico #17
Posted 29 May 2016 - 02:22 AM
wow a kind of Mandela Effect happening here?

EDIT: Yes, there are a 1.8.9 branch in the repo. Someone with the right tools daring to build for us (i dont even know how to start)?

EDIT2: Seems like the 1.8.x branch have some troubles and because this she removed it entirely:

There was a 1.8 release, but it's broken and causes crashes. I can't fix it, and I can't find anyone willing to help.
Edited on 24 June 2016 - 04:11 AM
vico #18
Posted 24 June 2016 - 06:10 AM
Sorry the double post (i hate this), but the mod is still alive.

Michiyo just uploaded a new 1.7.10 build: http://minecraft.curseforge.com/projects/openfm/files


I really hope she still have plans to brought this to 1.8.9 (and future CC versions).
Dog #19
Posted 24 June 2016 - 06:14 AM
There have apparently been quite a few updates since I last checked - I was still on 29 and 35 is out. Thanks for the heads-up :)/>
vico #20
Posted 15 July 2016 - 01:50 PM
Coming here just to say OpenFM was updated to 1.8.9/1.9.4!!!!

In Michiyo's words:
MAJOR THANKS to gamax92 in #oc who rewrote the entire network system for 1.8.9+ and many other bugfixes, without him 1.8.9+ wouldn't have been done.
_strx #21
Posted 18 March 2017 - 03:35 AM
I'm getting an error when I do fm.setURL("http://listen.radionomy.com/DeepHouse")

java.lang.String cannot be cast to [B

Any help?
Edited on 18 March 2017 - 02:43 PM
Bomb Bloke #22
Posted 19 March 2017 - 07:52 AM
You'd probably get more notice in the GitHub issues list than here, though this bug has already been reported. You could try bumping that issue, though.