Protonerd / FX-SaberOS

System code for Arduino based Lightsaber replicas for DIYino family boards
Creative Commons Zero v1.0 Universal
92 stars 42 forks source link

Soundfonts #24

Closed FatherCool closed 6 years ago

FatherCool commented 6 years ago

Hi, I am very very new to arduino and even more to managing sound files through them. How do I load soundfonts onto my saber so that the code knows where to look for them? Do I need to change anything in the code to suit what I have loaded?

Argathena commented 6 years ago

What kind of setup you got? Homebrew, Diyino Prime or a Diyino Stardust?

FatherCool commented 6 years ago

Hi Sorry, I am building a home brew with a Star LED as a starter. I'm also not sure how to get the code to compile once I'm happy as when I click to verify the .ino file it can't find the library files.

I am pretty new to this so take it easy. I have only done basic programming on Arduino previously to control servos and the like.

Argathena commented 6 years ago

I am not many steps ahead of you. I'd say get the code to compile first then work on sounds cause sounds will do you no good with out the code.

Have a look at the Stardust Pdf or the Prime pdf. In them are instructions on how to load libraries properly as well as sound. Sound is really easy. I assume you have an micro sd break out in your homebrew set up.

Format sd card(do not just delete, you have to copy files in a specific order, and erasing instead of formatting won't work) Copy config sound files. Should be 29 of them, and they need to be copied in order.( highlight all 29, click and drag first file to sd card. Should copy that way) Next sound fonts. Using the ones that come with Fx-saber os is highly advised til you fully understand. If you just grab the whole folder and copy, it will copy in proper order.

But really study those pdfs because they aren't far from a homebrew setup as far as compiling and sound fonts.

It's gonna take some homework and time to get this down. Best I can help with my self.

Argathena commented 6 years ago

https://github.com/Protonerd/DIYino?files=1

FatherCool commented 6 years ago

Thanks for that. Its very helpful.

The pdf didn't contain what I needed for the code to compile but I did find what I needed elsewhere on the arduino site. I have managed to compile it now.

I can't try it out yet as I am waitkng for my nano, DFplayer and MPU-6050 to arrive. I kust wanted to get prepared by looking through the code.

As soon as it does I will get it mocked up on the breadboard.

I just couldn't see in the code where the soundfonts were being called and how it will know where to look for them (file names). I was hoping to install 3 soundfonts to take my mood. I will of course follow your advice once I get it running.

FatherCool commented 6 years ago

On another note while I still wait. How do you set up the initial blade colour and when youve set it how does it remember what colour it was last when you turned it off? Or does it lose the last colour setting once off completely (kill switched)?

Protonerd commented 6 years ago

https://github.com/Protonerd/FX-SaberOS/wiki/Soundfont.h

jbkuma commented 6 years ago

Any changes to settings are saved to EEPROM and will be used the next time the saber is powered. In the current version there is no way to set initial color settings.

On Dec 6, 2017 3:52 AM, "FatherCool" notifications@github.com wrote:

On another note while I still wait. How do you set up the initial blade colour and when youve set it how does it remember what colour it was last when you turned it off? Or does it lose the last colour setting once off completely (kill switched)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/24#issuecomment-349574234, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMBeH6NmQbQDxPXhJ2j6ckhWefUdPks5s9lWvgaJpZM4Qz2fJ .

FatherCool commented 6 years ago

Ah that makes sense. Does it just power up white then on the first run or no LEDs on at all?

Also back to the code. When I load up the .ino file and click verify it still brings up a large number of orange warnings and such at the bottom. Is this normal?

jbkuma commented 6 years ago

If it complies then it is probably fine.

On Dec 6, 2017 9:30 AM, "FatherCool" notifications@github.com wrote:

Ah that makes sense. Does it just power up white then on the first run or no LEDs on at all?

Also back to the code. When I load up the .ino file and click verify it still brings up a large number of orange warnings and such at the bottom. Is this normal?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/24#issuecomment-349655797, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMJTs4Cnuy6pIKiZf6ZvRKJx8yoBIks5s9qT0gaJpZM4Qz2fJ .

FatherCool commented 6 years ago

Well it completed in the latest IDE but failed in 1.6.5 so not sure really. I didn't touch anything I just compiled it as it was!

jbkuma commented 6 years ago

1.6.5 is too old

Jason "Kuma" Brinkerhoff Mad Science Workshoppe, proprietor http://jbkuma.com/workshoppe

On Wed, Dec 6, 2017 at 9:45 AM, FatherCool notifications@github.com wrote:

Well it completed in the latest IDE but failed in 1.6.5 so not sure really. I didn't touch anything I just compiled it as it was!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/24#issuecomment-349660425, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMNIgDzWY8plaRPsCx9jBY-T47gcPks5s9qiXgaJpZM4Qz2fJ .

FatherCool commented 6 years ago

Fair enough. I am keen to get it breadboarded and see how it goes.

jbkuma commented 6 years ago

Careful with your connection, I recommend connecting your pixels directly to your supply (preferably 3.5-4.2v) or battery (connect the grinds) while breadboarding. Many breadboards have a high impedance and will get hot and possibly melt or ignite. My original experiments were exciting...

On Dec 6, 2017 10:24 AM, "FatherCool" notifications@github.com wrote:

Fair enough. I am keen to get it breadboarded and see how it goes.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/24#issuecomment-349672260, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMPMUWck1Si5ruveo9D4keFfU4bAMks5s9rGRgaJpZM4Qz2fJ .

FatherCool commented 6 years ago

Noted. I intend to wire it as per the saber really and I will be using an RGB Star tri cree for now. I am planning to have a go with neopixels in the new year though once I have the code down.