Profile

Cover photo
Caesar Passée
Works at Arts for Transit
845 followers
AboutPostsPhotosYouTube+1's

Stream

Caesar Passée

➥ Arduino  - 
 
Hi folks,
               I'm i need some help with a geetech vs1053 MP3 shield.
When trying to play middle C from the IDE serial window I send 
noteOn(0,60,127); expecting to hear C with velocity of 127. but nothing plays.
The docs say 
" *  (1) Through SPI, at an arbitrary data rate. For SPI, each byte of MIDI data needs to be prefixed by a 0 byte 
 *      (The V1053b data sheet erroneously states that the padding should be a 0xFF byte)."

Do I need to send 0xFFnoteOn(0,60,127) or noteOn(0xff,0,60,127) or noteOn(0, 0,60,127)? I've tried so many things I've lost track.

BtW: Geeetech is a terrible company. Their example code is useless, their libraries are full of errors and incomplete. No rtmidi set in their examples and a horrible forum. Gee wiz.
Here's the code i'm trying to run:
https://gist.github.com/microtherion/2636608/download#file-mp3_shield_realtimemidi-ino

Any help would be greatly appreciated.
Thanks much
1
Add a comment...

Caesar Passée

➥ Arduino  - 
 
Hi folks,
               I'm i need some help with a geetech vs1053 MP3 shield.
When trying to play middle C from the IDE serial window I send 
noteOn(0,60,127); expecting to hear C with velocity of 127. but nothing plays.
The docs say 
" *  (1) Through SPI, at an arbitrary data rate. For SPI, each byte of MIDI data needs to be prefixed by a 0 byte 
 *      (The V1053b data sheet erroneously states that the padding should be a 0xFF byte)."

Do I need to send 0xFFnoteOn(0,60,127) or noteOn(0xff,0,60,127) or noteOn(0, 0,60,127)? I've tried so many things I've lost track.

BtW: Geeetech is a terrible company. Their example code is useless, their libraries are full of errors and incomplete. No rtmidi set in their examples and a horrible forum. Gee wiz.
Here's the code i'm trying to run:
https://gist.github.com/microtherion/2636608/download#file-mp3_shield_realtimemidi-ino

Any help would be greatly appreciated.
Thanks much
1
Add a comment...

Caesar Passée

Help & Support  - 
 
Hi folks,
               I'm i need some help with a geetech vs1053 MP3 shield.
When trying to play middle C from the IDE serial window I send 
noteOn(0,60,127); expecting to hear C with velocity of 127. but nothing plays.
The docs say 
" *  (1) Through SPI, at an arbitrary data rate. For SPI, each byte of MIDI data needs to be prefixed by a 0 byte 
 *      (The V1053b data sheet erroneously states that the padding should be a 0xFF byte)."

Do I need to send 0xFFnoteOn(0,60,127) or noteOn(0xff,0,60,127) or noteOn(0, 0,60,127)? I've tried so many things I've lost track.

BtW: Geeetech is a terrible company. Their example code is useless, their libraries are full of errors and incomplete. No rtmidi set in their examples and a horrible forum. Gee wiz.
Here's the code i'm trying to run:
https://gist.github.com/microtherion/2636608/download#file-mp3_shield_realtimemidi-ino

Any help would be greatly appreciated.
Thanks much
1
Add a comment...

Caesar Passée

Shared publicly  - 
1
Winkle ink's profile photoCaesar Passée's profile photo
2 comments
 
Midi drum pads
Add a comment...

Caesar Passée

Shared publicly  - 
1
Daniel Ehrlich's profile photoCaesar Passée's profile photo
2 comments
 
Arduino Midi piano/drum trigger 
Add a comment...
 
I <3 TWiT
 
Arduino LiquidCrystal - Serial Input
View original post
10
1
Caesar Passée's profile photo
Add a comment...
Have them in circles
845 people
New York Arts's profile photo
by rastt's profile photo
Kip Boahn's profile photo
Eric William (MKme Tech)'s profile photo
Tony Mach's profile photo
Dongle lk's profile photo
Steven Roberts's profile photo
Nadia Sindi's profile photo
Meka Ibeh's profile photo

Caesar Passée

Discussion  - 
 
Hi folks,
               I'm i need some help with a geetech vs1053 MP3 shield.
