code – Estereotips http://estereotips.net arts | science | technology | videogames Thu, 07 Sep 2017 09:05:57 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.9 Soñando Satelites – fictional serie – code http://estereotips.net/so%c3%b1ando-satelites-fictional-serie-code/ http://estereotips.net/so%c3%b1ando-satelites-fictional-serie-code/#respond Tue, 19 May 2015 10:16:32 +0000 http://estereotips.net/?p=3838 fictional-300-codeThis is the code page explication of installation Soñando Satellites – Fictional series

The installation is composed essentially of two softwares interacting between: gpredict and puredata. Gpredict track the satellites and send data as elevation, azimuth and position to a puredata patch through Open Sound Control protocol.

You can download all the code from github’s page:

https://github.com/husk00/sonandoSatelites-fictional-serie

 

Gpredict

This software is real-time satellite tracking and orbit  developped by Alexander Csete and released under the G.P.L. 2.0 license. It is an amazing program that let you track satellite based on public TLE data.. The fake satellites used, as well the real ones, are inserted in the system by using the config directory called Gpredict in the git repository. Actually the directory Gpredict/satdata contains a lot of unutilized satellites information that I leave there for laziness.

A preset with Quito as ground station information plus a selection of used satellites is bundled with the package.

In order to make it communicates with puredata  I had to hack the original code of the program.

[NOTE]

That, let me say, it was a wonderful demonstration, as artist that work with software, of the beauty and power of free software. Only free software let you adapt a previous software to some real artistic and technical condition the artist is facing, letting you to adapt it to fit your needs (and not the opposite, as usual happen).

[/NOTE]

The hack basically consist in modifying the file gtk-polar-view.c in the Gpredict-osc/src directory adding the code for sendings a boolean variables according to the position of the satellite related to the ground station. So when the satellite pass over the ground station a true var is sent and a audio file is played.

This hack follow the original hack of 2011 from David Pello and Bruno Vianna, whom added for first time OSC capabilities to Gpredict.

Puredata

The audio engine is composed by a collection of puredata patch receiving OpenSoundControl messages. Puredata is a dataflow programming language originally designed for DSP programming. It is released under the BSD license Term from Miller Puckete and have a great and strong community behind that make this software so punk and so beautiful. For this installation puredata vanilla was used in combination of some external, as listed in the README file. All this externals are packaged in the multimedia debian repository

Audio engine is divided in different directories one for each satellites. Some patch play just a recorded file in WAV format. Others use generative real time sounds: the puredata patch tool used to create this patches was the #webpd framework developed by Sebastien Piquemal. Especially I used the random generator demostration as in http://sebpiq.github.io/pd-fileutils/demos/randomDrone.html.

(Many many Thanks for this wonderful framework!)

Audio

The scripts present in the directory are supposed to make it easy run the installation and to automatize some task (like check if it is working or not and reboot the installation) All the audio files used by the installation are downloadables from http://estereotips.net/release/sounds/ and must be copied inside audioEngine/sounds/ directory.

They are released under the Creative Commons Zero license.

]]>
http://estereotips.net/so%c3%b1ando-satelites-fictional-serie-code/feed/ 0
Talk @ Mira Lab http://estereotips.net/talk-mira-lab-2/ http://estereotips.net/talk-mira-lab-2/#respond Fri, 17 Jan 2014 05:26:32 +0000 http://estereotips.net/?p=3689 Mira_2013_600x250MIRA Lab is an event dedicated to the research of new ways of live shows in music and visual arts using the creative programming and disruptive technology.

 MIRA Lab is an international event for artists, developers, curators, agencies and public working with creative technology for performances, shows and visual arts in real time.

MIRA Lab empowers people in the visual arts field through the mutual exchange of skills and experiences. MIRA Lab is defined to be an international event that promotes p2p, puts theemphasis on the process, and promotes the creativity through innovative activities

