Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 84
331  Using Arduino / Audio / Re: MIDI library conflict? on: December 10, 2013, 03:56:23 am
In the MIDI library header file there is this
Code:
#define USE_SERIAL_PORT         Serial      // Change the number (to Serial1 for example) if you want
                                            // to use a different serial port for MIDI I/O.

which means that you can change the serial port used to something else if you want to.

The MIDI library has a generic function to send messages
Code:
void send(kMIDIType type, byte param1, byte param2, byte channel);

which you can invoke in the MIDIfile callback function, which receives as its parameter a pointer to this structure (defined in the MIDIfile header file)
Code:
typedef struct
{
uint8_t track; // the track this was on
uint8_t channel; // the midi channel
uint8_t size; // the number of data bytes
uint8_t data[4]; // the data. Only 'size' bytes are valid
} midi_event;

- The track you can ignore, as it is the track in the SMF being processed.
- The channel should be mapped to the channel in the send() function above. Need to take care that whether the channel is zero or one based in MIDI. MIDIfile is zero based.
- The rest of the data[] are KMIType, param1 and param2.

If you look at MIDI  header file KMIType is
Code:
enum kMIDIType {
NoteOff               = 0x80, ///< Note Off
NoteOn                = 0x90, ///< Note On
AfterTouchPoly        = 0xA0, ///< Polyphonic AfterTouch
ControlChange         = 0xB0, ///< Control Change / Channel Mode
ProgramChange         = 0xC0, ///< Program Change
AfterTouchChannel     = 0xD0, ///< Channel (monophonic) AfterTouch
PitchBend             = 0xE0, ///< Pitch Bend
SystemExclusive       = 0xF0, ///< System Exclusive
TimeCodeQuarterFrame  = 0xF1, ///< System Common - MIDI Time Code Quarter Frame
SongPosition          = 0xF2, ///< System Common - Song Position Pointer
SongSelect            = 0xF3, ///< System Common - Song Select
TuneRequest           = 0xF6, ///< System Common - Tune Request
Clock                 = 0xF8, ///< System Real Time - Timing Clock
Start                 = 0xFA, ///< System Real Time - Start
Continue              = 0xFB, ///< System Real Time - Continue
Stop                  = 0xFC, ///< System Real Time - Stop
ActiveSensing         = 0xFE, ///< System Real Time - Active Sensing
SystemReset           = 0xFF, ///< System Real Time - System Reset
InvalidType           = 0x00    ///< For notifying errors
};

which are basically the MIDI codes for those functions. These should correspond to the first byte in data[].
332  Using Arduino / Audio / Re: MIDI library conflict? on: December 09, 2013, 08:20:52 pm
If the MIDI library uses the serial port, then you cannot have the MIDIFile library opening up the same serial port. I am not sure what the effect would be, but it is likely that the last 'open' is the one that works and the other is lost.

What you should probably be doing is calling the generic MIDI 'send a message' library call using the parameters from the MIDIFile callback rather than calling the serial routines (ie, all your MIDI messages are sent through the MIDI library).
333  Community / Website and Forum / Re: Signature changes will not stick on: December 09, 2013, 06:28:25 am
@AWOL I still struggle to understand when 'they' will know it is right and how we will find out so that we can just make our changes once. No response from the webmaster, btw.

I don't think anyone disagrees with the need for it if it stops the spammers, just the lack of comms is a bit frustrating.

Out of interest, my new signature is less than 140 chars, the old one is not!
334  Using Arduino / Audio / Re: LDR with logic pro 9 (midi trigger) on: December 07, 2013, 07:23:36 pm
What is your circuit and what is your code?
335  Using Arduino / LEDs and Multiplexing / Re: 8x8 dot matrix with MAX7219 on: December 05, 2013, 02:52:16 pm
As I said in my previous post, look at Parola if you want to have message on the display. If you just want to treat the 8x8 displays as individual smaller display (independent), then the transformation functions in my MD_MAX72xx library (link below in the repository). Read the documentation for the library.

