DorkbotPDX

Re: DORKBOTPDX February 2016 Workshop: HANDS ON JTAG FOR FUN AND ROOT SHELLS

dorkbotpdx-announce - Wed, 2016-02-03 23:07
Quick note, I got the date for the Advanced Microcontroller Audio workshop wrong. It's on Sunday, April 24th. (Not the 30th). On Wed, Feb 3, 2016 at 2:10 PM, Brian Richardson wrote: > DORKBOTPDX February 2016 Workshop: HANDS ON JTAG FOR FUN AND ROOT SHELLS > by Joe
Categories: DorkbotPDX, Mailing Lists

DORKBOTPDX Feburary 2016 Workshop: HANDS ON JTAG FOR FUN AND ROOT SHELLS

Dorkbotpdx.org - Tue, 2016-02-02 16:38

 

 

  JTAG may be almost 30 years old with little change, but that doesn't mean most people really understand what it does and how. This workshop will start with a brief introduction to what JTAG really is, then quickly dive into some hands-on practice with finding, wiring, and finally exploiting a system via JTAG.   For this workshop, we'll target a Raspberry Pi with an ARM microprocessor. In order to interact with the system, we'll use a JTAG interface cable from FTDI. We won't do any hardware modifications, but we will hook up wires in weird and wonderful ways to make the Raspberry Pi do things it otherwise shouldn't.   Sunday, February 28th, 2016 1pm at Control-H, 7608 N. Interstate, Portland, OR 97217   Instructor: Joe FitzPatrick Free, (donate to Ctrl-H if you can!)    Limited to 20 people (or groups of people) RSVP to bzzt@knowhere.net   No equipment needed, everything is provided.   Upcoming workshops! Sunday, 27MAR2016 at Control-H, Build your own FuzzFace Guitar Pedal with Jim Titus Sunday, 24APRIL2016 at Control-H, Advanced Microcontroller Audio with Paul Stoffregen Sunday, 29MAY2016 at Control-H, GLOBAL SYNCHRONIZED AUTONOMY with Rich and Friends

 

Categories: DorkbotPDX, dorkbotpdx.org

Futel ByteMe set up

DorkbotPDX Flickr Group - Sun, 2016-01-31 17:32

breedx has added a photo to the pool:

Futel ByteMe set up

Futel ByteMe set up

DorkbotPDX Flickr Group - Sun, 2016-01-31 17:32

breedx has added a photo to the pool:

Futel ByteMe set up

Futel ByteMe set up

DorkbotPDX Flickr Group - Sun, 2016-01-31 17:32

breedx has added a photo to the pool:

Futel ByteMe set up

Futel ByteMe set up

DorkbotPDX Flickr Group - Sun, 2016-01-31 17:32

breedx has added a photo to the pool:

Futel ByteMe set up

Futel ByteMe set up

DorkbotPDX Flickr Group - Sun, 2016-01-31 17:32

breedx has added a photo to the pool:

Futel ByteMe set up

DORKBOTPDX January 2016 Workshop: OPEN LAB

dorkbotpdx-announce - Thu, 2016-01-28 11:53
Make things with or next to other people! Bring a project or collaborate on someone else's project. We provide space and power. You bring tools and projects. Ask fellow dorks for help and offer help to others. RSVP by commenting at http://dorkbotpdx.org/openlab_01_2016 telling folks what
Categories: DorkbotPDX, Mailing Lists

DORKBOTPDX January 2016 Workshop: OPEN LAB

Dorkbotpdx.org - Thu, 2016-01-28 11:40
OPEN LAB  at Control-H, 7608 N. Interstate, Portland, OR 97217 Sunday, January 31, 2016 1-5pm   Make things with or next to other people! Bring a project or collaborate on someone else's project. We provide space and power.  You bring tools and projects.  Ask fellow dorks for help and offer help to others.   RSVP by replying to this page and telling folks what you'll be working on!   Upcoming workshops: February 2016: Hands-on JTAG for fun and root shells with Joe FitzPatrick March 2016: Build your FuzzFace Guitar Pedal with Jim Titus    

