Archive for the ‘ Software Development ’ Category

I’m a Cool Fucking Guy

DJ LogoThis article will be an ADD kid’s dream come true. In it, I will drop the first installment of my new DJ series, touch briefly on copyright law as it applies to DJ mixes, and finally, give you a step-by-step guide to creating your own music hosting service.

You’ll be here for awhile, so let’s start by clicking that play button below this paragraph. This is the first of many DJ sets in my new series entitled “Bowling.” The inspiration for this series has been you! My friends, frienemies, acquaintences, family, and people I don’t even like! Each week that I do a bowling set, I am picking a person who has at one point or another been an important part of my life and I’m making a set for them. I will NEVER tell ANYONE whose set is for who, or if a set is even for you. If you try and guess, I will neither confirm nor deny anything! With that said, I leave clues all over the place so if the set is for you, you’ll know. If you have to ask, I’m sorry but probably it isn’t yours. Who do you think it’s for? Ok well let’s go BOWLING!!

Bowling – I’m a Cool Fucking Guy (2/27/2015)

Tracklist

  • 1 – Celsius – Incoming
  • 2 – Martin Ikin – Rhythm
  • 3 – Oliver – MYB (Tchami Rmx)
  • 4 – Rob Mirage – Culture 1010 (Hector Couto Remix)
  • 5 – Ludacris – Stand Up (LeMarquis Remix)
  • 6 – Sugar Hill & Wasabi – It’s on You (Purple Disco Machine Remix)
  • 7 – Disciples – They Don’t Know
  • 8 – Habischman – Like This
  • 9 – Me & My Toothbrush – Something (Croatia Squad Remix)
  • 10 – Vanguard – Mount Helicon
  • 11 – Laidback Luke – Bae (feat. Gina Turner)
  • 12 – Anna Lunoe – Heartbreak In Motion (feat. Jesse Boykins III)
  • 13 – Kokiri – Flux
  • 14 – Do Santos & Simone Vitullo – My Bassline Friend
  • 15 – Beam – Controllers
  • 16 – Fabrico Pecanha – Teaser(Phonique Remix)

Soundcloud Sucks! And so does Copyright law if you are a DJ

So why did you have to click on the player here rather than just go to my SoundCloud page like a normal person? I’m glad you asked that. In what scientists around the globe are calling “fucking lame,” Soundcloud has (somewhat) recently declared the hobbyist and beginner DJ enemy number 1. To make a long story short, I tried uploading my latest set to Soundcloud last week, only to have it taken down due to an automated Copyright infringement claim. Apparently SoundCloud will now scan through your sets, looking for any tracks that might be copyrighted, and it will bitch slap your posting if its algorithms determine that you’re infringing! After poking around a bit, I stumbled upon numerous accounts of other people finding the same thing. Fuckers.

Everyone knows that broadcasting copyrighted materials is infringement. But where is the line between infringement and fair use? If you play a song at your home and some friends who hadn’t purchased the music happen to be in the room, are you infringing? Can the RIAA come into my home and turn off my stereo? What about if you are playing at a club where people paid money at the door to get in? Does that constitute infringement? What if it’s at a concert with thousands of people, or if you publish a mix album?

As it turns out, the distinction is not clearly defined. I naively thought that as long as I credit the original artist and don’t charge for the set, it was fair use. WRONG!! Per Wikipiedia, Frank Creighton, a director of anti-copyright infringement efforts for the Recording Industry Association of America, was quoted in New York Times as saying that “money did not have to be involved for copying to be illegal.” There’s a lot of nuance here and I’m not a lawyer, but for practical purposes, you pretty much have to have obtained permission from the original artist to play anything.

One would think that an enthusiast who just wants to share good music with his friends should be free to do so; and while the internet makes this easier from a technological perspective, it apparently makes it more difficult from a legal one. In order to properly publish my mixes, I need to obtain written permission from every single artist in my set, fill out a form at copyright.gov, pay $40, and send in 2 hard copies of my set to the U.S. Copyright Office. After I do that, SoundCloud will let me dispute their bitch slap and my mix will be published…. whenever SoundCloud gets around to publishing it?

