PURE DATA forum~

...that deal with pure data

You are not logged in.

#1 2010-02-18 16:00:07

sinewave
Member

MIDI number to name

Hello, there!
Here's the abstraction which should calculate incoming midi numbers and output them as a midi note names.
Example:

Midi number 60
l
l
l
[notoname]
l
l
l
C4 <--- symbol box here

I'm sure that there's more elegant way to convert numbers to symbols. But, that's how the newbies do. In the patch, there are several, instead of one [sel] object, I did it that way because I found it impossible to wire it's outputs when they are so close together. Any suggestion is welcome.
sinewave

Offline

 

#2 2010-02-18 16:18:12

slur
Member

Re: MIDI number to name

pooor bastard someone should have told you about the modulo operation and message generation
example:
input a number x from 0 to 100
a=x%5
b=int(x/5)
then you can select 0 - 4 and send |a( |b( ... |e(
put this and b into a pack which is connected to
| $1$2 (
and you should get for
x=3, C0
x=55, A11


pd redefining mathematics |expr fact(0)|==0

Offline

 

#3 2010-02-19 17:14:03

sinewave
Member

Re: MIDI number to name

thank you, slur!
I must admit that I don't understand your explanation. I even cannot find anything about message generation in the help file. Will you, please, attach a patch with the example?
Thank you very much!
sinewave.

Offline

 

#4 2010-02-22 16:25:43

slur
Member

Re: MIDI number to name

here
read help/browser its in there


pd redefining mathematics |expr fact(0)|==0

Offline

 

#5 2010-02-28 14:53:14

sinewave
Member

Re: MIDI number to name

Thank you, slur!
And here's the finished, more elegant patch!
sinewave

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson


pd.webring info