QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Kris01 on September 01, 2019, 02:58:16 pm
-
Is there a way to play multiple "voices" with this function? I know you can add a comma and it will play several notes simultaneously. What I'm asking is if it's possible to play notes from a bass clef and treble clef together (with different melodies). See attachment.
How would I code this?
-
PLAY “CEG”
Plays do, mi, sol, in sequence.
PLAY “C,E,G”
Plays a chord.
-
Right, but how do you keep the half note in the bass playing while the rest and eighth notes play from the treble staff?
-
Make it longer. Specify its duration right after it.
-
Or use L to change duration: Play “L1C,L16EGECEGEC”
-
But wouldn't that just play the half note and then the eighths? I don't think it would play them together. Please correct me if I'm wrong.
-
Hi Kris01
try this
PLAY "cp32ep32g p8 c,e,g p4 l2C,l4E,l4G"
I think to hear a difference among the 3 ways of playing these CEG...
-
Commas allow simultaneous notes. Please run the example.
-
I figured it out. If I make the bass run in the background then it sounds like it should. The treble clef runs in the foreground independent of what the bass line is doing.
-
Hi Kris01,
Sounds like interesting app, I hope you share a sample. Welcome to forum!
-
Thanks bplus! I've been programming since high school (32 years ago! Yikes!) but I've seen some amazing examples of sample code on this forum!