Ef that noise! I like to pay what I call “pragmatic attention” to the rules. I’ll just boycott Soundcloud, fly under the radar, and be diligent about responding to DMCA takedown requests. But soundcloud is so effing easy and everyone has it! How do I distribute my music to my friends who want to listen on their devices? Now we get to the how-to portion of this article!

A start at creating your own streaming music service

HTML5 has been out for awhile now, though I can’t say that I’ve ever taken the time to learn anything about it until just now. Apparently though, HTML5 allows for <audio> tags that should be supported by any modern browser. Mobile included! I tested the player embedded in this article on both my iPhone 6, and my android burner phone (It’s not what you think I swear! I just get drunk and lose phones often enough to justify it) and it worked flawlessly on both! Yay now everyone can enjoy my music from their devices.

That isn’t quite cool enough so I went and found this fancy little javascript player that makes the default HTML5 player look nice. Next I wrote a little script that makes the player look nice with a collapsible tracklist and automagically plays the set I want it to play. It pulls its tracklist and set information from an array that I hardcode. I intentionally left this thing expandable so that someday I can add a tracklist upload script and possibly serialize/deserialize the set metadata from a database or something.

My code here:

index.php

<!--?php require_once("sets.php"); $rootPath = "http://imjustinbraun.com/djsets/"; $request = $_GET["Request"]; $setIndex = $_GET["SetIndex"]; $sets = new \JB\Music\Sets(); if ($request === "DisplaySet" && $setIndex !== "") { 	$set = $sets--->GetSet($setIndex);
$seriesName = $set["Series"];
$setName = $set["Name"];
$publishDate = $set["Date"];
$trackList = $set["Tracklist"];
$filePath = $set["File"];

print '
	<link href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css" rel="stylesheet" /><script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script><script type="text/javascript" src="http://code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<script type="text/javascript" src="'.$rootPath.'audiojs/audio.min.js"></script>	<link href="/resources/demos/style.css" rel="stylesheet" /><script type="text/javascript">// <![CDATA[
			$(function()
			{
				$( "#accordion" ).accordion({
					collapsible: true
				});
			});

// ]]></script>
<script type="text/javascript">// <![CDATA[
			audiojs.events.ready(function()
				{
					var as = audiojs.createAll();
				});

// ]]></script>
<h1>'.$seriesName.' - '.$setName.' ('.$publishDate.')</h1>
<audio width="300" height="32" preload="auto" src="'.$rootPath.$filePath.'">

</audio>
<div id="accordion">
<h3>Tracklist</h3>
<ul>
<ul>';</ul>
</ul>
$i=1;
foreach($trackList as $trackName)
{
print "
<ul>
	<li>$i - $trackName</li>
</ul>
&nbsp;

";
$i++;
}

print '

</div>
';
}

sets.php

<!--?php namespace JB\Music; class Sets { 	private static $sets = array( 		"0" =-->
[
"Series" =&gt; "Bowling",
"Name" =&gt; "I'm a Cool Fucking Guy",
"Date" =&gt; "2/27/2015",
"File" =&gt; "I'm a cool fucking guy.mp3",
"Tracklist" =&gt;
[
"1" =&gt; "Celsius - Incoming",
"2" =&gt; "Martin Ikin - Rhythm",
"3" =&gt; "Oliver - MYB (Tchami Rmx)",
"4" =&gt; "Rob Mirage - Culture 1010 (Hector Couto Remix)",
"5" =&gt; "Ludacris - Stand Up (LeMarquis Remix)",
"6" =&gt; "Sugar Hill &amp; Wasabi - It's on You (Purple Disco Machine Remix)",
"7" =&gt; "Disciples - They Don't Know",
"8" =&gt; "Habischman - Like This",
"9" =&gt; "Me &amp; My Toothbrush - Something (Croatia Squad Remix)",
"10" =&gt;"Vanguard - Mount Helicon",
"11" =&gt;"Laidback Luke - Bae (feat. Gina Turner)",
"12" =&gt; "Anna Lunoe - Heartbreak In Motion (feat. Jesse Boykins III)",
"13" =&gt; "Kokiri - Flux",
"14" =&gt; "Do Santos &amp; Simone Vitullo - My Bassline Friend",
"15" =&gt; "Beam - Controllers",
"16" =&gt; "Fabrico Pecanha - Teaser(Phonique Remix)"
]
]
);

public function GetSets()
{
return self::$sets;
}

public function GetSet($index)
{
return self::$sets[$index];
}
}

