Hey Nijerson! Thanks for taking interest in my work. I've implemented this program only for one octave (starting from C4, I guess). If you want to build all the octaves (suppose for a piano with 88 keys), take the lowest pitched C frequency as your base_note and change the list(octave) like [C1, c1, D1, d1, ...B1 , C2, c2, D2, d2, ... B2, C3, c3, D3, d3, ... B3]. Formula will remain the same, so no need to change anything else. And while encoding musical notes for a song, replace like this: C to C4, c to c4, etc ...
I hope this answers your query. Good luck!