AttachmentSize computer_age.png485.25 KB
Categories: DorkbotPDX, dorkbotpdx.org

Futel phone work, post-it removal

DorkbotPDX Flickr Group - Wed, 2016-01-27 11:00

xnorman has added a photo to the pool:

Futel phone work, post-it removal

Elijah and Karl are setting me up with a phone. Elijah and I plugged it in and realized that the star and pound keys didn't work.. Elijah dismantled it and we found that those keys were physically disabled with little pieces of post-it notes!

Generating High Precision Sine Wave Data

Dorkbotpdx.org - Mon, 2016-01-18 17:20

Recently I put some work into efficiently generating sine wave data intended for testing 24 bit audio hardware.  Here's a quick message about this new work, in case anyone's interested....

Normally sine waves are generated on microcontrollers using a table lookup.  That's perfect if the sine wave happens to be an exact division of the sample rate.  But if you want to generate waveforms at any frequency, you end up needing points on the waveform that are "between" two entries in the table.  The 2 common approaches are to simply use the nearest or prior table value, or to grab the nearest 2 values from the table and use linear interpolation.

But if you want a sine wave with extremely low distortion, where 16 or 20 or more bits are within +/- 1 from an ideal sine wave, you'd need an extremely large table!

Sine can be computed using Taylor series approximation.  The formula is: (where x is the angle, in radians)

 sin(x) = x - (x^3)/3! + (x^5)/5! - (x^7)/7! + (x^9)/9! - (x^11)/11! + ....

This series goes on forever, but each extra terms makes the approximation rapidly converge to the true value.  In doing quite a lot of testing, I discovered the C library function on Linux for sin() uses this approximation, to only the (x^7)/7! term.  I also found a few sites talking about going to the (x^9)/9! for "professional quality" audio.

If you're still reading by this point, you're probably shaking your head, thinking this couldn't possibly be practical in a microcontroller.  That's a complex equation with floating point numbers, and huge values in x^11 and 11!, since 11 factorial happens to be 39916800.

The code I'm sharing here implements this equation to the (x^11)/11! term using 32 bit integers, using only 12 multiply instructions, which execute in a single cycle on Cortex-M4.  The add & subtract take zero CPU time, since those multiply instructions also come in flavors that do a multiple and accumulate, either positive or negative accumulate.

The Cortex-M4 multiplies perform a 32x32 to 64 bit multiply, and then discard the low 32 bits, with proper round off.  That turns out to be exactly the right thing for managing the huge values of x raised to an increasing power, and the huge numbers of the factorials.  Since those divisions are by constants, it's possible to multiply by the reciprocal to get the same effect.

So, here's is the optimized code:

https://github.com/PaulStoffregen/Audio/blob/master/synth_sine.cpp#L75

// High accuracy 11th order Taylor Series Approximation // input is 0 to 0xFFFFFFFF, representing 0 to 360 degree phase // output is 32 bit signed integer, top 25 bits should be very good static int32_t taylor(uint32_t ph) { int32_t angle, sum, p1, p2, p3, p5, p7, p9, p11; if (ph >= 0xC0000000 || ph < 0x40000000) { angle = (int32_t)ph; // valid from -90 to +90 degrees } else { angle = (int32_t)(0x80000000u - ph); } p1 = multiply_32x32_rshift32_rounded(angle << 1, 1686629713); p2 = multiply_32x32_rshift32_rounded(p1, p1) << 3; p3 = multiply_32x32_rshift32_rounded(p2, p1) << 3; sum = multiply_subtract_32x32_rshift32_rounded(p1 << 1, p3, 1431655765); p5 = multiply_32x32_rshift32_rounded(p3, p2) << 1; sum = multiply_accumulate_32x32_rshift32_rounded(sum, p5, 286331153); p7 = multiply_32x32_rshift32_rounded(p5, p2); sum = multiply_subtract_32x32_rshift32_rounded(sum, p7, 54539267); p9 = multiply_32x32_rshift32_rounded(p7, p2); sum = multiply_accumulate_32x32_rshift32_rounded(sum, p9, 6059919); p11 = multiply_32x32_rshift32_rounded(p9, p2); sum = multiply_subtract_32x32_rshift32_rounded(sum, p11, 440721); return sum <<= 1; }

