fiduciary

Author Topic: Announcing the Teensy Saber open source sound board  (Read 91579 times)

0 Members and 2 Guests are viewing this topic.

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #120 on: March 11, 2017, 06:50:00 PM »
The FETS I am using are from a local electronics store they are IRFZ48N P222D 8998 That is the info that is one the front of the FET. I double checked that everything was in place it seems to be all good. Yes, I changed the serial monitor setting then it worked perfectly.

Thank you I am glad that I can help. Well, your in luck I have some more questions. 

1) I was able to change the blade arrays and isolate the ones I am using for testing purposes and changed the configurations. The LED still stays on but it no longer dims and brightens with the push button.

2) In the serial monitor it gives all the start information, it says amplifier off but when I type beep it beeps then says amplifier off again. I changed the presets to play the Starwars theme in the sound found. I type play Starwars it says playing but no sound what so ever.

3) Then it recently started saying no SD card even though I have it in and it was working a few minutes before that. I assume some wires are loose or broken I will rewire and get back to you on that.

But before I can continue trouble shooting I have to remake the sandwich again. But I might as well re wire everything to make sure everything is correct. I accidentally broke the micro USB off the teensy. Don't ask how, I am still confused as to how that was possible but none the less I some fixes to make before I can test your possible solutions.

I again thank you for all your help. Hopefully I will have a working one soon. Maybe its time I try to V2 electronics on my next one?

Regards,

GMcIvor

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #121 on: March 11, 2017, 07:52:44 PM »
The FETS I am using are from a local electronics store they are IRFZ48N P222D 8998 That is the info that is one the front of the FET.

I looked up a data sheet for these: http://www.infineon.com/dgdl/irfz48n.pdf?fileId=5546d462533600a40153563ea45a222a

Unfortunately it looks like Vgs potentially more than 3.3v, meaning that they might not be
possible to control properly with the 3.3 volt logic that the teensy puts out. They still
should turn *off* properly though...

Quote
I double checked that everything was in place it seems to be all good. Yes, I changed the serial monitor setting then it worked perfectly.

good!

Quote
Thank you I am glad that I can help. Well, your in luck I have some more questions. 

1) I was able to change the blade arrays and isolate the ones I am using for testing purposes and changed the configurations. The LED still stays on but it no longer dims and brightens with the push button.

That's weird, what does your blades[] and preset arrays look like?

Quote
2) In the serial monitor it gives all the start information, it says amplifier off but when I type beep it beeps then says amplifier off again. I changed the presets to play the Starwars theme in the sound found. I type play Starwars it says playing but no sound what so ever.

Hmm, I might need better error messages...
Assuming starwars.wav is in the root directory on your sd card, the command would be "play starwars.wav".
The amplifier off message is normal.

Quote
3) Then it recently started saying no SD card even though I have it in and it was working a few minutes before that. I assume some wires are loose or broken I will rewire and get back to you on that.

It happens.

Quote
But before I can continue trouble shooting I have to remake the sandwich again. But I might as well re wire everything to make sure everything is correct. I accidentally broke the micro USB off the teensy. Don't ask how, I am still confused as to how that was possible but none the less I some fixes to make before I can test your possible solutions.

Unfortunately the teensy micro-usb connector is not super-strong, so it can break off if force is applied sideways. The teensy 3.5/3.6 fixes this by using through-hole connectors. I've never broken off the connectors on my teensys, but I've managed to damage them in a pletora of other ways. It happens.. :)

Quote
I again thank you for all your help. Hopefully I will have a working one soon. Maybe its time I try to V2 electronics on my next one?

Regards,

GMcIvor

You're welcome. I like doing this stuff, and I think it's AWESOME that someone is doing this in school, so this is the least I can do.  As for the V2, I still don't have any for sale, and the process of getting them is very slow. Of course, you can make them yourself, but it's fair amount of work.

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #122 on: March 13, 2017, 11:13:41 AM »
Sorry for the late response, enjoying the first couple days of spring break!

