Commit a080a0e9 authored by Derrick Sobodash's avatar Derrick Sobodash

Big code cleanup

Reorganized a lot of the library to revolve around pin and port
definitions so Arduino boards can share the same code. It will
make it much easier to continue to add new boards in the future.

Got rid of the old AVR-incomaptible binary strings and replaced
them with definitions.

Added preliminary support for Arduino Leonardo.

Ported SPI support to Arduino Mega.

Removed the outdated internal _psgWrite() function.

Changed internal registers and inlined functions from private
to protected class members.

Fixed a glitch in the register map that was causing updates to
the ADSR envelope to be lost.
parent 6cf675c7
#!/usr/bin/php5 -q
<?php
/**
* Hardchord MIDI Converter 0.1.2 (hcmidi.php)
* Derrick Sobodash <derrick@sobodash.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*/
$version = "0.1.2";
......@@ -160,7 +173,7 @@ $options = getopt("ht:");
if(isset($options["h"]) || $argc < 2) {
?>
Hardchord MIDI Converter <?php print("$version\n"); ?>
Hardchord MIDI Converter <?php print("$version\n"); ?> (cli)
Usage:
hcmidi [options] filename
......@@ -179,14 +192,14 @@ if(isset($options["t"])) {
if(is_numeric($options["t"]))
$fix_tempo = $options["t"];
else {
print("Hardchord MIDI Converter $version\n\n");
print("Hardchord MIDI Converter $version (cli)\n\n");
print("Error: Tempo is not an integer\n");
die();
}
}
if(!file_exists($argv[$argc-1])) {
print("Hardchord MIDI Converter $version\n\n");
print("Hardchord MIDI Converter $version (cli)\n\n");
print("Error: Unable to open ".$argv[$argc-1]." for input\n");
die();
}
......@@ -244,25 +257,14 @@ if($fix_tempo == 0)
$fix_tempo = $tempo;
?>/**
* Hardchord MIDI Converter (hcmidi.php)
* Derrick Sobodash <derrick@sobodash.com>
* Version <?php print("$version\n"); ?>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Hardchord MIDI Converter <?php print("$version\n"); ?> (hcmidi.php)
*/
#include <hcYmzShield.h>
void setup() {
Serial.begin(9600);
Serial.println("Generated by Hardchord MIDI Converter!");
Serial.println("Generated by the Hardchord MIDI Converter");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment