Arduboy noise synth

So it is not a game, but it has gamification tendencies. I made a noise synth thingy because, well, I can, and I wanted to.

IMAGE ALT TEXT

Source over at http://www.larsby.com/johan/?p=1376
And on GitHub at https://github.com/Larsby/NoiseSynth

5 Likes

From the source:

// piezo pin
#define p1 5

You should try to avoid using absolute pin numbers when coding for the Arduboy. Your sketch won’t work on a DevKit.
Use:

// piezo pin
#define p1 PIN_SPEAKER_1

or just use PIN_SPEAKER_1 directly instead of redefining it.

1 Like

Updated the code to use the predefined pin. Thanks for pointing that out and having a look.

2 Likes

I can’t get this to work at all. The code on your page has a bunch of '&gt’s throughout which seem to just be undefined?

hehe, an > is a >; it’s the html markup for the symbol. I’m sure you saw it jump when you were typing out your message.

@Johan_Larsby, the encoding of your source is wonky. It sort of looks like a flask deployment? It looks like whatever is doing the syntax highlighting just needs to have the string it’s highlighting be encoded properly before doing the markup.

Anyway, yeah, @gnargle, you can use regex, or any number of methods to fix this up.

This looks like the only error you will need to fix.

You can change each instance of > to > by hand, or you can do it with a cli tool. I would personally take this into Vim and use the command :%s/>/>/g to clean everything up. A similar expression will also work with sed and awk from the command-line.

More on Vim, sed, awk and regex



thegeekstuff.com

Unix Sed Tutorial: Find and Replace Text Inside a File Using RegEx
The `s’ command attempts to match the pattern space against the supplied REGEXP; if the match is successful, then that portion of the pattern space which was matched is replaced with REPLACEMENT.

@gnargle and @ekem

That is wordpress breaking things up. I uploaded the zipfile with the .ino source herer http://www.larsby.com/johan/wp-content/uploads//HelloNOISE.ino_.zip
Hope that helps.

1 Like

Thanks for the link :smiley: :100:

I’m always a fan of using Github to store source. I’m pretty certain at this point, that it’s going to be around another 10 years.

You can simply link to it on your site, it really does take some demand off your box if your link gets popular. It seems like a lot of people dig the demo! I’m one of them for sure. It’s fantastic work. But it also might get enough clicks to take down the site? who knows. Github will also auto build a zip of your source, and that is pretty nice for distributing.

The host load should not be a problem but I’d love to have access to se where ppl take this. TBH though I was lazy and just uploaded it on he blog.

Here it is.

1 Like