When trying to play middle C from the IDE serial window I send 
noteOn(0,60,127); expecting to hear C with velocity of 127. but nothing plays.
The docs say 
" *  (1) Through SPI, at an arbitrary data rate. For SPI, each byte of MIDI data needs to be prefixed by a 0 byte 
 *      (The V1053b data sheet erroneously states that the padding should be a 0xFF byte)."

Do I need to send 0xFFnoteOn(0,60,127) or noteOn(0xff,0,60,127) or noteOn(0, 0,60,127)? I've tried so many things I've lost track.

BtW: Geeetech is a terrible company. Their example code is useless, their libraries are full of errors and incomplete. No rtmidi set in their examples and a horrible forum. Gee wiz.
Here's the code i'm trying to run:
https://gist.github.com/microtherion/2636608/download#file-mp3_shield_realtimemidi-ino

Any help would be greatly appreciated.
Thanks much
1
Add a comment...

Caesar Passée

Shared publicly  - 
2
Add a comment...

Caesar Passée

Shared publicly  - 
1
Add a comment...

Caesar Passée

Shared publicly  - 
 
Call to optimize code: Here is the code for my Digital drum (arduino) project. As this is my first physical computing  endeavor I'm not very prolific yet. If anyone knows of a way a could code this more efficiently nor reshuffle the sketch for better performance your suggestions/ comments would be greatly appreciated    
Thank you in advance.
 
код
#include <Wire.h>
#include "Adafruit_MCP23017.h"
#include <EEPROM.h>
#include "pitches.h"

//*****************************************************************************
// User settable variables
//*****************************************************************************
unsigned char PadNote[48] = {64,69,62,67,60,65,84,86,71,66,61,68,63,70,85,87,
                             64,69,62,67,60,65,84,86,71,66,61,68,63,70,85,87, 
                             76,81,74,79,72,77,84,86,83,78,73,80,75,82,85,87};        // MIDI notes from 0 to 127 (Mid C = 60) for drums

int PadCutOff[48] = {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
                     8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
                     8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8};           // Minimum Analog value to cause a drum hit, default=600

int MaxPlayTime[48] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};               // Cycles before a 2nd hit is allowed, default=90

#define  midichannel 0;                              // MIDI channel from 0 to 15 (+1 in "real world")
boolean VelocityFlag  = true;                           // Velocity ON (true) or OFF (false)
//************************************************************************************
// Internal Use Variables
//************************************************************************************
// Defines

// MuxShield:
// Give convenient names to the control pins of the muxshield
#define CONTROL0 5    
#define CONTROL1 4
#define CONTROL2 3
#define CONTROL3 2
// Create arrays for data from the the MUXs
// See the Arduino Array Reference: http://www.arduino.cc/en/Reference/Array
//int mux0array[16]; //**********
int mux1array[16];
int mux2array[16]; //**********
int analogPin=0;
int pad=0;

//Adafruit_MCP23017 mcp0; //first MCP23017  //****************
Adafruit_MCP23017 mcp1; //second MCP23017
Adafruit_MCP23017 mcp2; //third MCP23017  //****************

int pattern =0; //create an interger

boolean activePad[48] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};                   // Array of flags of pad currently playing
int PinPlayTime[48] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};                     // Counter since pad started to play
unsigned char status;
int pin =0;     
int hitavg = 0;
//midi through
byte byte1;
byte byte2;
byte byte3;
//  Making analog readings faster (for drumrolls) works with this code
// read http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11 for more info
#define FASTADC 1
// defines for setting and clearing register bits
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

// notes to play, corresponding to the 48+ sensors:
int notes[48] = {NOTE_E5,  NOTE_A5,  NOTE_D5,  NOTE_G5,  NOTE_C5,  NOTE_F5,  NOTE_C7,  NOTE_D7,
                 NOTE_B5 , NOTE_FS5,  NOTE_CS5,  NOTE_GS5,  NOTE_DS5,  NOTE_AS5,  NOTE_CS7,  NOTE_DS7,//******************* 
   NOTE_E5,  NOTE_A5,  NOTE_D5,  NOTE_G5,  NOTE_C5,  NOTE_F5,  NOTE_C7,  NOTE_D7,
   NOTE_B5 , NOTE_FS5,  NOTE_CS5,  NOTE_GS5,  NOTE_DS5,  NOTE_AS5,  NOTE_CS7,  NOTE_DS7,//*************************
                 NOTE_E6,  NOTE_A6,  NOTE_D6,  NOTE_G6,  NOTE_C6,  NOTE_F6,  NOTE_C7,  NOTE_D7,
                 NOTE_B6 , NOTE_FS6,  NOTE_CS6,  NOTE_GS6,  NOTE_DS6,  NOTE_AS6,  NOTE_CS7,  NOTE_DS7 };//***************************