So,

1) I have a couple of these FETS (1F42AA FQP 30N06L) laying around would they work? What FETS would you suggest I pick up so I can eliminate those from the problem factors.

2) They blade and preset array look exactly like yours. I added an extra one for a 2 led blade instead of 97 (for testing and two will fit nicely in the blade plug). That way it will fit with the belt clip and still emit light and sound. Then I can take the blade plug out and but the blade in for full effect.

3) So, I have the folder named Starwars and in that folder I have the sound font and the tracks. So it said sound font starwars I should be able to type starwars.wav and it will play the starwars theme but it wasn't. Unless this is the incorrect folder structure. Do the sound fonts have to be .wav I have some that are .lsu will those work? I ahve some sound tracks that are .mp3, will those work as well?

4) I like doing this stuff as well. Thank you my students love it and some other teachers are very jealous. One even wants us to build him one! I hope to add more projects like to my courses it engages the students and they get to take something away at the end they can be proud of.

   I have one student who finished writing the script for a short film he is wanting to make. He is trying to have it all filmed and edited for May the 4th. That way we can play it on the TV's around the school. I'm hoping to get the sabers figured out soon. One of the students in the film is using the one she is building as hers in the film. Which she is excited about.

Let me know when you have some for sale I would definitely be interested in picking some up. Yes, it takes time I have ordered circuits from OSH Park too it takes awhile. The time and work is not a problem I have full confidence that I could build on the only thing I don't have would be a re-flow oven to bake the circuits. Also I don't have the tested rig you posted on your build for it to takes the V2 board.

Regards,

GMcIvor
« Last Edit: March 13, 2017, 11:19:03 AM by gmcivor »

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #123 on: March 13, 2017, 11:43:44 AM »
Sorry for the late response, enjoying the first couple days of spring break!

So,

1) I have a couple of these FETS (1F42AA FQP 30N06L) laying around would they work? What FETS would you suggest I pick up so I can eliminate those from the problem factors.

The 1F42AA has a gate-source threshold max of 2.5 volts, so I think they should work fine.
The sparkfun FETs linked from my site are the ones that I used.

Quote
2) They blade and preset array look exactly like yours. I added an extra one for a 2 led blade instead of 97 (for testing and two will fit nicely in the blade plug). That way it will fit with the belt clip and still emit light and sound. Then I can take the blade plug out and but the blade in for full effect.

You probably want to remove all entries you don't want though.
Having LEDs in the blade plug is cool, but make sure you take it out when you're putting the saber away, as
leaving anything plugged into the battery for an extended period of time can damage the battery.

Quote
3) So, I have the folder named Starwars and in that folder I have the sound font and the tracks. So it said sound font starwars I should be able to type starwars.wav and it will play the starwars theme but it wasn't. Unless this is the incorrect folder structure. Do the sound fonts have to be .wav I have some that are .lsu will those work? I ahve some sound tracks that are .mp3, will those work as well?

Currently everything has to be WAV files. 11, 22 or 44khz sampling rate. Mono and stereo both works, but stereo is just wasteful.
I had never heard of an LSU file before this. Apparently LSU files are 44100khz 16-bit RAW mono files.
Currently TeensySaber does not support LSU files, but now that I know about them, I can fairly easily add support. :)
MP3 files are currently not supported,

I don't know what naming conventions are used with LSU fonts, teensysaber currently assumes plecter or NEC naming conventions.
I usually keep my tracks separately from my sound fonts, but there is no particular reason for it.

So, my sd card looks like this:
tracks/title.wav
tracks/duel.wav
font01/hum.wav
font01/boot.wav
font01/poweron.wav
font01/poweroff.wav
font01/.... more font files
font02/hum.wav
font02/boot.wav
font02/.... more fonts

The directories could be called anything, as long as they match what's in the "preset" arrays.
To test sound playback I usually use the command "play tracks/title.wav"

