Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Numbers at end of Play strings
#11
I have not played around with PLAY (how odd of me!) but reading through this sudden burst of interest both in Play and Draw too has me asking what are the complete requirements to play one note:

1. an octave O
2. a letter A-G, 7 notes of scale an Octave from first note is the 8th 
3. a sharp# or flat- BTW these are called half steps the C scale has no sharps of flats but certain intervals in scale only C D E F G A B C. On piano there are no Black keys between some notes, the C scale is all White keys. So there is no sharp or flat between some notes. Time to Google and remind myself which...
   

Ah! between EF and BC there are no sharps or flats so E# might Play F or F flat might Play as E and likewise in BC half step relations.

4. the length of note, I think we've determined as the number on the end

I think that is complete total of things you need to convert a piece of sheet music to a Play command note by note.
Am I missing anything? Sure Play has other commands but I think these 4 are essential base from which you can convert anything from sheet music without chords = multiple notes played at one time.

OK you have to know a few other things about sheet music like a whole note, half note quarter eighth, and keys which requires up to 4 flats or sharps for a note position on the staff, the 5 lines across. If the key has a flat at the staff position (or the octaves of that position) then you Play a flat for the note instead of just the note. There is also tempo usually 4 / 4 time 1 quarter (a line no flag) note is one beat, a whole note (empty oval) takes  whole measure half note (filled oval) well a picture is worth...
   
Update: I forgot rests, silence sections in music as important as the notes! like empty space or atmosphere in drawings.
How does Play do rests? Still more to research...


So my first experiment with Play would take something like "Mary Had A Little Lamb" and see if I could get it coded for Play to play it.

Ah I am leaving out:
5. volume level
6. slurs or staccato crescendo increase in volume and it's opposite decrescendo these are long < and > over the notes.
These are set along the way across the notes, slurs have arcs drawn over the notes blending the transitions from one to next, staccato have little ^ over notes to make them emphasized and slightly shorter than regular ie you stab the keys on piano compare to slur where next key is pressed before last key is released or nearly that. Slur rhymes with blur and the same between sound and sight.

So that's my quick lesson on converting sheet music to Play commands without trying it in QB64 yet!
b = b + ...
Reply
#12
There are two tricky things left: dotted-length notes and ties.

Sadly cannot count on "L" command to add to length, must place the dot right after the note like "F#." or "A8.".

Doing ties (slurs) requires using "ML" (legato) instead of "MN" (normal) or "MS" (staccato). The person translating sheet music has to be prepared for it, when the music normally calls for normal or staccato playback, and where there's a tie, it's to switch to "ML" temporarily, do the run of notes and then go back to "MN" or "MS".
Reply
#13
(06-24-2023, 02:55 PM)mnrvovrfc Wrote: There are two tricky things left: dotted-length notes and ties.

Sadly cannot count on "L" command to add to length, must place the dot right after the note like "F#." or "A8.".

Doing ties (slurs) requires using "ML" (legato) instead of "MN" (normal) or "MS" (staccato). The person translating sheet music has to be prepared for it, when the music normally calls for normal or staccato playback, and where there's a tie, it's to switch to "ML" temporarily, do the run of notes and then go back to "MN" or "MS".

Thanks, I might have this worked out before studying the Wiki Play LOL
b = b + ...
Reply
#14
(06-24-2023, 08:09 AM)PhilOfPerth Wrote:
(06-24-2023, 02:42 AM)TerryRitchie Wrote:
(06-23-2023, 11:25 PM)PhilOfPerth Wrote: Thank you.
(I am also musically trained)
Sorry for the long winded response. Smile

No probs: I just wanted to save anyone from going through a whole music course unnecessarily. 
(It's usually better to assume someone doesn't have the background knowledge than go way over their heads)!

Did you notice the Edit in my post? This may be something you'd like to cover in your Tut, as it seems to be an
undocumented feature: L8A is not the same as A8, but it can appear to be (L8 will carry on into the next Play, while A8
only holds for the one note.
Yes, L sets the default note length for all following notes. Handy for those measures of eighth, sixteenth, or thirty second notes in a row.

I just looked at the Wiki and it appears misleading. Instead of "Sets length of a note " I believe it should be "Sets the default length of all following notes".
There are two ways to write error-free programs; only the third one works.
QB64 Tutorial
Reply




Users browsing this thread: 1 Guest(s)