// Start of code
//*********************************************************************************************
// Setup
//**********************************************************************************************
void setup() 
{
//Set I2C/GPIO Port Expander  
//Initallize i2C bus
// mcp0.begin(0); //initialize MCP23017 0  //*********
mcp1.begin(1); //initialize MCP23017 1
mcp2.begin(2); //initialize MCP23017 2   //*********
// make all pins outputs
for(int i=0; i<16; i++){
// mcp0.pinMode(i, OUTPUT); //****************
mcp1.pinMode(i, OUTPUT);
mcp2.pinMode(i, OUTPUT); //****************
}
//Set MUX control pins to output
pinMode(CONTROL0, OUTPUT);
pinMode(CONTROL1, OUTPUT);
pinMode(CONTROL2, OUTPUT);
pinMode(CONTROL3, OUTPUT);

 

//Serial.begin(9600);                                   // connect to the serial port 9600 (for debug)
//Serial.begin(57600);                                  // connect to the serial port 57600
Serial.begin(31250);                                 // connect to the serial port (31250) //midi standard
//Serial.begin(115200);                                   // connect to the serial port 115200
#if FASTADC
  // set prescale to 16
  sbi(ADCSRA,ADPS2) ;
  cbi(ADCSRA,ADPS1) ;
  cbi(ADCSRA,ADPS0) ;
#endif
}
//***********************************************************************************************
// Main Program
//***********************************************************************************************
void loop(){
  
  //loopback all incoming midi events
  midiLoopback();
//  readSensors(0); //  *********
  readSensors(1);
  readSensors(2); //**********
//  checkSensors(0); //  *********
  checkSensors(1);
  checkSensors(2);//**********
 
}

void readSensors(int analogPin){
    //This for loop is used to scroll through and store the 16 inputs on the FIRST multiplexer
  for (int i=0; i<16; i++){
    digitalWrite(CONTROL0, (i&15)>>3); 
    digitalWrite(CONTROL1, (i&7)>>2);  
    digitalWrite(CONTROL2, (i&3)>>1);  
    digitalWrite(CONTROL3, (i&1));     

    //Read and store the input value at a location in the array
//    if(analogPin==0){  //  *********
//    mux0array[i] = analogRead(analogPin);  //************
//    } //  ***********
     if(analogPin==1){
      mux1array[i] = analogRead(analogPin);
    }
     if(analogPin==2){ //********
      mux2array[i] = analogRead(analogPin); //**********
    } //********
  }
}

void checkSensors(int analogPin)
{

   for(int pin=0; pin <16; pin++)
   {   
//      if(analogPin==0) // *********
//      { //************
//         hitavg = mux0array[pin]; //********
//         pad=pin; //************
//      } //**************
      if(analogPin==1)
      {
         hitavg = mux1array[pin];
         pad=pin+16;
      }
      if(analogPin==2) //************
      { //*****************
         hitavg = mux2array[pin];//***********
         pad=pin+32;//****************
      } //************

      if((hitavg > PadCutOff[pin]))
      {
         //Serial.writeln("hitavg > PadCutOff[pin])");
         if((activePad[pad] == false))
         {
            if(VelocityFlag == true)
            {
                 //hitavg = 127 / ((1023 - PadCutOff[pin]) / (hitavg - PadCutOff[pin]));    // With full range (Too sensitive ?)
                 hitavg = (hitavg / 8) -1 ;                                                 // Upper range
            }
            else
            {
               hitavg = 127;
            }
            
            MIDI_TX(144,PadNote[pad],hitavg); 
            PinPlayTime[pad] = 0;
            activePad[pad] = true;
            tone(8, notes[pad]);
         }
         else
         {
            PinPlayTime[pad] = PinPlayTime[pad] + 1;
         }         
      }
      else 
      {
         if((activePad[pad] == true))
         {
            PinPlayTime[pad] = PinPlayTime[pad] + 1;

            if(PinPlayTime[pad] > MaxPlayTime[pad])
            {
               activePad[pad] = false;
               MIDI_TX(128,PadNote[pad],127);
              noTone(8); 
            }
         }
      }
            
//      if(analogPin==0) //******************
//      { //********************
//         if (activePad[pad]) //*******************
//            mcp0.digitalWrite(pad, HIGH); //*************
//         else //****************
//            mcp0.digitalWrite(pad, LOW);  //******************
//      }  //************************
  if(analogPin==1)
      {
         if (activePad[pad])
            mcp1.digitalWrite(pad-16, HIGH);
         else
            mcp1.digitalWrite(pad-16, LOW);
      }
      if(analogPin==2) //***********
      { //****************
         if (activePad[pad]) //************
            mcp2.digitalWrite(pad-32, HIGH);//*************
         else //*************
            mcp2.digitalWrite(pad-32, LOW);//***********************
      }//********************
   }
}