On top of the 12 cycles for multiplies, there's a few bit shifts, and a quick conditional test which subtracts from a constant.  That's necessary because the Taylor series approximation applies only if the angle is between -pi/2 to +pi/2.  For the other half of the sine wave, that subtract maps back into the valid range, because the sine wave has symmetry.

This function takes a 32 bit angle, where 0 represents 0 degrees, and 0xFFFFFFFF is just before 360 degrees.  So the input is perfect for a DDS phase accumulator.  The output is a 32 bit signed integer, where 0x7FFFFFFF represents an amplitude of +1.0, and 0x80000001 represents -1.0.

This code will never return 0x80000000, so you don't need to worry about that case.

I did quite a lot of testing while working out these constants and the bit shifts for correct numerical ranges.  I believe the top 25 bits are "perfect".  Six of the low 7 bits are very close, but the approximation does diverge slightly as the angle approaches pi/2 magnitude.  The LSB is always zero, since the computation needs to have extra overhead range to accommodate values representing up to ~1.57 (pi/2) before the latter terms converge to the final accurate value.

For 8 bit AVR, this approach probably isn't practical.  It probably isn't practical on Cortex-M0+ either, since there's no 32x32 multiply with 64 bit result.  Cortex-M3 does have such a multiply, but not in the convenient version that rounds off and discards the low 32 bits.  On Cortex-M4, this code runs very fast.  In fact, when executing at 100 MHz or faster, it might even rival the table lookup, since non-sequential flash accesses (for the table) usually involve a few wait states for a cache miss.  Then again, this code does have 6 integer constants, for the conversion to radians and the factorial coefficients... and depending on compiler flags and flash caching behavior, loading those 6 constants might be the slowest part of this algorithm?

I'm sure most people will still use table lookups, and maybe linear interpolation between 2 table entries.  But I wanted to take a moment to share this anyway.  Hope you find it interesting.

Categories: DorkbotPDX, dorkbotpdx.org

Audio Workshop at Hackaday Supercon

Dorkbotpdx.org - Mon, 2015-11-16 14:36

The audio workshop at Hackaday's Supercon was a huge success.

The FFT part was used by "most over the top" badge hacking winner!

Here's a walkthrough of the workshop:

Categories: DorkbotPDX, dorkbotpdx.org

Workshop: Introduction to Pure Data (Pd), Nov. 15th, 1-5pm

dorkbotpdx-announce - Sat, 2015-11-07 17:12
http://dorkbotpdx.org/intro_to_pd_2015 When: Sunday, November 15th, 2015. 1-5pm Where: Ctrl-H Hackerspace, 7608 N. Interstate, PDX, OR (map) Bring: A laptop and headphones Instructors: Jesse Mejia, Alex Norman, Jason Plumb Details: In this 4-hour course, students will learn the basics of
Categories: DorkbotPDX, Mailing Lists

Random November 2nd Meeting Photos!

Dorkbotpdx.org - Sat, 2015-11-07 14:49

I just thought I'd post some random photos and projects from the last DorkbotPDX meeting.  Lots of fun stuff.

Tom Hudson brought his shaking haunted house. He worked on it with his coworkers at OMSI. It uses a saber saw as the shaking mechanism. Pretty sweet. He's posted an Instructable about it if you're more interested.

DorkbotPDX 11/2/2015

 

DorkbotPDX 11/2/2015

Mykle Hansen brought his Teensy Synth project. It made some sweet, crunchy sounds. I think it is based off of this project.

DorkbotPDX 11/2/2015

Mathew Lippincott brought his Portal Gun from Rick and Morty. It used an 800 lumen flashlight to project the portal! Very cool!

DorkbotPDX 11/2/2015

