What's my country code logo

brazil

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:

Group of travellers sitting on steps in front of a yellow and white church

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

Crowd with large trumpets

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

Cat dancing along with the blocos

Got to dance to the bloco rhythms!

Big crowd in front of a large stage with a performer

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

Crowd seen all the way down a street with panoramic city views in the distance

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).

Laptop pictured in a laundrette

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

Laptop pictured on a bus

Some classic bus journey coding

Laptop pictured in a hostel with chairs in the background

A cosy hostel common area was ideal to do some debugging

Laptop pictured on a bed in a private room

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

A male pictured testing out SambaStack

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 start screen

SambaStack app's start screen

SambaStack app screen with one instrument selected

The user can initially listen to each instrument individually

SambaStack app with several instruments selected on record mode

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

SambaStack app with loaded audio and enabled download button

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!