Go Down

Topic: Arduino organ project - compile fail (Read 3724 times) previous topic - next topic

Pat-The-Pirate

Hi Sparx,

I did as you suggested, and while I got more errors (mostly relating to "unused parameter" I DID get a white text

Sketch uses 10380 bytes (32%) of program storage space. Maximum is 32256 bytes.
Global variables use 642 bytes (31%) of dynamic memory, leaving 1406 bytes for local variables. Maximum is 2048 bytes.

at the end.

However, when I tried "Upload" I got

Invalid library found in C:\Program Files\Arduino\libraries\Midi: C:\Program Files\Arduino\libraries\Midi
Invalid library found in C:\Program Files\Arduino\libraries\Midi: C:\Program Files\Arduino\libraries\Midi

and I don't get any audio.

I tried the ComboOrgan with 1.0.5, 1.0.6 and 1.8.3 with no great success.

I suspect

(a) That these sketches require a Midi controller with controls that the sketch can interpret as a drawbar, and that you can't expect any sound until this happens,

(b) That I've got the wrong libraries, and

(c) That I am actually trying to get things to work that I am not competent to understand.

I really appreciate the help that everybody has offered, but I kind of feel that I am beginning to waste everyone's time; it is not simple to resurrect code that the authors wrote a relatively long time ago, and no longer have an interest in. If they would only reply it would have been great.

For an Arduino dummy like myself, it is probably impossible to get these sketches working, especially as you need either a shield, or a scope to check whether the SCK is toggling. I think I'll have to stick to one-note-at-a-time until I can master enough "C" to go polyphonic.

In addition, I've only got a 1MB connection here which makes surfing a nightmare.

I'll attach the error file in case anyone wants a look. Sorry to be so negative!

Cheers

Jim

Pat-The-Pirate

Hi All,

I just saw Sparx's mention that "Healer uses a different Midi library than the FortySeven effects one" and my heart sank.

I had a feeling this might be the case, because other sketches I have that use "Midi.h" , were working until I changed to the 47 library. Then they threw up (errors).

Isn't this a bit daft?

I don't have enough understanding to write these sophisticated audio sketches, but I do know daft when I see it.

I couldn't have different versions of libraries side-by-side on my PC with the SAME FILE NAME - I'd get lost! And you can't have more than one, otherwise the compiler gets cross.

As I said before I think I'll have to go and learn Arduino and C++ and write polyphonic organ sketches that don't require a Midi library.

Time for a nice glass of Merlot, I suspect.

Who needs libraries anyway?


Pat-The-Pirate

Thanks to Sparx for all the effort. I have a horrible feeling that I've picked up something horrible like the "wrong" Midi.h file, or perhaps there's something in this PC which hates libraries.

I have all the Arduino source files and libraries on my C: drive, and all the sketches on a separate hard drive, which I've heard is a fairly normal way to arrange the Arduino world.

Otherwise, I am in the lap of the gods, and it is not a good place to be. I've got all the upper- and lower-case issues out of the way, and there is no spitting back about missing any of the libraries.

Is there an official Midi library that comes with the IDE? I only ask, because the errors, in my head, seem to point to this library as being the weakest link, and I seemed to get directed to a gihub repository for it; who knows what sort of mashing it has had in there?


Pat-The-Pirate

Well, full marks to Sparx ( ! ) for getting me in possession of a working copy of the Littlebits  / Drongowski MidiOrgan. I can now play 5 notes at a time i.e. a full chord on the piano, which is just magic.

I don't know precisely how he achieved it, that's perhaps a story for another day. The Midi library definitely had a hand in it, assuming libraries have hands.

For me it calls the so-called Arduino Libraries into question, because it seems from the Github site that there is more than one "Midi" library, and the one the works is labelled "Development" which to my mind says that it could be changed.

Wouldn't it be better for the sales of Arduino products to control the libraries so that they don't become backwards-incompatible?

Perhaps I'd better retract that question.

But it does seem that other midi-dependent sketches such as Roto and Healer all suffer from the same blight, although I can't prove it. Grumpy Mike wouldn't put up with it!!

If anyone wants, I'll poke out the working file set & attach it in this thread.

What a happy ending to a months futile poking!

Pat-The-Pirate

I had a look at Roto, which is now toggling my three SPI pins quite nicely. Heck, I'm getting good.

(My shield uses pin 10 for SPI SS per the Atmel datasheet & I altered the SPI PortB instructions to suit:

(were      PORTB &= ~(1<<1);  PORTB |= (1<<1);
now    PORTB &= ~(1<<2);  PORTB |= (1<<2);  )

Still no audio . . .

Pat-The-Pirate

Well, full marks to Sparx ( ! ) for getting me in possession of a working copy of the Littlebits  / Drongowski MidiOrgan. I can now play 5 notes at a time i.e. a full chord on the piano, which is just magic.
The organ kept stalling so I started grubbling around looking for possible causes.

Well, I found that the code reads A0 but the project doesn't add any hardware to actually set A0. A0 is floating if you follow the project instructions. Not good practice.

If A0 is at zero volts, a Farfisa organ sound is selected. In theory, if you raise A0 above 2.5V, you get a Vox sound. However, there is no sound at A0 >= 2.5V because of some other perhaps code- or UNO-related problem. (The project is geared toward Leonardo).

This caused endless grief for me although I didn't realise it at the time: my unconnected A0 tended to fly above 2.5V when powering up the board, in addition to any static effects, so half the time I wasn't getting any sound, but not for reasons connected with the libraries etc.

Fixed in minutes with a 1K resistor and a SPST switch to 3.3V.

The other thing he doesn't say in the description is that it can only play 5 octaves, which is Ok once you know what's happening, but leads to paranioa if everything else has gone wrong in the meantime.

 >:(

Go Up