Output Note Names to OLED


#1

I'm very much a novice coder, I embed & add inlets & outlets, it's little but a step in the right direction, this might be trivial to you all but I'd appreciate a wee bit of help.

I tried to hack a display note so that it would feed one of Tiar's remind objects, I added an outlet, and tried to get it to display note names, by sending disp_v to the outlet, I also tried to send the inlet value, both worked but only sends note numbers, how do I get it to display the note names, as it does this conversion in the patcher?

Found this by doing some snooping on an arduino forum

"displayNoteNames=noteString[midinote%12]+String((midiNote/12)-1,DEC);"

could this be implemented in Axo?


#2

sure, there are a few different approaches. do you want to display the octave as well, or just the name (C or C1 C2 C3 etc?)


#3

Thanks for getting involved Lokki, Note names C1, C2, C3 etc would be awesome, what would you suggest? At the moment it’s for reference for a Euclid sequencer, but in the future, it would open doors for all sorts of sequencing


#4

i would suggest a lookup table approach. basically convert the incoming midi note numbers to a value between 0 and 11 and use that to look up the note name.

do you know how to bit shift and convert a blue signal to midi standard 0 to 127? then use a %12 (modulo) to get only values between 0 and 11.

then divide the incoming midi nr. by 12 to get the octave you are playing in.

maybe i can cook something up :slight_smile:


#5

i have read these terms (bitshift, modulo) in the hacking axoloti objects thread, but have yet to actually attempt any of that, how you’ve phrased it seems very straight forward (thank you for that)

I guess I could dig away at it, however if you can spare the time to cook something up, then I could see that logical approach put into actual object practice, I think that would be very helpful for my understanding, but I would not want to put you out


#6

I couldn't find a ready-made object so I came up with the solution below:


goes from C-1 (0) to G9 (127)


#8

Cool idea, took a while this morning to try to condense the above into fewer objects, when I get a bit more time I'll maybe try to bring it all in to one object, like Lokki mentioned using a lookup table but figured I'd upload here some little progress....haven't looked into this in a very long while, but thanks very much for the roadmap


Note Names To OLED.axp (9.0 KB)