bkshepherd / DaisySeedProjects

A collection of hardware and software projects based around the Electro-Smith Daisy Seed
MIT License
229 stars 34 forks source link

Unexpected Issue with the SMD Version #17

Open PaixLagie opened 1 month ago

PaixLagie commented 1 month ago

Hi!

Before we start, I want to clarify that I’m not using SDRAM and that I only want to activate a single effect.

I’m facing an issue with the SMD version of the pedal. Indeed, when I strictly follow your recommendations for flashing the Daisy Seed, I encounter this kind of problem:

guitar_pedal.cpp:23:1: error: 'GuitarPedal1590B' does not name a type
   23 | GuitarPedal1590B-SMD hardware;
      | ^~~~~~~~~~~~~~~~
guitar_pedal.cpp:26:37: error: 'hardware' was not declared in this scope
   26 | PersistentStorage<Settings> storage(hardware.seed.qspi);
      |                                     ^~~~~~~~
guitar_pedal.cpp: In function 'void AudioCallback(daisy::AudioHandle::InputBuffer, daisy::AudioHandle::OutputBuffer, size_t)':
guitar_pedal.cpp:97:5: error: 'hardware' was not declared in this scope
   97 |     hardware.ProcessAnalogControls();
      |     ^~~~~~~~
guitar_pedal.cpp: In function 'void HandleMidiMessage(daisy::MidiEvent)':
guitar_pedal.cpp:368:10: error: 'hardware' was not declared in this scope
  368 |     if (!hardware.SupportsMidi())
      |          ^~~~~~~~
guitar_pedal.cpp:402:9: error: 'hardware' was not declared in this scope
  402 |         hardware.midi.SendMessage(midiData, sizeof(uint8_t) * bytesToSend);
      |         ^~~~~~~~
guitar_pedal.cpp: In function 'int main()':
guitar_pedal.cpp:466:5: error: 'hardware' was not declared in this scope
  466 |     hardware.Init();
      |     ^~~~~~~~
make: *** [libDaisy/core/Makefile:285: build/guitar_pedal.o] Error 1

So, I concluded that using - was causing the issue. I removed all the - both in the code and in the names of guitar_pedal_1590bSMD.h and guitar_pedal_1590bSMD.cpp (I could have used _, but I’m not sentimental about it). Once that was done, I had no compilation issues.

Next:

I ran $ make program-boot and everything went fine. Same for $ make program-dfu, no issues.

Then came the crucial moment when I tested my overdrive. But absolutely nothing happened. The sound passes through both jacks just fine. The Daisy Seed is properly connected. I tested with a multimeter, and the current seems fine everywhere.

But I don’t understand where the problem could be. I must be doing something wrong because it would be strange if I were the first one to encounter this issue.

Are you still working on this project?

PS: I’m still a beginner please don’t get mad at me. I don’t see the rule: make build-and-program-dfu

bkshepherd commented 1 month ago

Strange. Just to confirm you trying to build the software to run on the 1590b smd hardware, correct?

If so, in guitar_pedal.cpp at the top you would need to have:

include "Hardware-Modules/guitar_pedal_1590b-SMD.h" (instead of the 125b version)

and then

// Hardware Interface GuitarPedal1590BSMD hardware;

You shouldn't have needed to remove the "-" from the file name. It compiles just fine for me as is, but perhaps there is some difference in compilers that doesn't like the "-". I'm on a mac, not sure if that matters.

As for why there is no sound, that sounds strange.

in the guitar_pedal.cpp, what does your main function look like? I assume you modified this part:

// Init the Effects Modules
availableEffectsCount = 8;
availableEffects = new BaseEffectModule*[availableEffectsCount];
availableEffects[0] = new ModulatedTremoloModule();
availableEffects[1] = new OverdriveModule();
availableEffects[2] = new AutoPanModule();
availableEffects[3] = new ChorusModule();
availableEffects[4] = new ChopperModule();
availableEffects[5] = new ReverbModule();
availableEffects[6] = new MultiDelayModule();
availableEffects[7] = new MetroModule();

to only list your new overdrive module? It may be worth trying to have it use one of the existing sample ones to see if it works.

Also, sometimes the flash memory on the seed gets into a weird state. The simplest way to get it to reset is to modify guitar_pedal_storage.h to change:

// Peristant Storage Settings

define SETTINGS_FILE_FORMAT_VERSION 2

to another number. Like 1 or 3 doesn't matter. Then recompile and flash it to the device. When a file format mis-match is detected it will force clearing the flash memory.

Hope that helps.

Also, to answer your question. I'm not actively working on the project at the moment, but I do hope to pick it back up sometime in the near future.

PaixLagie commented 1 month ago

Hi there!

I've made some progress in my research, and it seems like my compiler is acting up completely.

Just to confirm, you're trying to build the software to run on the 1590b SMD hardware, correct? Correct!

Despite the errors, the compilation is still working:

Capture d'écran 2024-10-04 095016

I'm curious to know which compiler you're using.

As for why there's no sound, it's strange. The basic guitar sound works, but 0 effects . I've tried other options besides the overdrive with effects you kindly shared. By tinkering with my compiler, I managed to get the tremolo effect working, but strangely, it's the only one that works. With the others, I just get the normal guitar sound without any effect.

My hypothesis is that the lack of SDRAM seriously limits which effects I can use.

I tried to modify this:

#define SETTINGS_FILE_FORMAT_VERSION 2 ...but nothing notable happened. :/

I'll keep this post updated as I continue my investigation whenever I get a bit more time.