Tag Archive for 'music'

Cool Cavemen live at Gayant Expo: first video released !

After several months of work, nit-picking and drama, I’ve finally released Cool Cavemen’s “Pump the Funk Up” video:

This video was taken during the biggest Cool Cavemen’s concert in 2009. We were playing at Gayant Expo (“largest french venue in the north of Paris” as they said in their commercial leaflets…). It was April 17th, during Cartel des Mines, a student festival organized by a group of engineering schools.

As the whole concert was filmed, I plan to release a new song every one or two weeks. I can’t promise a regular release cycle as I edit videos along the way. And of course, it also depends on my available free time…

By the way, this post also mark the opening of a section dedicated to my video projects. Currently it’s quite empty and brief, but I hope to populate it with more substantial stuff soon…

Amarok 1.4.8 for Mandriva 2008.0 and repository update

amarok-148.png I’ve just rebuild Amarok 1.4.8 for Mandriva 2008.0 with MySQL and PostgreSQL support.

This was also an opportunity for me to rebuild old packages (Interreta Televidilo, Rugg and python-icalendar) for Mandriva 2008.0. For now there is no x86_64 version of the packages (including Amarok). I plan to do it later.

Update: Amarok was recompiled to include latest libgpod version (0.6.0).

Amarok 1.4.7 for Mandriva 2007.1

Amarok 1.4.7 for Mandriva 2007.1I’ve just backported Amarok 1.4.7 from cooker to Mandriva 2007.1 (aka “Spring” edition).

Packages are downloadable from my RPM repository for i586 and x86_64 architecture and both build support SQLite, MySQL and Postgresql as database backend.

Delayed CD Tracks Publishing with PHP

Here is a little piece of code I want to share with you. I created this some months ago for the Cool Cavemen band. They wanted to release all tracks of their new LP on their website, one track per week. That’s the main purpose of the code below:

<?php

function renderTracks() {
  # Track list
  $track_list = array(
      "Track 1" => "cd-track-1"
    , "Track 2" => "cd-track-2"
    , "Track 3" => "cd-track-3"
    , "Track 4" => "cd-track-4"
    , "Track 5" => "cd-track-5"
    );
  # All variation of each track
  $track_format = array(
      ".mp3"  => "Mp3"
    , ".ogg"  => "Ogg/Vorbis"
    , ".flac" => "Flac"
    );
  # This is the list of all tracks which are always visible.
  $always_visible = array(1, 4);
  # Date and time when the "always_visible" tracks will be displayed.
  $start_date = mktime(18, 0, 0, 12, 1, 2006);
  # Delay between each track publication. Look at strtotime() manual for details.
  $delay = "+1 week";

  $today = mktime();
  $months = array(
       1 => "Janvier"
    ,  2 => "Février"
    ,  3 => "Mars"
    ,  4 => "Avril"
    ,  5 => "Mai"
    ,  6 => "Juin"
    ,  7 => "Juillet"
    ,  8 => "Août"
    ,  9 => "Septembre"
    , 10 => "Octobre"
    , 11 => "Novembre"
    , 12 => "Décembre"
  );

  # Compute publishing date of each track
  $track_dates = array();
  $track_number = 0;
  $track_publish_queue_order = 0;
  $previous_queue_date = $start_date;
  $new_start_date = $start_date;
  foreach($track_list as $track_title => $track_file) {
    $track_number++;
    # Is the track always published ?
    if (in_array($track_number, $always_visible)) {
      # Set publishing date to the start date
      $track_dates[$track_number] = $start_date;
    } else {
      # Compute the publishing date of the track
      $track_publish_queue_order++;
      $new_publishing_date = strtotime($delay, $previous_queue_date);
      $track_dates[$track_number] = $new_publishing_date;
      $previous_queue_date = $new_publishing_date;
    }
    # Update the start date of the period when a track is considered "new"
    if (($new_start_date <= $track_dates[$track_number]) and
        ($track_dates[$track_number] <= $today)) {
      $new_start_date = $track_dates[$track_number];
    }
  }
  # The end of the "new" track period is always today
  $new_stop_date = $today;

  # HTML rendering of each track
  $track_number     = 0;
  $html_published   = "<table>";
  $html_unpublished = $html_published;
  foreach($track_list as $track_title => $track_file) {
    $track_number++;
    $new          = False;
    $published    = False;
    $track_date   = $track_dates[$track_number];
    $track_html   = '';
    $publish_date = '';
    # Is the track published ?
    if ($track_dates[$track_number] < $today) {
      $published = True;
    }
    # Is the track new ?
    if (($new_start_date <= $track_date) and
        ($track_date <= $new_stop_date)) {
      $new = True;
    }
    if ($new) {
      $track_html .= '<tr><td><b>NEW!</b> </td><td>';
    } else {
      $track_html .= '<tr><td></td><td>';
    }
    # Create a direct download link for each track format
    if ($published) {
      foreach($track_format as $format_ext => $format_name) {
        $track_html .= sprintf( '<a href="http://coolcavemen.com/%s%s">'
                              , $track_file
                              , $format_ext
                              );
        $track_html .= sprintf('%s</a> ', $format_name);
      }
    }
    if (! $published) $track_html .= '<span class="disabled">';
    $track_html .= '&mdash; ';
    # Show track as non-available, and print its release date
    if (! $published)
      $track_html .= sprintf( '<b>%s %s, %sh &raquo;</b> '
                            , date("j", $track_date)
                            , $months[(int) date("n", $track_date)]
                            , date("H", $track_date)
                            );
    $track_html .= sprintf('%s<br/>', $track_title);
    if (! $published) $track_html .= '</span>';
    $track_html .= '</td></tr>';
    if ($published) {
      $html_published .= $track_html;
    } else {
      $html_unpublished .= $track_html;
    }
  }
  return $html_published.'</table><hr/>'.$html_unpublished.'</table>';
}

?>

Of course this code doesn’t prevent someone to download the track if this person knows the exact URL. But having a bullet-proof system was not my priority: I had, at that time, to do something the quick and dirty way. So I give you this code as is it, without further explanations. This code is easy enough to let any rookie understand how it work.

Here is the final result, from the user point of view (and with additional aesthetic enhancements):
cd-track-delayed-publishing

PS: If the code above contain formating errors (like bad html entities encoding, etc…), please look at the file which contain the original code or its colored html version.

Amarok 1.4.4 for Mandriva 2007: MusicBrainz Repaired !

amarok-144-with-musicbrainz1 I’m happy to announce you that the latest version of Amarok for Mandriva 2007 now feature a fully functionnal MusicBrainz ! Look at the screenshot for evidences.

This build, named amarok-1.4.4-3, is exactly the same as previous one (i.e. with SQLite, MySQL and Postgresql support). Don’t forget to update the libtunepimp package from my repository and use the 5.0 version.