SambaStack
Uploaded on 29th April 2025
I was lucky enough to be in Brazil for the world famous carnival celebrations, and it did not disappoint! Full of dancing, colours, and, of course, samba!
Inspired by all of the traditional Brazilian instruments that come together to make an iconic and energetic samba song, I created this app so that you could have a go at bringing a beat to life too. Here are just some photos of my carnival chaos:

We had a great group of fellow travellers to celebrate with in Olinda

The bloco bands would play in the middle of huge crowds with equally huge trumpets!

Got to dance to the bloco rhythms!

We saw so many amazing live performances, including a whole samba night

Olinda's blocos were huge events!
Brazil really surprised me - it was such an incredibly diverse country with beautiful beaches, stunning islands, breathtaking national parks and cities full of life and culture. And that's before even mentioning the carnival celebrations, which I actually attended in Recife and Olinda with my best friend Holly, who flew out from England to join me. Deciding to forego the typical backpacker destination of Rio for the festivities, we were immersed in traditional north-eastern blocos and music. We loved joining in with the street parties and dancing to the amazing cacophony of sounds from the instruments as we went around the blocks in parades. In this region, Frevo is the main genre of traditional music, but of course there was still samba, and as I travelled further south it was all around me in the best way possible.
In Rio De Janeiro, I attended a famous samba night held on Mondays and we boogied away to the beats. I fell in love with the rhythms that just get those hips shimmying!
Between all of this, I actually did not have a lot of down time to code, so a lot of this app was created on buses and slightly into Bolivia too (oopsies).

I got an hour of coding in at the local self-serve laundry in Paraty

Some classic bus journey coding

A cosy hostel common area was ideal to do some debugging

A cheap private room treat was great for some late night work

Testing out my app on a lovely hostel pal!
I've never worked with music on apps before, so this was a chance to challenge myself and learn about how it can be incorporated into a NextJS project. I had a lot of fun playing around with tone.js, understanding how to get sounds to play on browsers and then enabling them to be recorded over one another. However, I did face a lot of issues with the IOS mobile browser and its strict handling of audio, which differed from desktop behaviour. This took a lot of time to work out, test and debug, and resulted in having to implement a loading state which can often sadly drag on a little too long as each sound gets preloaded.
I used Freesound to find and download my samba samples which was a really fun task itself. To match the rhythms, I wanted my app to scream 'Brazil' in the styling, and I enjoyed adding my dancing girls for an extra flair.
I was eager for the user to be able to download the mix they created which I'm glad I could achieve, however the .wav format is not always the most compatible, especially with phones, and so if I'd had more time I would have loved to have allowed the user to convert their recording to a more common format and then be able to share it across apps like Whatsapp as well.

SambaStack app's start screen

The user can initially listen to each instrument individually

In recording mode, multiple instruments can be overlaid to create a mix

Once the recording is finished, the user can play it back and download it
I'm really happy I could bring some of Brazil's samba beats to a fun app, and I got to play around with music too. Please do have a go at creating your own jam - I'd love to hear it!
As always, drop me a message if you spot any bugs, have any improvement ideas, or have any suggestions for future country projects!