[HN Gopher] Chiptunes on an ATtiny4 and the 3 Cent Micro
___________________________________________________________________
Chiptunes on an ATtiny4 and the 3 Cent Micro
Author : electricant
Score : 176 points
Date : 2021-05-04 12:24 UTC (10 hours ago)
(HTM) web link (gir.st)
(TXT) w3m dump (gir.st)
| victorthehuman wrote:
| Nice! It reminded me of this great little synth powered
| parasitically from the MIDI port.
|
| https://mitxela.com/projects/flash_synth
| z5h wrote:
| Amazing work. Bravo.
|
| If anyone is interested in an incredible piece of music along
| these lines, please do yourself a favour and check out
|
| TRISTAN PERICH 1-BIT SYMPHONY
|
| http://1bitsymphony.com
|
| (you can skip buying the hardware and find the music on Spotify
| and similar)
| zibzab wrote:
| What mcu does this use?
| ionwake wrote:
| This is amazing - thanks for the link
|
| EDIT > Are there any similar products to this which are
| procedurally generated? Is the OP procedurally generated?
| flobosg wrote:
| 1-Bit Symphony is not procedural.
|
| Also, not quite procedural either, but the Buddha Machine
| might be worth having a look:
| https://en.wikipedia.org/wiki/FM3#Buddha_Machine
| StavrosK wrote:
| https://www.youtube.com/watch?v=apDFVsBDCYE
| qwertox wrote:
| LOUDNESS WARNING! Sounds like a square wave at volume level
| 11.
|
| A downvote for this? It nearly blasted my ears while
| listening this on in-ear headphones after listening to
| "Chiptunes on the ATtiny4".
| StavrosK wrote:
| Oops, yeah, it is quite loud.
| tomcam wrote:
| Inspired and, unlike so many of my embedded projects, completed.
| Respect. Also a great writeup with video.
| throwaway316943 wrote:
| Something I've wanted to do for a while but I lack time and SMD
| skills for is to build a neural net from individual ICs like
| this.
| dragontamer wrote:
| SMD is less tedious when you know what you're doing.
|
| Though hole has... well... holes. It requires tediously placing
| all your stuff through those holes.
|
| SMD on the other hand, can be solder-pasted and then baked with
| a $20 skillet + hot air gun to finish off the last bits. The
| solder has surface tension and naturally "pulls" pieces into
| place.
|
| SMD is slightly more expensive than a soldering iron: you still
| need the soldering iron for some bits. And solder paste goes
| bad over time, and flux to keep stuff clean. You'll also need
| more expensive PCBs with a solder mask if you want to keep
| things easiest (but its really not that much more expensive:
| most costs seem to be shipping costs these days).
|
| So you get your skillet (or toaster oven), a hot air gun,
| soldering iron, solder wire, solder paste, and finally flux...
| and you're pretty much set.
|
| Maybe get some "desoldering" pump and "desoldering braid", in
| case you need to rework some stuff. But the skillet + hot air
| gun works pretty well.
|
| -------------
|
| Work with larger 0805 resistors/capacitors. They look small at
| first, but you can probably work at that level even without
| tweezers. More skilled people can work with 0402 and smaller
| pieces (though that's entering tweezer-only territory)
|
| If 0805 is too small, there are larger pieces available like
| 1206. But I personally think 0805 sufficiently large for
| beginners to work with.
|
| EDIT: I'm talking about American codes. 0805 American is
| equivalent to 2012 European.
| Teknoman117 wrote:
| I just ordered some boards where I used a lot of 0603 (1608
| metric) passives, first time doing something quite this
| small. I did use the "hand solder" version of the footprints
| in KiCad. Tiniest things I've done by hand are some TSOT-23-6
| packages and a 386EX33 in that annoying PQFP-132 package (the
| millipede).
|
| Want to try using a flat tip I use for QFPs, but if it's too
| difficult, I'll get some solder paste and use my hot air
| station (which I initially bought to de-solder some seriously
| annoying DIPs (DS1687+ in EDIP) on some old SBCs - the solder
| just would not come out with solder wick or a pump).
|
| I'm basically imagining tweezers and holding one's breath.
| helsinkiandrew wrote:
| The through hole versions of the ATtiny chips are still
| available - 58 cents in single quantities from digikey,
| probably cheaper elsewhere
|
| https://www.digikey.com/en/products/filter/integrated-circui...
| thequux wrote:
| SMD soldering is not actually that hard until you start getting
| to the really small stuff; you just need some extra tools and a
| decent amount of practice. The smallest packages you're not
| likely to have a choice about are QFPs, which have 0.5mm pin
| spacing. In order to solder these, you need: * ESD tweezers
| (available for a couple bucks on Aliexpress, you want a set
| that contains at least a pair of fine straight tips and a pair
| of hooked tips) * A decent temperature-controlled iron. I
| generally use a Pinecil, but a TS-100 is also quite nice. I
| generally use the D24 tip; for all but the most detailed work,
| the super-fine conical tips are more trouble than they're
| worth. * 63/37 SnPb rosin core solder, preferably 0.3mm
| diameter or smaller. I use ChipQuik RASW.031, but it doesn't
| matter that much. This should cost somewhere around EUR10 * A
| self-standing magnifier. The microscope I use cost EUR300 on
| eBay, but a third hand is available for under EUR10. You
| probably don't need any more than 10x magnification. * Copper
| braid. A small spool (it goes a long way) should be around
| EUR10-20 * (Optional) A bottle of strong beer or a glass of
| wine. If in Eastern Europe, palinca or vodka is an acceptable
| substute
|
| With this stuff at hand, if you're going the beer route, drink
| it. It'll have two effects: your hands will shake less, and
| you'll care less how it looks.
|
| Now, tape your board down and set up your magnifier so that you
| can comfortably look through it as you work. Pick a pad on the
| footprint of the biggest thing that needs to be soldered
| (preferably on the side that you hold your iron with). Apply
| enough solder that there's a noticable bulge. Now, pick up the
| chip with the tweezers in your non-dominant hand, place it in
| the right place. While holding the chip in place with the
| tweezers, melt the solder you placed earlier using your iron
| until it wicks onto the pin of the chip. Check the opposite
| corner and make sure that it's lined up, then put a small blob
| of solder there. Don't worry if you bridge some pins; it's easy
| enough to fix. Now, solder the rest of the pins. If you're
| feeling dexterous, you can solder each pin individually, but I
| don't usually bother. Alternatively (and this is what I usually
| do), just solder all the pins down with a blob every couple of
| pins. Most of them won't end up bridged because soldermask
| repels solder. Once every pin is soldered down, press the wick
| against the joint with the iron to suck up all the excess
| solder. Inspect all the joints to make sure you've gotten all
| the bridges. If there are still some, there are a number of
| different techniques to get rid of them, but usually just
| sliding the tip of your iron along the space between the pins
| will be enough. Worst case, put more solder on and rewick it.
| Congratulations, you're done!
|
| Repeat for each chip, until you're good at it :-D
|
| (FWIW, I learned from this guide
| http://goodfet.sourceforge.net/construction/ , which goes into
| more detail, and also has a nice technique involving taping
| chips down that works very well)
| Y_Y wrote:
| Maybe you should try one of those GreenArrays GA144 boards.
| They give you a 12x12 square grid of crappy forth CPUs,
| connected at grid edges.
| [deleted]
| [deleted]
| djmips wrote:
| Could sound better with a filter on the output.
| kennywinker wrote:
| It has one, check out the section labelled "Output filtering"
| exDM69 wrote:
| Yes, the legendary SID chip was a digital oscillator followed
| by an analog filter.
|
| After seeing this heroic SID chip reverse engineering (0), I
| tried building the filter section using a quad opamp to make
| the state variable filter. It sounds kinda nice for such a
| simple circuit.
|
| I've been planning a project of using a micro controller to do
| the oscillators and then use the PWM outputs to drive the
| filter control voltages.
|
| (0) http://forum.6502.org/viewtopic.php?f=8&t=4150
| girst wrote:
| Hi, author here. What a nice surprise to see my project turn up
| here :)
|
| If you have any questions, shoot!
| gsliepen wrote:
| A similar project, created by a ex-colleague of mine, with an
| ATtiny85, that also broadcasts the generated sound via FM:
| https://www.youtube.com/watch?v=7t7_naYJnHo
|
| Here is the code running on the chip:
| https://github.com/spookysys/attiny-synth
| ionwake wrote:
| Is the Revolt! still on sale? I couldnt find any links for
| something similar - does he not have an etsy?
| Teknoman117 wrote:
| I'm frankly amazed at how cheap getting PCBs made is these days.
| When I first started out my electronics hobby in the 00's,
| everything I did that I wanted to be "permanent" was done on
| perfboard with through the hole parts, ordering PCBs was a pipe
| dream for a teenager funded mostly by birthday and Christmas
| gifts, even if the ads in Servo magazine suggested otherwise.
|
| I took nearly a decade off (shifting into contract app/game dev
| work, university, and then starting my career did not leave a lot
| of room for my electronics/robotics hobby) and now the bargain
| basement price for a batch of 5 "passable" quality boards is <=
| $10 (and "good" quality for <= $50), surface mount parts suddenly
| became very accessible and to be honest, for some of the stuff
| I've played around with, the price savings by using SMT usually
| pays for the boards. DIPs are getting really expensive. It
| completely blows my mind.
| qwertox wrote:
| So this was trial-and-error on the hardware directly, without
| simulating it first in software?
|
| I can't imagine how tedious this must have been. It's fascinating
| what can be archived with determination and this little piece of
| hardware.
| girst wrote:
| First, the music itself wasn't written by me, but by Rob
| Miles[1]. So I had a version in C available. I then iteratively
| transformed the code into simpler and simpler expressions, and
| finally into a simulated assembly language, written as C
| macros[2]. Only the final step, initializing peripherals,
| stetting up interrupt handlers, etc was done with the actual
| chips. Of course, I made some erros with the before mentioned C
| macros, so some final debugging was trial-and-error. Later on I
| also used simulators, but they don't support all the necessary
| features of the MCUs, or were outright broken[3] (patches now
| upstream).
|
| [1]: http://txti.es/bitshiftvariationsincminor
|
| [2]: https://git.gir.st/Chiptunes-
| pms150c.git/blob/f1b013452400b0...
|
| [3]: https://sourceforge.net/p/sdcc/patches/379/
___________________________________________________________________
(page generated 2021-05-04 23:01 UTC)