Scott Dixon brought a new robotics platform that he's playing around with. It's not hooked up to his Bluetooth Barbie steering wheel yet, but maybe soon. I didn't catch what the platform actually is, maybe he'll chime in on the comments.

DorkbotPDX 11/2/2015

Here were some folks playing with using balloons to diffuse LEDS. Reminds me of this project.

DorkbotPDX 11/2/2015

Finally, some folks just hacking together. I didn't find out what they were doing, maybe they'll chime in on the comments below. DorkbotPDX 11/2/2015

 

Fun projects, great to see so many projects on display!

 

Categories: DorkbotPDX, dorkbotpdx.org

Introduction to Pure Data 2015

Dorkbotpdx.org - Thu, 2015-11-05 23:43
An Introduction to Pure Data

DorkbotPDX is happy to offer a free workshop as an introduction to Pure Data (Pd).

When: Sunday, November 15th, 2015. 1-5pm

Where: Ctrl-H Hackerspace, 7608 N. Interstate, PDX, OR (map)

Bring: A laptop and headphones

Instructors: Jesse Mejia, Alex Norman, Jason Plumb

Details:

In this 4-hour course, students will learn the basics of Pd and will have fun developing foundational Pd patching skills. 

Pure Data (Pd) is a free, open-source, community supported data flow language and coding environment with an emphasis on sound, music, and multimedia.  It was originally written by Miller Puckette (also the original author of Max/Max MSP) and runs on Linux, Mac OSX, Android, and Windows.

Pd has been used widely in the creation of art -- such as music, sound art, visual art, generative, new-media, and interactive art.  Pd interfaces readily with MIDI equipment and many popular microcontrollers. 

We have curriculum posted here.

Beginners are welcome.  No prior computer programming or sound programming experience is required!

Notes:

Students should attempt to install Pd prior to the workshop...but if not, no biggie.  We can help with that!

Seating is limited to 20 participants.  Please RSVP to jason@noisybox.net to reserve a spot.

Attendees will respect The DorkbotPDX code of conduct and will be asked to donate.

Workshop Links/Notes/Materials

https://www.flossmanuals.net/pure-data/

Best book ever written: http://www.amazon.com/Designing-Sound-Andy-Farnell/dp/0262014416

http://www.pd-tutorial.com/

http://obiwannabe.co.uk/tutorials/html/tutorials_main.html

band limited oscillators and other useful things: https://github.com/dotmmb/mmb

http://pd.klingt.org/pd_ring/info.html

RSVP

  1. felisha
  2. frida
  3. david
  4. kelly
  5. nick
  6. james
  7. brandon
  8. taylor
  9. joe
  10. katie
  11. ashlin
  12. jeremy
  13. andre
  14. daniela
  15. chloe
  16. pat
  17. brenna
  18. birch
  19. lauren
Bonus:
  1. sofia
  2. matt l
  3. matt c
  4. lief
Nope:
  1. anastasia
  2. dominic
Categories: DorkbotPDX, dorkbotpdx.org

DorkbotPDX 11/2/2015

DorkbotPDX Flickr Group - Thu, 2015-11-05 17:37

bzztbomb has added a video to the pool:

DorkbotPDX 11/2/2015

DorkbotPDX 11/2/2015

DorkbotPDX Flickr Group - Thu, 2015-11-05 17:34

bzztbomb has added a photo to the pool:

DorkbotPDX 11/2/2015

DorkbotPDX 11/2/2015

DorkbotPDX Flickr Group - Thu, 2015-11-05 17:34

bzztbomb has added a photo to the pool:

DorkbotPDX 11/2/2015

DorkbotPDX 11/2/2015

DorkbotPDX Flickr Group - Thu, 2015-11-05 17:34

bzztbomb has added a photo to the pool:

DorkbotPDX 11/2/2015

DorkbotPDX 11/2/2015

DorkbotPDX Flickr Group - Thu, 2015-11-05 17:34

bzztbomb has added a photo to the pool:

DorkbotPDX 11/2/2015

Syndicate content