Putting the boop back in the beep beep boop - Page 1
Forum section: electronics / projects

author: bkucenski
author_rank: Contributor
timestamp: February 04, 2018, 04:57:08 am
content: I'm putting together a "sound card" for the Arduino and I've whipped up the page to calculate resistor values for the 555 timers to generate the unique tones. The page also lets you write the music for testing.http://retrolcd.com/Piano555Basically a series of shift registers will drive the tones to create music. 2 shift registers will run 16 notes.I'm wondering if anyone knows of a good resource for older and simpler video game music that's limited to around 8-16 different notes.

author: David Hess
author_rank: Super Contributor
timestamp: February 05, 2018, 06:22:35 pm
content: What I would try to do is a basic FM synthesizer channel which is exactly how old video game consoles and early PCs did sound.

author: bkucenski
author_rank: Contributor
timestamp: February 10, 2018, 06:20:16 am
content: I've been trying to find a reliable source to buy cheap synth chips because that would be a more sophisticated solution.I remembered I ran probably the largest collection of MIDI "ringtones" on the internet back in the early 2000's and still have around 100,000 MIDI files. There's a program that will convert MIDI files to text files called mf2tXPSo I put together a script that went through all the MIDI files I have and converted them to text and stuffed the text into a database. I then parsed that text into JSON which can then be interpreted and loaded into Piano555. I'll be updating the live site this weekend so others can play with it.

author: David Hess
author_rank: Super Contributor
timestamp: February 10, 2018, 06:51:15 am
content: Quote from: bkucenski on February 10, 2018, 06:20:16 amI did not even bother searching for currently produced FM synthesis ASICs. I assumed they are long out of production.What I was suggesting is to make just a single channel FM synthesizer with discrete parts and ICs. I suppose one place to start would be with the lease expensive DDS ASIC that can support AM and FM modulation.

author: dave_k
author_rank: Frequent Contributor
timestamp: February 10, 2018, 11:19:33 am
content: You can buy the Yamaha YMF262 fairly cheaply on eBay ...

author: Yansi
author_rank: Super Contributor
timestamp: February 10, 2018, 12:22:53 pm
content: Yes, definitely look at ebay, there is a shitton sound synthesis chips available for cheap.I see no reason for any time being wasted with an array of 555 timers.

author: bkucenski
author_rank: Contributor
timestamp: February 10, 2018, 03:22:05 pm
content: The main reason for using 555 timers is the simplicity of the circuit, availability and price. The end product will be a simple game like you'd find on those old LCD handheld things but using parts that are easily acquired on aliexpress.com and easy enough to hand solder.It looks like Yahama had a patent on FM synth chips until the mid 1990's which is why it was so available. Now it's all done in software. Projects I'm finding basically use a second microcontroller to act as a software defined sound card. You can always use more sophisticated stuff. I'm looking to do this with the least sophisticated but practical solution with it being more educational. Any ambitious kid could build the project I'm putting together and have something that's more interesting than just blinking LEDs.The AD5206 digital potentiometer with a couple 555 timers gets you a channel rather than a single note but it doesn't seem to be readily available in a DIP package and they're about $5.70 each on DigiKey which is impractical for the skill level I'm going for.I'll have to keep looking into options. I could also use shift registers with resistors to build a digital potentiometer that feeds into the 555. That will take some planning though to see how many parts that would take and the cost.

author: Yansi
author_rank: Super Contributor
timestamp: February 10, 2018, 03:40:42 pm
content: You seem to be quite confused about your own project. First you wave your arms and scream simple and affordable, and then you put out AD5206? Doesn't make much sense, if any.Easily hand solderable? I find easily solderable even 0.4mm pitch QFP or QFNs, so whats the deal? Solderability is a wrong excuse here, so is availability of parts.First, you should set EXACT goals for your project:1) what should it exactly do. Set exact specifications for it.2) what is the target market. Think about who will be using it. Is it a one off? Or do you target 12 year old kids with arduinos?A bunch of 555 and digital pots is NOT in any way the correct way to do a music synthesizer. If you think about setting exact frequencies using the digital pots, than forget about it right away. There will be not enough resolution to make more than a few precise notes and it will drift like crazy with temperature. Even tuning a set of 555 timers for specific precise notes will be one hell of a work, just to produce a few tones.So what is your exact goal for this project? It is easier to look into options when the goal is set. Otherwise we will just spew lots and lots of possibilities how to do a music synthesis, both in digital and analog domain, while a bunch of 555 will still sit somewhere in the very bottom of what is a list of reasonable ways for things to be done.

author: John Heath
author_rank: Frequent Contributor
timestamp: February 10, 2018, 04:00:42 pm
content: Why not go for broke. Software defined musicians to go with the software defined sound card. A simulated video of a full band and these cats could play any tune armed with your thousands of midi files. You could even select the musicians you want to play a given song. Tom Jones singing tip toe through the tulips in the same key.On a more serious note a Tina simulator for the electronics could safe some bread board time and still be educational.

author: bkucenski
author_rank: Contributor
timestamp: February 10, 2018, 07:14:56 pm
content: I already have the PCBs in hand for tuning the 555 and assembling up to 8 notes. It doesn't need to be exactly on pitch or sound particularly great.There's no reason to breadboard with cheap PCB's direct from China. Everything is designed to fit within the free version of Eagle and then the boards connect together with standard 2 or 3 pin connectors.It doesn't need to be more than a few notes because it's not a piano. The final product is a game with some sound effects and background music. It's not for playing music in general. It's for playing a song or two using a limited set of notes determined with the help of the online tool.There is a wide range of options between what a 12 year old could reasonably be expected to understand and assemble and what a professional would do for a general purpose digital synth.The online tool is for figuring out what notes you need for your game and calculating the resistor values. The online tool is the piano.The physical product is 8 to 16 notes for a specific game.

author: james_s
author_rank: Super Contributor
timestamp: February 11, 2018, 04:51:44 am
content: There are loads of sound chips out there, easy to use DIP packages at a price less than what 8 555's will cost. The SN76489AN for example, dirt cheap on ebay, reasonably easy to use.

author: bkucenski
author_rank: Contributor
timestamp: February 12, 2018, 07:11:16 pm
content: Interesting. I'll do some more digging once I wrap up the 555 version. The SN76489AN does 4 channels where 3 are notes and one is noise. So it'd still take several chips to get the same number of polyphonic tones as the 555's will do. I have an inventory website to set up suppliers, inventory, BOMs and calculate costs. That will be put to use soon. For the past several months I've just been buying handfuls of stuff from China as I've been designing the various boards that will be combined to make a complete product.

author: james_s
author_rank: Super Contributor
timestamp: February 12, 2018, 07:52:51 pm
content: Oh is this a commercial product? I thought you were just screwing around having some fun.

author: bkucenski
author_rank: Contributor
timestamp: February 14, 2018, 02:44:20 am
content: For now I'm just screwing around but eventually I'll sort out something to try to earn something out of it. The website is going to be educational and I may just make kits available for those who don't want to wait for things to come from China. There's a lot more to this than just the sound.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: February 14, 2018, 02:56:15 am
content: https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/?

author: bkucenski
author_rank: Contributor
timestamp: February 14, 2018, 06:22:10 am
content: That doesn't work because it wastes resources of the Arduino and interrupts the program. And also "Only one tone can be generated at a time."Which is completely useless for game music. The point is to offload the processing of the sound from the Arduino so the Arduino can focus on the game logic and user input.The boards I've designed completely remove the processing of sound from the Arduino. All the Arduino has to do is set up the bits and send them out the wire to the shift registers.