Using MIDI card on BASIC (2)
Before explaining the new MIDI command,
I asked last time you to learn about Note ON and Program Change.
Have you learned it?
You need to learn this 'Note ON' and 'Program Change'
As you tested it, It plays one single voice.
Now You can learn how to Play more voices at the same time.
For Example, to play Do Mi Sol at the same time,
In Piano, You have to push Do, Mi, Sol at the same time.
It could achieve just Keep push Do, Mi,Sol note at the same time.
Pressing Keyboard is the 'Note ON'.
So, you just send this MIDI data.
And if you want OFF the sound,
Just send 'Note OFF' to the channel.
To play Notes, You have to Know the MIDI keyboard numbers as attached.
Find the Do, Mi, Sol and It is 60,64,67
So add code as under..
10 AC = 49320
20 AD = 49321
100 POKE AC,19: POKE AC,17
200 POKE AD,144: POKE AD,60: POKE AD,127
210 POKE AD,144: POKE AD,64: POKE AD,127
220 POKE AD,144: POKE AD,67: POKE AD,127
* This 144 is 'NoteON' MIDI command
And Run it
]RUN
If you want a small delay between NOTE ON
205 GOSUB 300
215 GOSUB 300
299 END
300 FOR D=1 TO 100:NEXT D
399 RETURN
Now, You could have step Playing notes.
And now, you will learn about 'Note OFF'
Note off is release your keyboard.
Note ON is pressing the keyboard now release the keyboard is Note OFF.
You can do it as 80h+Channel
So if you want '1st channel Note OFF'
POKE AD,128: POKE AD,64: POKE AD,127
Then The sound would off the keyboard.
Now, you learned
Note ON
Program Change
Note OFF
and simple delay.
It is a very simple guide and would like this MIDI approach by BASIC code.
For more tricks, You need to learn some more about MIDI commands.
Hope you enjoy it.
Thanks
Ian Kim
'◆ SD MIDI ][+' 카테고리의 다른 글
User review (0) | 2024.02.17 |
---|---|
MIDI songs (0) | 2023.11.10 |
Using MIDI card on BASIC (0) | 2022.08.02 |
SD MIDI ][+ card and user's manual (1) | 2022.06.03 |
New MIDI ][+ is under testing (0) | 2022.05.24 |