Quote
4) I like doing this stuff as well. Thank you my students love it and some other teachers are very jealous. One even wants us to build him one! I hope to add more projects like to my courses it engages the students and they get to take something away at the end they can be proud of.


   I have one student who finished writing the script for a short film he is wanting to make. He is trying to have it all filmed and edited for May the 4th. That way we can play it on the TV's around the school. I'm hoping to get the sabers figured out soon. One of the students in the film is using the one she is building as hers in the film. Which she is excited about.

Wish all schools had teachers like you! :)

Quote
Let me know when you have some for sale I would definitely be interested in picking some up. Yes, it takes time I have ordered circuits from OSH Park too it takes awhile. The time and work is not a problem I have full confidence that I could build on the only thing I don't have would be a re-flow oven to bake the circuits. Also I don't have the tested rig you posted on your build for it to takes the V2 board.

Regards,

GMcIvor
Will do!

A I use a $22 electric skillet to bake my circuits. :)
At some point I will open-source the test rig as well, I just havne't gotten around to it.

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #124 on: March 13, 2017, 12:38:52 PM »
1) I will give those a try and if not I will order the ones from sparkfun.

2) Yes, I removed all blade arrays except for the charging, 97 LED, and the 2 LED for the blade plug. I can certainly remove the blade plug it will have the same connector as the regular blade just less LED's. I will keep that in mind.

3) Okay I will try find tracks that are WAV file. The reason I asked was because I have found more free sounds fonts that are .LSU When and if you add support let me know. If I am reading this correct is each part of the sound font in its own Font01 folder or in the Font01 folder it will have poweron, poweroff, hum etc..

4) Thank you, that means a lot! This project wouldn't be possible if you haven't paved the way, made everything open source, and are so willing to answer questions from simple to complex. So thank you!!

5) Really? Sometimes low tech is the best solution! What temperature and time do you bake them for?

Regards,

GMcIvor

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #125 on: March 13, 2017, 12:58:32 PM »
3) Okay I will try find tracks that are WAV file. The reason I asked was because I have found more free sounds fonts that are .LSU When and if you add support let me know. If I am reading this correct is each part of the sound font in its own Font01 folder or in the Font01 folder it will have poweron, poweroff, hum etc..
You can just conver them.
just do sox -b 16 -c 1 -r 44100 -e signed-integer -t raw idle.lsu idle.wav.
Then you'll have to rename some files to match what TeensySaber expects:
idle.wav -> hum.wav
impact*.wav -> clash*.wav
motion*.lsu -> swing*.wav

Btw, What I call "tracks" is background music that can optionally play while other sounds are playing.
Auddacity can convert mp3 files to wav I think.

Quote
5) Really? Sometimes low tech is the best solution! What temperature and time do you bake them for?

The skillet goes to 400 degrees, so I just put the lid on, turn it on to max and watch it intently.
Once all the solder has melted, I give it another ~minute, then I turn it off and let it cool down with the lid on.
After it's down to touchable temperatures I take it out and call it done.

SparkFun has a handy guide: Reflow Skillet - SparkFun Electronics

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #126 on: March 13, 2017, 01:44:41 PM »
1) I can convert them? What do I type that into to convert the files? And yes I figured that would be the case.
   Success! Since I cant reprogram the teensy until I fix the usb, I used the current sound font configuration and it plays sound!! Hurray! But the LED still stays on. I think it might be the fets I am going to switch those out later this week.

Which sound font are you using on your sabers?

2) Sounds easy, but you know what they say easier said then done! I'll take a look into it.

Regards,

GMcIvor
« Last Edit: March 13, 2017, 01:48:59 PM by gmcivor »

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #127 on: March 13, 2017, 02:23:59 PM »
1) I can convert them? What do I type that into to convert the files?

sox is a command-line tool. Probably the eaiest way to run in on a windows computer is to install cygwin and type those commands
into a cygwin terminal. I use linux for all my stuff myself, so I tend to prefer command-line tools over windowed programs.
You can also convert lsu files to wav using Audacity. Just google "Converting WAV Files to LSU Using Audacity".