Imjustinbraun.com is a wordpress site, so I need the ability to embed the output of http://imjustinbraun.com/djsets/index.php into the post. For that, I use the Insert PHP wordpress plugin, then in the post I add an insert_php shortcode with the url of the set I want. To make the tracklist fancy and collapsible, I used jquery accordion.

So that’s it! I hope you like my music. In future articles I may post a bit more about any backend stuff that I add. Have a great weekend!!

I’m Speaking at a Chicago Bitcoin Event

Bitcoin LogoMark Your Calendars! Scaled Dynamics is sponsoring the Chicago Bitcoin Meetup on Feb 11. I will be presenting SD Gatekeeper’s bitcoin trading functionality and giving a brief talk about the future of Bitcoin as it pertains to financial trading. Admission tickets will be available for purchase with Bitcoin using Chicago Mint. Drinks will be included with the purchase of a ticket.Giveaway Sponsors include GLCBitcoinAlpha Point , and Invincible WalletPlease contact: jonathan@chicagomint.com for details. 

The event will be held at Big Bricks at 3832 N. Lincoln Ave.

Drinks will be served at 6:00 p.m.

Formal Presentations begin at 7:00 p.m.

 

 

Gatekeeper 3.2 Slated for Q1, 2013

sd-chartsA series of exciting enhancements to Scaled Dynamics’ flagship product, Gatekeeper, are planned to launch in Q1, 2014. These enhancements are primarily focused towards adding to the breadth of liquidity venues and adding functionality for automated options traders, however all current users of Gatekeeper will benefit from support for Multi-Asset Class, a Redesigned Volatility Mangager, Strategy Window Enhancements, and Time and Sales Functionality.

Support for Multi-Asset Class

Scaled Dynamics will be introducing connectivity to Interactive Brokers with the launch of Gatekeeper 3.2. This will allow traders to trade multiple asset classes from one single platform.,

Formula Engine and Automated Strategy Enhancements
New Formula EditorSeveral variables and functions have been added to the SD Formula Engine. These include Market Depth, Moving Averages, Strike Interval, ATM Strike, and Money (OTM, ATM, .ITM). Formula strategies get a dynamic volatility option, so that volatility for live orders can be set in real time as the result of a formula. Formula orders can also be enabled and disabled based on formula values.

These enhancements allow exciting new possibilities. Formulas can be used in conjunction with the enhanced formula strategies to do things like turn strategies on and off based on whether an instrument is on or out of the money. Entire strategies can be turned off in response to changes in liquidity conditions. Volatility can be set in relation to a dynamic skew or in relation to a pre-set implied volatility.

Additionally, strategies can be enabled for rapid-fire re-enablement allowing profitable strategies to repeat themselves automatically after they’ve completed a successful trade.

Formula Strategies will enjoy an increased degree of abstraction with the addition of Strategy Templates. Strategy templates will allow traders to automatically respond to market generated events such as RFQ’s with valuations and automated hedging strategies for OTC swaps, option spreads and strategies.

Redesigned Volatility Manager
newvolatilityEditorThe volatility manager has been completely redesigned to provide a more intuitive look and feel. Users can toggle strategies between dynamic and static volatility, set skews, and monitor changes to the implied volatility surface in real time. Additionally, users can add “live” skews that utilize cubic spline based lines that adapt to movements in the underlying asset.

Strategy Window Enhancements

The Strategy window has undergone a number of evolutionary enhancements including strategy view tabs, improvements to column settings and increased visibility options. Strategies themselves also see increased control directly from the strategy window, as CV1 and CV2 values can be changed in real time directly. This allows a trader to change price offsets or other critical user defined variables with a high degree of speed and accuracy.

Time and Sales Functionality
New Time And SalesA time and sales window has been added that allows the trader to view the “ticker tape” for a subset of instruments that meet the trader’s pre-defined volume criteria.