During the 2013’s edition of the festival Estereotips has been invited to give a public talk about our artistic practice and the centrality of coding as new literacy.

Below you can find a very simple slide with the main concept expressed during the talk.

 

]]>
http://estereotips.net/talk-mira-lab-2/feed/ 0
Javascript and processing.js (and webpd). How let them communicate http://estereotips.net/javascript-and-processing-js/ http://estereotips.net/javascript-and-processing-js/#respond Tue, 06 Nov 2012 18:31:46 +0000 http://estereotips.net/?p=3193
In my free time I recently engaged with a personal video game project. I’m using processing.js for game logic and graphics  and webpd (pd.js) for the audio engine. Processing.js is a well know and established project. It has good documentation and rich community of user on-line. Not the same for webpd that is recentborn and still  in a very alpha stage. Webpd is a javascript implementation of  puredata vanila using mozilla audio api.  Webpd was originally developed  from Cris McCormick  and after a time of silence it hases been  forked by Sébastien Piquemal  and is currently under heavy development.  This incarnation of webpd is:

  • 100% JavaScript Pure Data runtime. It aims at allowing a subset of Pure Data audio patches to run in the browser without plugins.

  • is also a standalone DSP library. Every object as you know it in Pure Data exposes a complete API, allowing developers to control everything with JavaScript.

 

Still many basic and tremendously useful objects are miss (like route or pack) but they are on the way. You can also contribuite to make it more efficent whie is BSD licensed.  

The topic of this post is not really to present this great tools but to document a couple of solution I used to solve some very common y pretty boring problems. 

Alwais at some point you will need to get access to processing function and variables directly from javascript. In order to do that you first need to use Processing.getIstanceById() function.

[cc lang=”javascript”]pjs = Processing.getInstanceById(“nameOfSketch”);[/cc]

The problem comes with asynchronous web technology so can happen that when you are trying to get the instance your  processing canvas has not been loaded yet.  The consequences is don’t have any access to processing function from javascript side.

In order to avoid that I used a setInterval() fnction onReady event, waiting for pjs to be ready . In the follow example I used jquery:

 

[cc name=”test” lang=”javascript” ][/cc] 

In that way you are sure to get Processing instance corretly and so access to processing.js function directly from javascript.

[cc name=”getfunction”  lang=”javascript” ][/cc] 

 

pds.myFunctio(); will return myFunction value from processing.js sketch. Still is not possible (for what I tested) to directly get values from sketch, so you will have to write a funtion to get processing.js values.

Working on a this project something very weird happen with my code. I’m using PImage preloading directives from processing.jscode. As documented in processing website:

 [cc name=”directives”  lang=”javascript” ][/cc] 

Strangly this directive call broke the system how access from javascript to processingjs functions. I can’t understand exactly why; I guss comment system has something to do with. To solve this issue I used requestImage() function from processingjs instead of loadImage() and I didn’t need to use preload directives.

 [cc name=”request”  lang=”javascript” ][/cc] 

Using this two tricks every thing worked straight
forward and I could finish my javascript-processingjs-webpd code.

Soon I’ll release it as  indy game and as public code.

 

 

 
]]>
http://estereotips.net/javascript-and-processing-js/feed/ 0
robOSC and midi conversion http://estereotips.net/taller/ http://estereotips.net/taller/#respond Fri, 17 Feb 2012 20:37:39 +0000 http://estereotips.net/?p=2802 With the new version of robOSC I’m trying to build a generic OSC/midi router that can serve as general convertor also.

The aim is to make easier the connections between OSC supported application and normal midi application (for example reactOSC and LMMS).

Code writing is almost finished; still I miss note midi integration and some further testing. I hope to release it in two weeks.

if you want to check the code:

svn co http://code.autistici.org/svn/planetQ/satellite/trunk/common/control/robOSC-2.0/

 

 

 

]]>
http://estereotips.net/taller/feed/ 0