You will not find examples to do exactly what you want because it is pretty unusual!
336  Using Arduino / LEDs and Multiplexing / Re: 8x8 dot matrix with MAX7219 on: December 05, 2013, 01:56:49 am
Look at Parola (http://parola.codeplex.com) and on this thread http://forum.arduino.cc/index.php?topic=171056.0

I would say this will do close to what you want and more.
337  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: December 03, 2013, 10:31:22 pm
Great work Pedro.

Now we have Mama Parola and Baby Parola. Who will do a Papa Parola? I am expecting window size :-)

338  Community / Website and Forum / Re: Signature changes will not stick on: December 03, 2013, 03:12:05 am
So are you saying that these experiments are changing my signature back? If they are, how do I get around them?
339  Community / Website and Forum / Signature changes will not stick on: December 02, 2013, 06:59:47 pm
I have been trying to change my signature for a few days, but it keeps flipping back to the old one.

I can edit the signature successfully (to include codeplex.com sites) but after a while, overnight usually, it just goes back to the old signature (code.google.com).

Anyone else seen this problem and/or have a fix for this? It is damned annoying.
340  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: December 01, 2013, 05:18:46 am
1. The display matrix is about 1.2" square
2. The MAX7219 datasheet says the refresh is minimum 500 Hz, typical 800 Hz. Animation speed depends on what the program does but it can run faster than you can read, for sure. These are definitely not painful on the eyes.
3. Font file is in the library as data. Easy to change if you want to. If you do, send me a copy and it can be included in the main library.

Proportional and fixed width fonts are included. Text messages work best as proportional. Things like the time need a fixed font. The numerals only jump if you want them to.
341  Using Arduino / Programming Questions / Re: Uploading error I am not familiar with (Pro Mini) on: November 24, 2013, 01:33:17 pm
In my setup Rx to Rx and Tx to Tx. The pins are basically connected straight through from one board to the other (5V and GND included), but that clearly depends on the USB converter design.
342  Using Arduino / Programming Questions / Re: Uploading error I am not familiar with (Pro Mini) on: November 23, 2013, 08:01:24 pm
Some things I learned when I was trying to do the same thing a while ago:
- RTS on the serial side gets connected to the RST (Reset) on the Pro Mini. On my USB converter this is up the side of the small PCB.
- In the Windows Device Manager for the COM port, go to the Advanced Setting tab and make sure that "Set RTS on Close" is checked.

For manual reset:
- Start the download from the IDE
- Hold down the reset on the Mini Pro
- When the Tx/Rx light on the USB converter blinks the first time, let the reset go.

The manual reset method works almost 100% of the time if you do it this way. The IDE will retry 3 times to establish connection and then give you the message you see.
343  Using Arduino / Programming Questions / Re: simple LED chaser without delay on: November 23, 2013, 07:51:02 pm
Check out my MultiBlink sketch in the code repository (linked below) for ideas on how this is done. You can also use the sketch directly if you want.
344  Using Arduino / Sensors / Re: New library for TCS230 RGB Color Sensor on: November 21, 2013, 04:10:18 pm
I have not had this problem reported before and I don't get it when I compile my version of the same thing.

Can you compile the test programs that come with the library files?

From the paths it seems like you have installed the 'user' libraries in the Arduino libraries folder. It probably makes no difference, but the recommended location for user libraries is in a libraries folder in your sketchbook folder. This makes it easier to upgrade as this location does not change between upgrades of the Arduino IDE/compiler software. It is also worth a try to see if moving it fixes your problem.

You have not included the rest of your code (ie, the whole sketch). A lot of the time the problems are not where the errors are coming from. Without the entire context it is hard to offer advice about what could be going wrong.
345  Using Arduino / Programming Questions / Re: 2 dimensional array readout problem on: November 19, 2013, 03:43:39 am
Yes.

The data is static (in your case defined as global variables) so the space is allocated before he program, starts to run. If you want to free up that space you should use storage outside the RAM and PROGMEM is one option.
Pages: 1 ... 21 22 [23] 24 25 ... 84