home.social

#piday — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #piday, aggregated by home.social.

  1. Minimalist Lo-Fi Minimalism – Part 2

    Last year I programmed up an Arduino with my Pi Day MIDI Sequencer to play a short extract from Philip Glass’ Einstein on the Beach. You can read all about that here: Minimalist Lo-Fi Minimalism.

    Having spent a fair bit of the time since then playing around with an Arduino and SP0256A-AL2 and finally getting it hooked up to MIDI, I parked an idle though that it might be interesting to get it “singing” part of Einstein on the Beach. This post comes back to that idea.

    https://makertube.net/w/4upxhBNemynPiFKfdzzea2

    Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

    These are the key Arduino tutorials for the main concepts used in this project:

    If you are new to Arduino, see the Getting Started pages.

    Parts list

    The Circuit

    I did wonder about combining both the Pi Day sequencer and SP0256A-AL2 shield into a single device, but then decided it would be simpler to treat them as two separate devices and use MIDI to pass control between them.

    Consequently I’ve ended up as follows:

    • Pi Sequencer -> MIDI TRS -> SL0256A-AL2 -> MIDI TRS -> synth

    Where the Pi sequencer is running the code for Minimalist Lo-Fi Minimalism with a small update to send additional MIDI messages to be interpreted by the SL0256A-AL2. All other MIDI is passed through the SL0256A onto a MIDI synth as before.

    The Code

    Having decided on the basic architecture, the next decision was how to encode the information destined for the speech synthesizer. I need to be able to tell it a pitch and a number to be “sung”. I toyed with the following ideas:

    • MIDI NoteOn with pitch, but using note velocity to encode the number to sing.
    • MIDI Program Control to select the number, then MIDI pitch and velocity as normal.
    • Use the MIDI channel for the number, and pitch and velocity as normal.

    I opted for the last option, treating each number as a different instrument on a different MIDI channel. This is a bit wasteful but was a lot easier for testing than attempting to get a specific velocity or having to send MIDI PC messages to keep reselecting the “voice” before each note.

    As described previously in Minimalist Lo-Fi Minimalism MIDI channels 1,2 and 3 are already used for the bass and two voice lines, so I’m using MIDI channels 4 through to 13 for the numbers one to ten.

    The code for the Glass already has pitch and which number encoded into the data structures. To trigger the “singing” via the speech synthesizer I’m using the Soprano voice pitches, but an octave lower, so it is a relatively simple matter of adding in an additional MIDI send as follows:

        MIDI.sendNoteOn(sop[i], 64, MIDI_CHANNEL_SOP);              // Original code
    MIDI.sendNoteOn(sop[i]-12, 64, MIDI_CHANNEL_NUM-1+num[i]); // New code
    lastsop = sop[i]; // Original code

    It is using the “NUM” MIDI channel – 1 as I’m encoding the numbers 1 to 10 which are stored in the num[] array. As the speech synthesis is essentially running at a fixed duration for each utterance, I’m not even bothering with a Note Off message.

    On the speech synth side, again essentially all of the code is the same as for the Arduino and SP0256A-AL2 – Part 6 MIDI code, but instead of singing “do, re, mi”, etc linked to pitch, I need to take the word from the MIDI channel. To do this, I’ve expanded the speak() function to include the number and call it as follows from the NoteOn callback:

      speak(channel-MIDI_CH2NUM, pitch);

    This will result in a number from 1 to 10 and a MIDI pitch which can then be used to select the playback frequency as before and then say the allophones corresponding to the received number.

    void speak (uint8_t num, uint8_t note) {
    midi2clock (note);
    switch(num){
    case 1: // One
    spAllo(WW1);
    spAllo(AX1);
    spAllo(NN1);
    break;

    case 2: // Two
    spAllo(TT2);
    spAllo(UW2);
    break;

    }
    spAllo(PA3);
    }

    The SP0256A-AL2 datasheet lists the allophones to use for the basic numbers.

    I’ve used, in a few cases, slightly shortened versions of the numbers from one to ten. In particular I’ve removed the duplicate allophones for six and seven to make them a little shorter to playback.

    The allophones for “One” includes the use of “SX” but I can find no other mention of that in the datasheet, so I’ve ignored it.

    One final change was to tweak the timings of the original playback. I’ve had to slow it down a lot to give the SP0256A-AL2 time to say each number, and I’ve also introduced a small delay between sending the MIDI messages and updating the numbers on the display to allow them to sync up a little better.

    If the MIDI went to the synth directly from the Pi Day sequencer then a delay would probably be required there too, but as it has to go through the SP0256A-AL2 and get sent back out using the “software THRU” of the Arduino MIDI library, it has a natural slight delay already and isn’t too noticeably out of sync.

    Closing Thoughts

    I always knew there would be a few limitations, not least of which due to the time it takes to play back the allophones, but in essence I believe this works. I’d rather it was a little more up tempo, but sometimes one just has to work with what is available.

    I think it is certainly keeping within the spirit of attempting an extract of the original opera on 8-bit microcontrollers, so it’s not doing too badly.

    Kevin

    #arduinoUno #midi #Minimalism #PhilipGlass #piday #sp0256aal2
  2. The End of Fake Spring Part Two

    It was 60F /15.5 C a week ago and close to that on the day after! I even dried laundry out on the clothesline. Then fake spring the second came to a screeching halt last Tuesday night while James and I were out on neighborhood patrol. The wind was already gusting and then it started sleeting. If you have ever had sleet slamming into your face you are currently cringing and thinking, ouch! If you have never had the pleasure, perhaps you have had sand or small bits of gravel grit whipped against your bare skin? Now pretend they are ice instead. It’s a barrage of cold needle pricks. And when you think it can’t get any worse, one hits you in the eye.

    We stuck it out a little longer because we had reported two ICE-y vehicles prowling the neighborhood and we wanted to be able to send an update if they slunk by again. But when you have to put your hands up over your eyes to protect them from the sleet, it is kind of hard to see what else is happening on the other side of your mittens. So we reluctantly called it a night and went home and crawled into bed early for a little relaxing reading time.

    Minneapolis has dropped like a stone out of the headlines since the government announced the anti-immigration surge was over. But, while there are fewer Department of Homeland Security agents here—nobody knows how many, some report 180 and some 900 and both got these numbers from the government (my guess is closer to 900)—there are still abductions happening every day. Since Bovino and Noem have been fired the abductions have become quieter and more targeted rather than the in-your-face performances requiring tear gas thrown into peaceful crowds and gallons of pepper spray aimed at anyone who dares to stop and look and question what is going on.

    But they are getting ready for something and we don’t know what, though there are guesses. Over the last several days ICE has taken delivery of over 100 new SUVs at headquarters. None of them have yet been driven off the base. I suspect they are planning on something for March 17th, the day the protected status for Somali refugees expires. Thing is though, something like 90-95% of Somalis in Minnesota are United States citizens, having either been naturalized or born here. However, according to the Star Tribune (local paper), there are 2,500 Somalis who currently have protected status in the United States and most of them live in Minnesota (gift link). If you have been paying attention, you know the disgusting things the President has said about Somalia and Somali people, including Ilhan Omar my Congressional Representative. Except none of this is about immigration to begin with, but rather a terror campaign conducted in an effort to consolidate authoritarian power.

    Kind of like the war Trump started against Iran, which by a number of reports, appears that Trump was pressed into it by the Israeli government.  Spend a little time thinking about what that means. And while you’re at it, take a look at some recent reporting about plans for Gaza. If those reconstruction plans go through some people will be making a lot of money and they won’t be Palestinian.

    It’s hard to know what is going on with Trump these days, he is seriously boffo and even more incoherent by the second. He accuses people of covering up for Biden and his problems, I can only imagine how much is being covered up with Trump. Actually, I don’t want to try and imagine it because it is just too horrific. It will all come out eventually but by then it will be far too late. So we continue to suffer from his incomprehensible whims and desire for revenge and self-aggrandizement. We’re spending over a billion dollars a day on an unnecessary war but somehow have no money to fund health care or food stamps or anything for people who actually need help instead of billionaires whose only goal in life is to have the biggest bank account, everyone and everything else be damned. What sad, broken men they are, and they are pretty much all men. 

    I wish I could say fake spring part 3 or even real spring has arrived, but there is currently a blizzard going on outside my windows. We were on foot patrol Saturday afternoon and in an amazingly accurate for a change forecast, it began snowing only ten minutes before the winter storm watch went into effect. It’s been snowing since then, though I can’t tell how much has fallen because the 24 mph winds are whipping it all around.

    I did a first round of shoveling early this morning after breakfast and there was about 6 inches/ 15 cm of heavy, sticky snow. I haven’t been out since, but will need to venture out at some point. Added to the insult of the snow and wind, temperatures by Monday night will be subzero F /-18 C.

    Meanwhile, indoors, the seedlings are doing great. I have already had to raise the grow light above the tomatoes. It might not be spring outside, but it is spring in my kitchen and in my heart.

    The seed sprouting setup. Tomatoes and peppers on the top shelf, herbs on the shelf below. You can see snow on the grapevine outside the window.

    One of the best things about getting connected with neighbors for ICE watch and mutual aid, is also finding other ways to connect. I am now part of a neighborhood garden group who will be raising extra veg for the purpose of donating it to the neighborhood food shelf. A couple folks have organized a seed swap for next weekend. Yesterday I went through all my seeds and made up quite a few envelopes of tomato, bean, squash, herb and flower seeds to share. In sharing my seeds I have no plans to bring home any new seeds. Does anyone want to wager on how many seed packets I come home with?

    Life has gotten increasingly busier and rewarding, but I have also made sure to take time to rest. Some days I don’t feel like I have rested enough, but I do what I can. Yesterday, life was a pie full of cherries. Well, and today too because leftovers. Saturday was Pi Day y’all, at least in the weird way Americans write our dates. To celebrate the magic of 3.14, James made cherry pie. The cherries are from the garden cherry bushes and have been waiting quietly in the freezer since August. James also made vanilla ice cream. Not exactly ice cream weather as it turned out, but with hot coffee and tea and warm pie it was all perfect. And there is still some leftover so I will get to enjoy it a third time.

    Take a gander at the cherry pie! James got fancy and cut hearts in the top crust.

    I’ve also been enjoying some great books. I am in the midst of Death of the Author by Nnedi Okorafor, and enjoying it immensely. Also reading Fear Less: Poetry in Perilous Times by Tracy K. Smith. I enjoy reading poets analyzing poetry and Smith is really good at it, meaning she doesn’t write in academic jargon but everyday language. The book is about overcoming the fear of poetry, which I don’t have but I know many people do, as well as a discussion about the importance of poetry, especially in uncertain times. It is a slim book that I am slowly savoring.

    Then there is Jane Austen’s Bookshelf by Rebecca Romney and Mothers of the Novel by Dale Spender both of which I am reading because of Marcie at Buried in Print, darn her! I’m not far along in either book, but they are tickling something I need at the moment, and I find myself thinking about them and the novelists they write about even when I am not reading the books. I have already made a reading date with a friend to do a summer read together of Frances Burney’s Evelina. No doubt, there will be other novels sneaking onto my TBR pile.

    As for poetry, I am reading June Jordan, Marie Howe, and Wendy Barker. All of them very different and all of them very good.

    And with that, I have a few handwritten notes yet to write, some snow to assess, a couple chores to finish, some yoga to ease my tired muscles, and some books to fall into. And perhaps a second helping of pie.

    Send warm, melty spring thoughts my way please!

    #blizzard #cherryPie #fakeSpring #Gaza #ICE #Iran #PiDay #seedStarting #sleet #Somalia #winter
  3. 3/

    Curiously, #Ramanujan [2] noted another approx. [B] (longer) with the same accuracy as in the case [A] for f(163): "31 places of decimals".

    In #GNUlinux Bash, easy to compare the two even with bc:

    echo 'scale=60; l( 640320^3 + 744 ) / sqrt(163)' | bc -l;

    echo 'scale=60; 4/sqrt(522)*l( ((5+sqrt(29))/sqrt(2))^3 * (5*sqrt(29) + 11*sqrt(6) ) * ( sqrt((9+3*sqrt(6))/4 ) + sqrt((5+3*sqrt(6))/4 ) )^6 )' | bc -l;

    To show π in bc, use π = 4 arctan(1):

    echo 'scale=60; 4*a(1)' | bc -l;

    #PiDay

  4. My #piDay pie has finished baking and it's cooling for dessert. It's a blueberry and raspberry mix.

    #blueberry #raspberry

  5. #piday
    Mungkinkah, mungkinkah
    Mungkinkah kau mampir hari ini?
    Bila tidak mirip kau
    Jadilah bunga matahari
    Yang tiba-tiba mekar di taman
    #jalanjalan
    Morning walk ☀️
    #sunflower #sunflowers #beautifulflower #photosky #photography #art #gardening #natureinspired

  6. Hmm, what kind of pie should I get for #PiDay? and does anyone have tips on the best place to get a pie in #Sooke #Langford #Metchosin?

  7. Happy π Day! 🙂
    --
    It is a Saturday here, March 14th! 🙃
    Now to go find some #Pie à la Mode, with some good, black #coffee to accompany... 🙂
    #PiDay #πDay #nerdsunite #circle #circumference
    --
    offthemark.com/cartoon/technol <- shared cartoon
    H/T #MarkParisi

  8. 🎶 3.1415926535… 🎶

    For #PiDay, enjoy the first 50 digits of Pi, sung to the tune of the Battle Hymn of the Republic.

    𝝅 It’s one of 56 delightfully nerdy readings of The First Fifty Digits of Pi by LibriVox volunteers, performed in styles & languages from Hebrew & Chinese to Gilbert & Sullivan to Cylon. Real Pi, served with a side of silliness.

    🎧 Listen to the full collection ⤵️
    archive.org/details/pi_0803_li

    #HappyPiDay #March14 #3Point14

  9. ¿Crees que necesitas tener una vida de provecho? Sirva de ejemplo William Shanks, que se dedicó a calcular cientos de decimales de pi y hasta el siglo siguiente nadie comprobó que se había equivocado. #piday #diadepi #πday #diadeπ #π

    resolviendolaincognita.blogspo

  10. Real talk: engineers don’t celebrate #PiDay just for pie.

    We celebrate because π reminds us that some of the most powerful ideas in science… never end.

    Infinite math.
    Infinite possibilities.
    Infinite future engineers. #BlackSTEM #WomenSTEM #BlackWomenInSTEM #Engineer #Professor

  11. Engineers know π is not just for circles. It shows up in waves, rotations, signals, and robotics motion. Math really is the language of innovation. #PiDay #NoireSTEMinist #BlackInSTEM #WomenInSTEM #BlackSky #STEMSky #Engineer #Professor #STEM

  12. Happy Pi Day!

    You know, movies & pizza just go together. So today I'm launching the crowdfunding preview for my new project, CRUST FUND PIZZA: THE MOTION PICTURE. Check it & help us spread the word!

    indiegogo.com/projects/rob-chr

    #piday #happypiday #shortfilms #movies #cinema #filmmaking #pizza #indiefilm #chicago

  13. Found on Seasme Street’s account on “another social media platform”. #PiDay #Count

  14. I see people in here wishing each other a happy π-day.

    I suggest, that those who live in countries which use the dd/mm/yyyy pattern for writing dates, postpone their celebration of π-day to the 22nd of July - 22/7

    #piday #πday

  15. Pi Day is also the day of Riesling !

    🍷 skøl

    #riesling #pi-day #piday

  16. @mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
    #commodorepet #piday #oscar64

  17. @mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
    #commodorepet #piday #oscar64

  18. @mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
    #commodorepet #piday #oscar64

  19. @mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
    #commodorepet #piday #oscar64

  20. @mrdoornbos And there we go. Took a minute without any optimizations, using oscar64. It only supports floats, and that only barely. So 10.000 iterations is the maximum, plus convergence is poor. BASIC is faring better! I wonder how quick it'll be at -O3...?
    #commodorepet #piday #oscar64

  21. 📖 Pi Day Read: Flatland by Edwin Abbott Abbott

    A mathematical satire where geometric shapes live in a two-dimensional world. Written in 1884, Flatland explores dimensions, perception, and social hierarchy through geometry. Mind-bending, witty, and surprisingly profound.

    Read for free in BookShelves:
    lk0.eu/bks12m

    #Bookstodon #FediReads #FreeBooks #Classics #BookShelves #PiDay #mathematics

  22. Happy Pi Day! Did you know you can teach math with film? For Pi Day, we're highlighting some of our favorite Math teaching resources for grades 5-12. Our free teaching guides for award-winning films from around the world feature classroom-ready lesson plans across the curriculum — including math!

    Our most popular math lesson, inspired by Hidden Figures, is about The Math of Space Travel: Orbits and Conic Sections. It's also available from Share My Lesson! 🚀

    🔔 Plan ahead to teach these lessons in April for Math and Stats Month!

    Check out the link for free lesson plans to liven up your math classes 👇

    journeysinfilm.org/teach-math-

    #PiDay #HappyPiDay #StemEducation #StemTeacher #Education #Homeschooling #Mth #Maths #Mthematics #HiddenFigures #GlobalEducation

  23. Today is Pi Day (3/14 in US date format)

    In 2024, Pi was calculated to 105 trillion digits. That requires roughly a PB of storage to store this number.

    (And I created a single table with 1 PB of data in WarehousePG last year).

    Did you know that NASA once calculated that we only need 38 digits of Pi, ever?

    science.slashdot.org/story/24/

    #PiDay #Pi #WarehousePG #NASA @warehousepg

  24. The now traditional Numberphile episode to discuss the importance of PI Day.

    Maybe start watching it at 15:92 UTC or your local time? 😁

    youtu.be/TLV6e41-uxc

    #πDay #PiDay

  25. #14marzo è il #piday: giornata internazionale della #matematica ✨π✨

    💡 Questo volume rappresenta ancora un'eccezione nel panorama dei testi didattici: scaricabile liberamente e senza costi

    👨🏼‍🏫 Pubblicare manuali didattici in #accessoaperto rispecchia i valori del #dirittoallostudio e della libera circolazione del sapere

    Scaricalo qui in #openaccess: libri.unimi.it/index.php/milan

    Ascolta la puntata di #LibrOAperto: spreaker.com/episode/matematic

    @cultura

  26. Pi Day reminder: math isn’t scary… it’s just irrational sometimes.
    Kind of like debugging code at 2am.

    Happy #PiDay to everyone who knows that π keeps going… just like engineers solving problems. 🥧🤖 #STEMSaturday #BlackSky #STEMSky #NoireSTEMinist #Engineering #STEM

  27. Of course, on Pi Day, I’ll be treating you to some suitably bad puns about Pi.
    Let’s start with the ultimate level of nerdiness: the knights who always say Pi.
    --- --- ---
    Natürlich versorge ich euch am Pi-Tag mit adäquaten schlechten Wortwitzes bzgl. Pi.
    Beginnen wir mit den ultimativen Nerd-Level: die Ritter, die immer Pi sagen.

    #KätToon #PI #MontyPython #PiDay #PiTag #KnightsOfNi #RitterDieImmerNiSagen #RitterDerKokusnuss #314 #MontyPythonAndTheHolyGrail

  28. Los gringos y sus días basados en formatos de fechas que nadie más usa:
    - #mar10 Mario day
    - #piDay
    - #maythe4th

    🤦🏻

  29. Some tickets $21.12 for Freewill, the Rush Experience, this Saturday on the day of our Pi, March 14th

    The show is at the Herberger Theater in downtown Phoenix, take the train if you can

    Saturday, March 14th @ 19:00

    freewill.net/

    Freewill had its 30th anniversary show in 2024, so has been around for more than half of the 50something

    #Rush #RushIsABand #PiDay #baseball #ProgRock #FreeWill #TributeBand #Phoenix #Arizona #HerbergerTheater