SMS/external text Module WIP
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    SMS/external text Module WIP

    by cerbellum » Sun May 07, 2006 4:39 pm

    27/06 UPDATE
    Reworked the module a bit, added previous line function and line number indication.

    26/06 UPDATE
    Module revision beta shared:
    It's now possible to load next lines out of the text file, each click on the preview button loads the next line into the preview screen so that it can be read (and edited if necessary) before broadcast.

    HOW TO USE IT FOR LIVE SMS BROADCAST:

    Necessary tools:
    • 1 bluetooth cellphone
    • 1 bluetooth enabled mac
    • MegacellX software (download trial here)
    this applescript
    • My sms module, downloadable from the modul8 online library or here
    • a txt file called sms.txt on your MACINTOSH HD root

    Setting up MegacellX:
    Connect your bluetooth enabled cellphone to MegacellX, if you have any problems with this matter check the MegacellX FAQ
    When this is all set go to the MegacellX preferences and select the SMS tab, check the message received Applescript and select the one you just downloaded (if you haven't get it here).
    After setting up an empty text file called sms.txt into your MAC HD root test this first part by sending yourself an SMS, make sure MegacellX is running and that your cellphone is connected. After receiving your own message check the textfile, it should display your phone number followed by the message you entered.

    On to Modul8:
    If that went well, time to open up Modul8. Get my module from the online library (or here), load it up and click the preview button. The message you sent earlier should display in the preview window, that way you can preview the messages before broadcasting, click show sms to display it in the output and click scroll txt to scroll.
    You're able to set scroll speed, text position and the regular type settings from the text module.
    Whenever you get a new message, click the preview again and it should display the newly arrived message.

    You could also use it to display ready made text messages line by line the same way you use it for SMS display.


    I'll probably be adding automation to the system, with an adjustable time delay for the message display in a later stage together with a panic button to hide the text or replace it with another (adjustable) text for unfriendly messages ;)

    Critics, comments, recommendations, ... all in- or output is more than welcome!

    Grts, Kevin



    UPDATE + NEED HELP
    What it's already doing:
    • reading the text from the external text file (place sms.txt into your root folder: Macintosh HD)
    • preview in textfield (press PREVIEW)
    • displaying it onto a layer (press SMS)
    • moving the imported text like a marquee from left to right (press START), the time it takes is dependent on variable text length and adjustable speed.
    • option buttons to position the marquee TOP-CENTER-BOTTOM
    • font and font size control

    NEED HELP:
    Everything works perfectly but there's one major bug: selecting another layer (changing the layer focus) makes the SMS layer stop and the newly selected move.
    I believe this should be able to be fixed using the KeywordEvent but I just can't seem to get that part working.
    If anyone could give me a hand on that one, help would be very appreciated.
    I've added the module to the online library (SMS Module Alpha) to make the coding and testing easier

    UPDATE:
    Making good progress with the module, it's loading the external text file and rendering it on a layer by the press of a button.
    I'll be sharing it and making a tutorial for the bluetooth cellphone connection in a later stage too.

    FIRST POST:
    Hi there,

    Me and mate had the SMS Module thing in mind for a long time and we decided to give it a go.

    What we want it to do;
    1. Automatically fetch incoming sms messages via a bluetooth connection between laptop and cellphone
    2. Write the messages to a txt file
    3. Import the txt file content into modul8 using python

    First two parts are up and running, now it's only a python matter.
    We tried working with the text module as a base for the SMS module but our python skills are let's say nihil.

    Message event:

    Code: Select all

    #print msg,param

    #reading in the txt file? > error: no such file or directory: 'sms.txt', where to put the txt file?
    txtfile = open('sms.txt', 'r')
    sms = txtfile.readline(0)

    #how to write the sms into the text layer?
    if msg == 'textField' :
       modul8.setValue('direct_layer_text_field',param['text'],0) # < change the param?
    elif msg == 'textSize' :
       modul8.setValue('direct_layer_text_size',param['value'],0)
    elif msg == 'textFont':
       if 'selection' in param :
          modul8.setValue('direct_layer_text_fontName',param['selection'],0)


    I believe this must be quite easy to code if you have better python knowledge than we have.
    Any help is much appreciated!

    Greets,
    Kevin
    Last edited by cerbellum on Sat May 27, 2006 6:51 pm, edited 3 times in total.
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Mon May 08, 2006 4:21 am

    Almost there, need a bit of help, read above ;)
  • User avatar
    gnoma
    super8 member
    Posts: 127
    Joined: Tue Apr 25, 2006 2:10 pm
    Location: spain
    Contact:

    by gnoma » Thu May 25, 2006 12:47 pm

    interesting.
    it's possible to read jumps of line or blocks of txt?
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Thu May 25, 2006 4:44 pm

    At the moment it only reads the first line of the txt file, which gives some problems when different persons send an sms right after one another, so the text file is overwritten with each new incoming sms and some of the messages aren't shown on screen.

    I haven't found a way to let's say read the next line of text in a txt file using python, any solution for this would be great but I'm not even sure it's possible (within txt files).
    As I have some more spare time I'll be looking for a way to read database inputs.

    Grts
  • jm302
    super8 member
    Posts: 110
    Joined: Tue Nov 30, 2004 7:47 pm
    Location: Seatown (Rain City)
    Contact:

    by jm302 » Thu May 25, 2006 5:52 pm

    Greetings,

    I want to give your module a try... where should the .txt file reside?

    Cheers,
    Justin
    "Just because no one understands you doesn't mean you're an artist" -- Anonymous

    http://www.302acid.com
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Thu May 25, 2006 6:09 pm

    MACINTOSH HD root and file should be called sms.txt, that should do it :)

    We took it for a test ride at a previous gig, and it was a massiv succes, plenty of users, but as I explained before it's still buggy when you get fast new sms inputs, some messages had to be retyped by hand because every new incoming message overwrites the previous one, luckely we're 2, so one could do the live mixing and the other reading and typing the lost messages :D

    Comments or tips are always welcome too
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Fri May 26, 2006 4:08 am

    NEW UPDATES read first entry
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    Re: SMS Module WIP

    by yves@garagecube » Fri May 26, 2006 8:22 am

    cerbellum wrote:NEED HELP:
    Everything works perfectly but there's one major bug: selecting another layer (changing the layer focus) makes the SMS layer stop and the newly selected move.
    I believe this should be able to be fixed using the KeywordEvent but I just can't seem to get that part working.
    If anyone could give me a hand on that one, help would be very appreciated.
    I've added the module to the online library (SMS Module Alpha) to make the coding and testing easier


    From I what I saw by checking quickly your code, you are always setting values to the layer #0, which means the active layer.

    Possible solutions:

    - Allows the user to select the layer destination inside the module (1-10 radios for example). Then pass the selected layer number (1-10) to the setValue calls.
    - Track layer focus changes (using the keywordEvent) and set the correct layer by hand.
    - Wait for the 2.5 which supports layer contextual modules. In this case you have nothing to do but selecting an option. Then your module will have an internal instance for every layer and you can continue to send 0 setValue calls.

    I'm so busy finishing the 2.5 these days that I don't really have the time to help coding. But I can help you after the release (if you did not find a solution by yourself)

    BTW this is a pretty cool and useful module.
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Fri May 26, 2006 9:38 am

    As 2.5 isn't that far away, I believe I'll stick to that option :)

    Thanks Yves!
  • ichmirmich
    member
    Posts: 13
    Joined: Tue Dec 13, 2005 9:20 pm

    by ichmirmich » Thu Jul 13, 2006 4:08 pm

    Works perfect! I had to use my old Sony Ericsson T630 because the Motorola V3i is not supported.

    Great solution!
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Thu Jul 13, 2006 4:28 pm

    Thanks, glad you like it ;)
  • band:X
    member
    Posts: 17
    Joined: Fri Mar 17, 2006 3:14 am
    Contact:

    by band:X » Fri Sep 15, 2006 11:41 am

    Hi Cerbellum, this is fantastic!

    Great module, keep up the good work. It's a fantastic solution for those of us who don't have thousands to throw at a dedicated system and we can VJ over the top as well!

    Tried it yesterday and managed to get it working after a bit of a headache. Just a couple of things I noticed which if sorted would send this module off the scale:

    1. When you cycle through the texts, when you hit the last one, it just goes blank and there is no way to get back to the beginning unless you restart M8 :-(
    I'm sure this may be just one or two lines of code to keep it cycling through

    2. It would be really handy to have in your module another function for scrolling through the texts on a regular basis automatically so that the system would automatically update itself when new texts arrive and display on screen. You could also have a 'repeat last' value where say the last 3 texts could be in rotation or perhaps the last 10 texts

    Unfortunately I don't know any python code so i can't really go in and change this myself and am limited to how much I can contribute to its development but all I'll say is this has really inspired me to do some reading into it to see if I can help with it.

    Keep up the good work and please don't take the above as criticism, it's merely that I would be willing to pay for this module if it contained the above features!

    Regards

    Andy
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Fri Sep 15, 2006 12:08 pm

    Thanks alot for the comments Andy, some good suggestions you have there!

    I'll be glad to restart the work on this module when 2.5 is fully featured and up and running as it would make it alot easier to clear some bugs that the module has at the moment (like losing it's position variable when applying the module to different layers).

    Another feature I'd like to add is the ability to fix/lock the module-applied layer over all layers.
    Let me get a bit clearer on that one, atm, when you're mixing between different sets, you'll always have to re-apply the module to a layer to make the sms visible all the time, which is kinda enoying. When I work with this module I usually have a second system running modul8 and my sms module overlayed over my live set with a hardware mixer using luma key, but that requires alot of extra hardware for something "basic".
    So "locking" one layer with the sms module running on it would make it ALOT easier and require less hardware.. I haven't exactly figured out how to get this to work but with the new mask ability I believe this should be doable somehow; That is if it's possible to use a text layer as a mask? (Boris?)

    Anyway that's what's on my list at the moment, any other suggestions are welcome.

    Thanks,

    Kevin
  • mb24335
    junior Member
    Posts: 3
    Joined: Sun May 27, 2007 3:37 am

    by mb24335 » Mon May 28, 2007 1:09 am

    Hey guys, did the work on this awesome module totally die out?
  • cerbellum
    member
    Posts: 27
    Joined: Sun May 07, 2006 3:59 pm
    Location: Antwerp, Belgium

    by cerbellum » Mon May 28, 2007 1:26 am

    I wouldn't say it's dead, I'm still using it when people ask for it on gigs but being a student my time for projects has been limited. I'll be getting back to it in about a month or so, when the holiday perio arrives.

    If you need any help, you can always send me an email: cerbellum at gmail dot com

    Greets,
    Kevin

Who is online

Users browsing this forum: No registered users and 11 guests