//*****************************************************************************************
// Transmit MIDI Message
//*****************************************************************************************
void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY) 
{
  status = MESSAGE + midichannel;
  Serial.write(status);
  Serial.write(PITCH);
  Serial.write(VELOCITY);
}

 //************* MIDI LOOPBACK ****************//
void midiLoopback(){
  if(Serial.available() > 0){
      byte1 = Serial.read();
      byte2 = Serial.read();
      byte3 = Serial.read();
      
      MIDI_TX(byte1, byte2, byte3);
    }
  }
  
View original post
1
Caesar Passée's profile photo
 
I may attempt to run this on the Raspberry Pi, and to do that I'll have to convert the C++ in Python  Pondering what that might look like...
Add a comment...

Caesar Passée

Shared publicly  - 
 
Caesar Passée originally shared:
[Christian] wrote in to tell us about his third-generation Arduino MIDI sequencer (translated) called the AM808 VX3. He had already laid a strong base for the project in his previous versions. But ...
1
Add a comment...

Caesar Passée

Shared publicly  - 
 
Arduino LiquidCrystal - Serial Input
3
2
Caesar Passée's profile photoRob Goodson's profile photo
Add a comment...
People
Have them in circles
845 people
New York Arts's profile photo
by rastt's profile photo
Kip Boahn's profile photo
Eric William (MKme Tech)'s profile photo
Tony Mach's profile photo
Dongle lk's profile photo
Steven Roberts's profile photo
Nadia Sindi's profile photo
Meka Ibeh's profile photo
Work
Occupation
Percussionist
Employment
  • Arts for Transit
    Percussionist, present
Story
Tagline
Loving "America you sexy bitch"! [The Book]
Introduction

________________________________________
_______________________11_______________
____________________1__¶¶_______________
___________________1_1¶¶¶1______________
__________________11_¶¶¶¶_______________
_________________11_¶¶¶¶1_______________
________________1__¶¶1_1________________
_______________1_1¶¶¶__1________________
_______________1_1¶¶¶___________________
_____________11_¶¶1¶¶¶¶_________________
______________1¶¶¶¶1¶¶1_________________
_______________1¶¶111¶__________________
_________________111¶¶__________________
_________________1¶¶¶¶__________________
_________________11111__________________
_________________11__1__________________
_________________11__1__________________
_________________11111__________________
_________________11111__________________
_________________111_1__________________
_________________11__1__________________
_________________11111__________________
_________________11111__________________
_________________11111__________________
_________________11__11_________________
_________________11__11_________________
_________________111111_________________
_________________111111_________________
_________________11__11_________________
_________________111111_________________
_________________111111_________________
_________________11__11_________________
_________________11__11_________________
_________________111111_________________
_________________111111_________________
_________________111111_________________
_________________1_11_1_________________
_________________111111_________________
_______1_________111111_________________
_____1¶¶_________111111_________________
____1¶¶¶_________111111_________________
____¶¶¶¶_________111111_________________
____¶¶¶¶1________111111_________________
____¶¶¶¶¶________111111___________1_____
____1¶¶¶¶¶1____11111111__________¶¶¶____
_____¶¶¶¶¶¶¶¶¶¶¶1111111__________¶¶¶1___
_____1¶¶¶¶¶¶¶¶¶¶1111111_________1¶¶¶1___
______¶¶¶¶¶¶¶¶¶¶11111111_______11¶¶¶____
______1¶¶¶¶¶¶¶¶¶1_111111¶___111_1¶¶¶____
_______¶¶¶¶¶¶¶¶¶11111111¶¶¶1¶¶1_¶¶¶_____
________¶¶¶¶¶¶¶¶11111111¶¶¶11¶¶¶¶¶1_____
________¶¶¶¶¶¶¶¶111111111¶¶¶¶¶¶¶¶¶______
________¶¶¶¶¶¶¶¶¶1¶¶¶111¶¶¶¶¶1¶¶¶_______
________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_______
_______1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1______
_______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶______
______¶¶¶¶¶¶¶¶¶¶11111111¶¶¶1¶¶¶¶¶¶¶_____
_____¶¶¶¶¶¶¶¶¶¶¶11111111¶¶¶1¶1¶¶¶¶¶¶____
____¶¶¶¶¶¶¶¶¶¶¶¶1111¶111¶¶1¶¶¶¶¶¶¶¶¶¶___
___1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶¶¶¶¶¶¶1__
___¶¶¶¶¶¶¶¶¶¶¶1¶¶1111111¶1¶¶¶¶¶11¶¶¶¶¶__
__¶¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_
__¶¶¶¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1_¶¶¶¶_
_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_
_1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_
__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_
__1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_
___1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__
_____¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1___
_______1¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶1______