Quote
And yes I figured that would be the case.
 Success! Since I cant reprogram the teensy until I fix the usb, I used the current sound font configuration and it plays sound!! Hurray! But the LED still stays on. I think it might be the fets I am going to switch those out later this week.

Nice!

Quote
Which sound font are you using on your sabers?

I use a variety of fonts. The primary ones are called "Graflex IV HD" and "Graflex V HD" and are available from soundfont.com.
I have some other fonts that I use primarily for testing.
There are some free fonts available from Naigon Electronics which are meant for use with the Igniter boards, which should also
work with TeensySaber.

I'll probably add support for LSU files (and the alternate names) tonight though. Seems easy enough. :)

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #128 on: March 13, 2017, 09:10:09 PM »
Hmm, weird.
Implementing support for raw / lsu files is easy, but there doesn't seem to be a consistent naming scheme for these types of fonts, so there isn't a way to just drop it in a directory and have TeensySaber just find the various files. I'm going to document how the files should be named though.

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #129 on: March 13, 2017, 09:25:46 PM »

The Naigon Electronics fonts worked out great. I didn't need to change the naming just plug and play from what I can tell.

Well, at least one part of supporting the lsu files is easy. It shouldnt be to hard to change the naming of the lsu files to match.

regards,

GMcIvor

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #130 on: March 13, 2017, 10:23:08 PM »
I've added a section to the software page which describes the file name expectations. Let me know if there is anything in there that doesn't make sense.

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #131 on: March 13, 2017, 10:30:48 PM »
I saw the section added, and it looks great. It will definitely help people categorize and understand their sound fonts. Just one question under polyphonic it says:

    boot - Played when TeensySaber boots up.
    swng - Played when you move the saber around
    hum - Played when you don't move the saber around. (looped)
    out - Played when you turn the saber on.
    in - Played when you turn the saber off.
    clsh - Played when you hit something with the saber.
    force - Force use sound.
    stab - Played when you make a stabbing motion. (Not yet implemented)
    blst - Played when you press the AUX button.
    lock - Lockup (not yet implemented)
    font - Played when you switch to this font / preset.

Is saber in and out reversed? But I guess it makes sense because the saber is going out when its turned on and going in when it is turned off. Look at that answered my own question.

Regards,

GMcIvor
« Last Edit: March 13, 2017, 10:36:17 PM by gmcivor »

Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #132 on: March 14, 2017, 08:29:53 PM »
For the sound fonts section on the software page, I know someone will ask but just to clarify. You can have sub directories on a SD card for example:
     Fonts
     -- Jedi
       -- Clash.wav
       -- Hum.wav
       -- Swing. wav
       -- etc...
     -- Sith
       -- Clash.wav
       -- Hum.wav
       -- Swing. wav
       -- etc...
     -- E 7 Graflex
       -- Clash.wav
       -- Hum.wav
       -- Swing. wav
       -- etc...
In the preset[] array you would type E 7 Graflex, for example, if you wanted that particular sound font from the SD card.

Regards,

GMcIvor

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #133 on: March 14, 2017, 11:10:32 PM »
Directory names can't be longer than 8 characters (it's an FAT32 file system)
so let's call the directory E7GRAF instead. Since E7GRAF is a subdir of FONTS, you would put "fonts/e7graf" or "FONTS/E7GRAF" in the preset array. (Upper case and lower case should both work.) Normally msdos uses \ instaed of /, but since you have to quote slashes, it's easier to use / in the code.


Offline gmcivor

  • Force User
  • ***
  • Posts: 140
  • Do or do not. There is no try.
Re: Announcing the Teensy Saber open source sound board
« Reply #134 on: March 16, 2017, 03:29:27 PM »
Yes, that makes sense. I forgot about the file naming system that was mentioned.

Regards,

GMcIvor

 

retrousse