danlin_modules: FontAwesome, OscPack, OscServer


#1

Just update my modules. https://github.com/danlin/danlin_modules

Now included:

Font Awesome

Font Awesome Font Icon Module

You can use this Module in a graphics context to render vector like icons. Look at http://fortawesome.github.io/Font-Awesome/  for more details about Font Awesome. There are Macros for the Icons. See this page http://fortawesome.github.io/Font-Awesome/icons/  and use the Uppercase names as icon Macros. 

Oscpack

Oscpack OSC Packing / Unpacking

Oscpack is simply a set of C++ classes for packing and unpacking OSC packets.

Look at http://www.rossbencina.com/code/oscpack  for more details about Oscpack

Simple OscServer

Simple Osc Server based on Oscpack and Juce Datagram Sockets


#2

Cool stuff smiley


#3

Hi danlin,

Really intrested in your version of OSCpack - thanks for sharing it. Do you think it would be possible for you to share a small scale demo describing how to receive and send values between applications? That would be awesome!

BR,

Matti


#4

Here a very Basic Demo. You can also look at https://github.com/Ultraschall/Soundboard i use the OSC Server in this Open Source Plugin.

<pre>
class DemoServer : public OscMessageListener
{
public:
    DemoServer ()
    {
        oscServer = new OscServer (this);
        // listen on port 
        oscServer->setLocalPortNumber (8000);
        // start listening
        oscServer->listen ();
        // set remote hostname (we use our self)
        oscServer->setRemoteHostname ("127.0.0.1");
        // set remote port (send to listening port)
        oscServer->setRemotePortNumber (8000);
    }
    ~DemoServer ()
    {
        oscServer = nullptr;
    }
    // called by osc server on incomming osc messsages
    void handleOscMessage (osc::ReceivedPacket packet)
    {
        // just dump the message
        std::cout << packet << std::endl;
    }
    // send out a osc message
    void sendOscMessage ()
    {
        static const int bufferSize = 1024;
        String address = "/test/";
        char buffer[bufferSize];
        osc::OutboundPacketStream oscMessage (buffer, bufferSize);
        oscMessage << osc::BeginMessage (address.toRawUTF8 ()) << 0.0 << osc::EndMessage;
        oscServer->sendMessage (oscMessage);
    }
private:
    ScopedPointer<OscServer> oscServer;
};
</pre>


#5

Really cool - thank you for sharing this smiley

BR,

Matti