Bragging rights
Grad studies at school of hard knocks. Full time musician. Friend of those who's lives are lonely too.
Links
Caesar Passée's +1's are the things they like, agree with, or want to recommend.
Everyday Linux User
www.everydaylinuxuser.com

This blog is written by an everyday Linux user for other Linux users or people who might one day want to become a Linux user.

ArduinoPrX Home
translate.googleusercontent.com

ArduinoPrX.De Arduino Mikrocontroller / Software Development / Developing For the World / C/C++ Programmierung für jedermann

ArduinoPrX.de Arduino Midi Sequencer / Controller AM808 VX3 (PrXoS) - Do...
translate.googleusercontent.com

ArduinoPrX.De Arduino Mikrocontroller / Software Development / Developing For the World / C/C++ Programmierung für jedermann

Rahm Emanuel and Grover Norquist on Immigration Reform - C-SPAN Video Li...
www.c-spanvideo.org

Chicago Mayor Rahm Emanuel and Grover Norquist debated immigration reform.

Security Now 408 | TWiT.TV
twit.tv

Diving deep and defining NSA's PRISM data collection, and more.

XBMC HUB
plus.google.com

The Best Third Party Addons for XBMC

Arduino Basics
plus.google.com

Arduino Basics: Have Fun learning by example

Design Engineer Community | Online Electronic Resources and Support Home...
www.element14.com

element14.com is a design engineer community for sharing electronic engineering solutions. Find resources for technical components, specific

Phys.org
plus.google.com

Science, Research, Technology, Physics, Nanotech, Space News

Google+ Platform — Google Developers
developers.google.com

Developers. Google+ Platform. Overview; +1 Button; Hangouts. Writing Apps; Running Apps; API Reference. API. People. get. Activities. list;

Geek Cowboy: Review: SparkFun DAC Breakout Board Tutorial: Have Byte, Wi...
www.geekcowboy.net

Welcome to GeekCowboy.net. A blog dedicated to raising awareness and interest in technology, engineering, and science. And applying those

MAKE
plus.google.com

DIY Projects, Inspiration, How-tos, Hacks, Mods &amp; More @ Makezine.com - Tweak Technology to Your Will

Home | TWiT.TV
twit.tv

Search form. Search this site: RSS Feeds; Calendar Schedule; Podcasts on iTunes. this WEEK in TECH; The Tech Guy; MacBreak Weekly; Windows W

Arduino Forum - Faster Analog Read?
www.arduino.cc

chrios. YaBB Newbies Offline Arduino rocks Posts: 8. Faster Analog Read? 20.04.2008 at 19:18:13. I need to read an analog signal at about 50

Magabot
plus.google.com

An arduino based, open source robotics platform designed to give mobility to any portable computer.

Stack Exchange
plus.google.com

Making the Internet a better place to get awesome answers

Evil Mad Science
plus.google.com

DIY and open source hardware for art, education, and world domination

Raspberry Pi | An ARM GNU/Linux box for $25. Take a byte!
raspberrypi.org

The magnificent Miss Philbin from Geek Gurl Diaries has been having fun with a Raspberry Pi, a thermal printer (the sort that till receipts